mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
Fix purging types in the type manager not working. The purge button is now in a menu for a cleaner interface and avoiding accidentally clicking on it when opening the type manager.
This commit is contained in:
@@ -135,6 +135,7 @@ classes = (
|
|||||||
ui.BIM_PT_door,
|
ui.BIM_PT_door,
|
||||||
ui.BIM_PT_railing,
|
ui.BIM_PT_railing,
|
||||||
ui.BIM_PT_roof,
|
ui.BIM_PT_roof,
|
||||||
|
ui.BIM_MT_type_manager_menu,
|
||||||
ui.LaunchTypeManager,
|
ui.LaunchTypeManager,
|
||||||
ui.BIM_MT_model,
|
ui.BIM_MT_model,
|
||||||
grid.BIM_OT_add_object,
|
grid.BIM_OT_add_object,
|
||||||
|
|||||||
@@ -40,6 +40,15 @@ from bonsai.bim.helper import prop_with_search
|
|||||||
from collections.abc import Iterable
|
from collections.abc import Iterable
|
||||||
|
|
||||||
|
|
||||||
|
class BIM_MT_type_manager_menu(bpy.types.Menu):
|
||||||
|
bl_label = "Type Manager Menu"
|
||||||
|
bl_idname = "BIM_MT_type_manager_menu"
|
||||||
|
|
||||||
|
def draw(self, context):
|
||||||
|
layout = self.layout
|
||||||
|
layout.operator("bim.purge_unused_objects", text="Purge Unused Types", icon="TRASH").object_type = "TYPE"
|
||||||
|
|
||||||
|
|
||||||
class LaunchTypeManager(bpy.types.Operator):
|
class LaunchTypeManager(bpy.types.Operator):
|
||||||
bl_idname = "bim.launch_type_manager"
|
bl_idname = "bim.launch_type_manager"
|
||||||
bl_label = "Launch Type Manager"
|
bl_label = "Launch Type Manager"
|
||||||
@@ -69,6 +78,8 @@ class LaunchTypeManager(bpy.types.Operator):
|
|||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
prop_with_search(row, props, "type_class", text="", should_click_ok_to_validate=True)
|
prop_with_search(row, props, "type_class", text="", should_click_ok_to_validate=True)
|
||||||
|
|
||||||
|
row.menu("BIM_MT_type_manager_menu", text="", icon="PREFERENCES")
|
||||||
|
|
||||||
columns = self.layout.column_flow(columns=3)
|
columns = self.layout.column_flow(columns=3)
|
||||||
row = columns.row()
|
row = columns.row()
|
||||||
row.alignment = "LEFT"
|
row.alignment = "LEFT"
|
||||||
|
|||||||
Reference in New Issue
Block a user