przemir / ApplyModifierForObjectWithShapeKeys

Blender script
MIT License
240 stars 34 forks source link

Getting RuntimeError "Contenxt is incorrect.". Facing this issue while applying the "triangulate" modifier. #30

Closed Lovepreet94 closed 3 weeks ago

Lovepreet94 commented 1 month ago

Python: Traceback (most recent call last): File "C:\Users\Lavi\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\ApplyModifierForObjectWithShapeKeys.py", line 260, in execute success, errorInfo = applyModifierForObjectWithShapeKeys(context, selectedModifiers, self.disable_armatures) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\Lavi\AppData\Roaming\Blender Foundation\Blender\4.1\scripts\addons\ApplyModifierForObjectWithShapeKeys.py", line 149, in applyModifierForObjectWithShapeKeys bpy.ops.object.shape_key_remove() File "C:\Program Files\Blender Foundation\Blender 4.1\4.1\scripts\modules\bpy\ops.py", line 109, in __call__ ret = _op_call(self.idname_py(), kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ RuntimeError: Operator bpy.ops.object.shape_key_remove.poll() failed, context is incorrect

przemir commented 1 month ago

I cannot reproduce this error on Blender 4.02, 4.1 and 4.2 .

Lovepreet94 commented 1 month ago

Resolved: My fault! I applied the shape key with the cursor outside the 3D viewport. Make sure you're in the 3D viewport when running the add-on.