Grim-es/material-combiner-addon

Disabling viewport on any object causes a context error

FlailingFog opened this issue · 0 comments

If you disable this toggle for an object in the outliner, it'll error out when you use the "Save atlas to..." button, even if the disabled object is not the one you want to combine materials on:
image

Here's the traceback:

  File "C:\Users\C\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\operators\combiner\combiner.py", line 45, in invoke
    set_ob_mode(context.view_layer if globs.version > 0 else scn)
  File "C:\Users\C\AppData\Roaming\Blender Foundation\Blender\3.0\scripts\addons\material-combiner-addon-master\operators\combiner\combiner_ops.py", line 46, in set_ob_mode
    bpy.ops.object.mode_set(mode='OBJECT')
  File "C:\Users\C\Downloads\blender-3.0.1-windows-x64\3.0\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() Context missing active object

location: <unknown location>:-1