CreativeDesigner3D / Library_Home_Builder

A PyClone Blender asset library designed to help with architectural and interior design
GNU General Public License v3.0
107 stars 18 forks source link

Cancelling placing Square Room asset, causes referencing error when trying to place after #73

Open onceadrog opened 2 years ago

onceadrog commented 2 years ago

Cancelling placement of Square Room doesn't actually cancel it properly, elements are still placed, but badly referenced.

Steps to reproduce:

Error: Python: Traceback (most recent call last):
  File "C:\Users\Mike\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\PyClone-master\ops\pc_window_manager.py", line 32, in execute
    eval('bpy.ops.' + lib.drop_id + '("INVOKE_DEFAULT",filepath=path)')
  File "<string>", line 1, in <module>
  File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py", line 130, in __call__
    ret = _op_call(self.idname_py(), C_dict, kw, C_exec, C_undo)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\Mike\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Library_Home_Builder-master\home_builder_drop_ops.py", line 90, in execute
    bpy.ops.home_builder.place_room(filepath=self.filepath)
  File "C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py", line 132, in __call__
    ret = _op_call(self.idname_py(), None, kw)
RuntimeError: Error: Python: Traceback (most recent call last):
  File "C:\Users\Mike\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Library_Home_Builder-master\home_builder_drop_ops.py", line 169, in execute    self.get_object(context)
  File "C:\Users\Mike\AppData\Roaming\Blender Foundation\Blender\2.93\scripts\addons\Library_Home_Builder-master\home_builder_drop_ops.py", line 198, in get_object
    empty.hide_viewport = True
ReferenceError: StructRNA of type Object has been removed

location: C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py:132

location: C:\Program Files\Blender Foundation\Blender 2.93\2.93\scripts\modules\bpy\ops.py:130

location: <unknown location>:-1
CreativeDesigner3D commented 2 years ago

Thanks for the information. I will have this fixed in the next release.

onceadrog commented 2 years ago

Yeah, I see the wall drop ops isn't set up to handle the special case of the square room, like it does with simple wall. And the cancelled placement doesn't seem visible to Blender for Undo, so restarting Blender is only fix.

Workaround: Do not right click to cancel, place and then delete instead.