Revert "Always show edit UI even if you don't have a BIM Tool activated."

This reverts commit 87bfd182d7.
This commit is contained in:
Dion Moult
2025-10-22 11:08:55 +11:00
parent 87bfd182d7
commit 008292df0f
2 changed files with 7 additions and 14 deletions
@@ -265,7 +265,6 @@ def register():
type=prop.BIMExternalParametricGeometryProperties
)
bpy.types.VIEW3D_HT_tool_header.prepend(workspace.workspace_settings)
bpy.types.VIEW3D_MT_add.prepend(ui.add_menu)
bpy.app.handlers.load_post.append(handler.load_post)
@@ -98,24 +98,18 @@ class BimTool(WorkSpaceTool):
def draw_settings(
cls, context: bpy.types.Context, layout: bpy.types.UILayout, ws_tool: bpy.types.WorkSpaceTool
) -> None:
props = tool.Geometry.get_geometry_props()
ifc_element_type = None if cls.ifc_element_type == "all" else cls.ifc_element_type
if tool.Geometry.get_geometry_props().mode == "ITEM":
pass
elif context.active_object and tool.Ifc.get_entity(context.active_object) and context.selected_objects:
pass
if props.mode == "ITEM":
EditItemUI.draw(context, layout)
elif (
active_ifc_object := (context.active_object and tool.Ifc.get_entity(context.active_object))
) and context.selected_objects:
EditObjectUI.draw(context, layout, ifc_element_type=ifc_element_type)
else:
CreateObjectUI.draw(context, layout, ifc_element_type=ifc_element_type)
def workspace_settings(self, context):
if not tool.Ifc.get():
return
if tool.Geometry.get_geometry_props().mode == "ITEM":
EditItemUI.draw(context, self.layout)
elif context.active_object and tool.Ifc.get_entity(context.active_object) and context.selected_objects:
EditObjectUI.draw(context, self.layout)
class WallTool(BimTool):
bl_space_type = "VIEW_3D"
bl_context_mode = "OBJECT"