Takanu / Capsule

(Blender 4.1) Universal batch export manager
https://takanu.itch.io/capsule-blender-addon
GNU General Public License v3.0
191 stars 12 forks source link

In `Edit Mode`, clicking `Create Capsule Data` throws error #34

Closed seruminar closed 2 years ago

seruminar commented 2 years ago

In Edit Mode, clicking Create Capsule Data throws error:

Python: Traceback (most recent call last):
  File "C:\Users\<SNIP>\AppData\Roaming\Blender Foundation\Blender\3.1\scripts\addons\Capsule\ui_operators.py", line 537, in execute
    bpy.ops.object.select_all(action='DESELECT')
  File "C:\<SNIP>\Blender 3.1\3.1\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect

location: <unknown location>:-1

This is fixed by switching to Object Mode and trying again, however it's a bit obscure what's going on and why it's failing.

Takanu commented 2 years ago

Thanks for the catch! Since the "Create Capsule Data" operation is so important I'll make sure it's implemented in a context-sensitive way rather than locking it to Object Mode. I'll try and get this fixed for the next update.

Takanu commented 2 years ago

The issue has been fixed, it'll be part of the next version 👍

seruminar commented 2 years ago

Excellent, thank you!