aachman98 / Sorcar

Procedural modeling in Blender using Node Editor

Home Page:https://aachman98.itch.io/sorcar

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] modifier fail in 2.90

changkun opened this issue · comments

Describe the bug
In 2.90+, basic modifier execution can fail.

To Reproduce
Steps to reproduce the behavior:

  1. Add an Create Monkey node
  2. Add a Subdivision Surface Modifier
  3. Connect 1 to 2
  4. Click "Set Preview"

Expected behavior
A subdivided monkey shown in the viewport.

Desktop (please complete the following information):

  • OS: macOS
  • Blender Version 2.90.0
  • Sorcar Version [e.g. 3.1.0]

Additional context

location: <unknown location>:-1
  # Error
bpy.ops.node.add_search(use_transform=True, node_item='34')  # Operator
bpy.ops.mesh.primitive_monkey_add(size=2, calc_uvs=True, enter_editmode=False, align='WORLD', location=(0, 0, 0), scale=(1, 1, 1))  # Operator
bpy.ops.object.select_all(action='DESELECT')  # Operator
bpy.ops.object.modifier_add(type='SUBSURF')  # Operator
Traceback (most recent call last):
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/tree/ScNodeTree.py", line 48, in update
    self.execute_node()
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/tree/ScNodeTree.py", line 58, in execute_node
    if (not n.execute()):
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/nodes/_base/node_base.py", line 53, in execute
    if (self.init_in(forced)):
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/nodes/_base/node_base.py", line 64, in init_in
    if (not i.execute(forced)):
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/sockets/_base/socket_base.py", line 78, in execute
    if (from_socket and from_socket.execute(forced)):
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/sockets/_base/socket_base.py", line 65, in execute
    return self.node.execute(forced)
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/nodes/_base/node_base.py", line 57, in execute
    self.node_error = not self.init_out(self.post_execute())
  File "/Users/changkun/Library/Application Support/Blender/2.90/scripts/addons/sorcar/nodes/_base/node_modifier.py", line 28, in post_execute
    bpy.ops.object.modifier_apply(apply_as='DATA', modifier=self.prop_mod_name)
  File "/Applications/Blender.app/Contents/Resources/2.90/scripts/modules/bpy/ops.py", line 201, in __call__
    ret = op_call(self.idname_py(), None, kw)
TypeError: Converting py args to operator properties: : keyword "apply_as" unrecognized

I also get those errors for any modifier I added in Blender 2.90.1, add nodes:

  1. Create Cube
  2. Subdivision Modifier

errors appear.

Same operations working great in 2.83.7

@aachman98 ping for code review, see #180

Close because of no response.