mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 14:41:25 +00:00
Revert "Always show edit UI even if you don't have a BIM Tool activated."
This reverts commit 87bfd182d7.
This commit is contained in:
@@ -265,7 +265,6 @@ def register():
|
|||||||
type=prop.BIMExternalParametricGeometryProperties
|
type=prop.BIMExternalParametricGeometryProperties
|
||||||
)
|
)
|
||||||
|
|
||||||
bpy.types.VIEW3D_HT_tool_header.prepend(workspace.workspace_settings)
|
|
||||||
bpy.types.VIEW3D_MT_add.prepend(ui.add_menu)
|
bpy.types.VIEW3D_MT_add.prepend(ui.add_menu)
|
||||||
bpy.app.handlers.load_post.append(handler.load_post)
|
bpy.app.handlers.load_post.append(handler.load_post)
|
||||||
|
|
||||||
|
|||||||
@@ -98,24 +98,18 @@ class BimTool(WorkSpaceTool):
|
|||||||
def draw_settings(
|
def draw_settings(
|
||||||
cls, context: bpy.types.Context, layout: bpy.types.UILayout, ws_tool: bpy.types.WorkSpaceTool
|
cls, context: bpy.types.Context, layout: bpy.types.UILayout, ws_tool: bpy.types.WorkSpaceTool
|
||||||
) -> None:
|
) -> None:
|
||||||
|
props = tool.Geometry.get_geometry_props()
|
||||||
ifc_element_type = None if cls.ifc_element_type == "all" else cls.ifc_element_type
|
ifc_element_type = None if cls.ifc_element_type == "all" else cls.ifc_element_type
|
||||||
if tool.Geometry.get_geometry_props().mode == "ITEM":
|
if props.mode == "ITEM":
|
||||||
pass
|
EditItemUI.draw(context, layout)
|
||||||
elif context.active_object and tool.Ifc.get_entity(context.active_object) and context.selected_objects:
|
elif (
|
||||||
pass
|
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:
|
else:
|
||||||
CreateObjectUI.draw(context, layout, ifc_element_type=ifc_element_type)
|
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):
|
class WallTool(BimTool):
|
||||||
bl_space_type = "VIEW_3D"
|
bl_space_type = "VIEW_3D"
|
||||||
bl_context_mode = "OBJECT"
|
bl_context_mode = "OBJECT"
|
||||||
|
|||||||
Reference in New Issue
Block a user