fixing errors running tests if no tool selected in blender startup file

Error was: AttributeError: 'NoneType' object has no attribute 'idname'
This commit is contained in:
Andrej730
2023-06-29 17:19:09 +05:00
parent 34d44c9e7c
commit 2b3a7ba30c
+2 -2
View File
@@ -98,8 +98,8 @@ def update_bim_tool_props():
if not obj:
return
mode = bpy.context.mode
current_tool = bpy.context.workspace.tools.from_space_view3d_mode(mode).idname
if current_tool != "bim.bim_tool":
current_tool = bpy.context.workspace.tools.from_space_view3d_mode(mode)
if not current_tool or current_tool.idname != "bim.bim_tool":
return
element = tool.Ifc.get_entity(obj)
if not element: