Comments (3)
Same error, OS and Sorcar Version. Using Blender V2.93.1
from sorcar.
Hello, problem occurs due to blender API evolution
API
https://docs.blender.org/api/current/bpy.ops.mesh.html
bpy.ops.mesh.select_random(ratio=0.5, seed=0, action='SELECT')
Randomly select vertices
Parameters
ratio (float in [0, 1], (optional)) – Ratio, Portion of items to select randomly
seed (int in [0, inf], (optional)) – Random Seed, Seed for the random number generator
action (enum in ['SELECT', 'DESELECT'], (optional)) –
Action, Selection action to execute
SELECT Select, Select all elements.
DESELECT Deselect, Deselect all elements.
Code evolution
C:\Users[user]\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Sorcar-master\nodes\selection\ScSelectRandom.py
import bpy
from bpy.props import EnumProperty, IntProperty, FloatProperty
from bpy.types import Node
from .._base.node_base import ScNode
from .._base.node_selection import ScSelectionNode
class ScSelectRandom(Node, ScSelectionNode):
bl_idname = "ScSelectRandom"
bl_label = "Select Random"
#in_percent: FloatProperty(default=50.0, min=0.0, max=100.0, update=ScNode.update_value)
in_ratio: FloatProperty(default=0.5, min=0.0, max=1.0, update=ScNode.update_value)
in_seed: IntProperty(default=0, min=0, update=ScNode.update_value)
in_action: EnumProperty(items=[("SELECT", "Select", ""), ("DESELECT", "Deselect", "")], default="SELECT", update=ScNode.update_value)
def init(self, context):
super().init(context)
#self.inputs.new("ScNodeSocketNumber", "Percent").init("in_percent", True)
self.inputs.new("ScNodeSocketNumber", "Ratio").init("in_ratio", True)
self.inputs.new("ScNodeSocketNumber", "Seed").init("in_seed", True)
self.inputs.new("ScNodeSocketString", "Action").init("in_action", True)
def error_condition(self):
return(
super().error_condition()
#or (self.inputs["Percent"].default_value < 0 or self.inputs["Percent"].default_value > 100)
or (self.inputs["Ratio"].default_value < 0 or self.inputs["Ratio"].default_value > 1)
or self.inputs["Seed"].default_value < 0
or (not self.inputs["Action"].default_value in ["SELECT", "DESELECT"])
)
def functionality(self):
bpy.ops.mesh.select_random(
#percent = self.inputs["Percent"].default_value,
ratio = self.inputs["Ratio"].default_value,
seed = int(self.inputs["Seed"].default_value),
action = self.inputs["Action"].default_value
)
from sorcar.
Getting this error in blender 3.1.2 and sorcar 3.2.1
OS: Windows
from sorcar.
Related Issues (20)
- [BUG] modifier fail in 2.90 HOT 3
- [BUG] ScQuadriFlowRemesh failure after 2.83 HOT 2
- [BUG] Fatal Crash HOT 1
- [BUG] Select Linked Faces by Angle crash when you put a node after
- Grabbing mesh elements HOT 1
- [BUG] HOT 3
- [BUG] Output node not working
- [BUG]Bevel Is not working HOT 1
- [BUG]Bevel and displace not working HOT 4
- Issue with a modifier
- add geometry not working for me [BUG] HOT 3
- [BUG] Rotate in (Local Transform) node in Blender 2.91 hides object, working only on X value in 2.83.1 and not working at all in 2.93 HOT 1
- Can't preview a Bevel
- [BUG] Custom Object does not duplicate object if the custom object is in a hidden collection
- [BUG] Bunch of unsafe evals in code HOT 1
- [BUG]
- [BUG] Cannot create Groups if there are links going in or out of the new Group. HOT 5
- [BUG] SmoothModifier.iterations expected an int type, not float
- Examples in the paper 'Automatic Differentiable Procedural Modeling'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sorcar.