Move Brick list root setting

This commit is contained in:
rileywong311
2023-08-02 13:35:45 -07:00
parent d5159be571
commit eea577d463
2 changed files with 7 additions and 4 deletions
@@ -78,6 +78,7 @@ class BIMBrickProperties(PropertyGroup):
bricks: CollectionProperty(name="Bricks", type=Brick)
active_brick_index: IntProperty(name="Active Brick Index", update=update_active_brick_index)
libraries: EnumProperty(name="Libraries", items=get_libraries)
set_list_root_toggled: BoolProperty(name="Set List Root Toggled", default=False)
brick_list_root: EnumProperty(name="Brick List Root", items=get_brick_roots)
# namespace manager
namespace: EnumProperty(name="Namespace", items=get_namespaces)
@@ -76,10 +76,6 @@ class BIM_PT_brickschema(Panel):
row.prop(data=self.props, property="new_brick_namespace_uri", text="")
row.operator("bim.add_brick_namespace", text="", icon="ADD")
row = box.row(align=True)
row.operator("bim.set_brick_list_root", text="Set View")
row.prop(data=self.props, property="brick_list_root", text="")
row = self.layout.row(align=True)
row.label(text="Create Entity:")
@@ -103,6 +99,12 @@ class BIM_PT_brickschema(Panel):
row = self.layout.row(align=True)
row.label(text=self.props.active_brick_class)
row.prop(data=self.props, property="set_list_root_toggled", text="", icon="OUTLINER")
if self.props.set_list_root_toggled:
row = self.layout.row(align=True)
row.operator("bim.set_brick_list_root", text="Set View")
row.prop(data=self.props, property="brick_list_root", text="")
self.layout.template_list("BIM_UL_bricks", "", self.props, "bricks", self.props, "active_brick_index")