mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
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:
@@ -98,8 +98,8 @@ def update_bim_tool_props():
|
|||||||
if not obj:
|
if not obj:
|
||||||
return
|
return
|
||||||
mode = bpy.context.mode
|
mode = bpy.context.mode
|
||||||
current_tool = bpy.context.workspace.tools.from_space_view3d_mode(mode).idname
|
current_tool = bpy.context.workspace.tools.from_space_view3d_mode(mode)
|
||||||
if current_tool != "bim.bim_tool":
|
if not current_tool or current_tool.idname != "bim.bim_tool":
|
||||||
return
|
return
|
||||||
element = tool.Ifc.get_entity(obj)
|
element = tool.Ifc.get_entity(obj)
|
||||||
if not element:
|
if not element:
|
||||||
|
|||||||
Reference in New Issue
Block a user