mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 09:21:46 +00:00
Change BrickschemaData.relations to BrickschemaData.active_relations
This commit is contained in:
@@ -41,7 +41,7 @@ class BrickschemaData:
|
||||
cls.is_loaded = True
|
||||
cls.data = {
|
||||
"is_loaded": cls.get_is_loaded(),
|
||||
"relations": cls.relations(),
|
||||
"active_relations": cls.active_relations(),
|
||||
}
|
||||
|
||||
@classmethod
|
||||
@@ -49,7 +49,7 @@ class BrickschemaData:
|
||||
return BrickStore.graph is not None
|
||||
|
||||
@classmethod
|
||||
def relations(cls):
|
||||
def active_relations(cls):
|
||||
if BrickStore.graph is None:
|
||||
return []
|
||||
props = bpy.context.scene.BIMBrickProperties
|
||||
|
||||
@@ -106,7 +106,7 @@ class BIM_PT_brickschema(Panel):
|
||||
|
||||
self.layout.template_list("BIM_UL_bricks", "", self.props, "bricks", self.props, "active_brick_index")
|
||||
|
||||
if BrickschemaData.data["relations"]:
|
||||
if BrickschemaData.data["active_relations"]:
|
||||
row = self.layout.row(align=True)
|
||||
col = row.column()
|
||||
col.alignment = "RIGHT"
|
||||
@@ -134,7 +134,7 @@ class BIM_PT_brickschema(Panel):
|
||||
row = self.layout.row(align=True)
|
||||
row.label(text="Failed to find this entity!", icon="ERROR")
|
||||
|
||||
for relation in BrickschemaData.data["relations"]:
|
||||
for relation in BrickschemaData.data["active_relations"]:
|
||||
row = self.layout.row(align=True)
|
||||
row.label(text=relation["predicate_name"])
|
||||
row.label(text=relation["object_name"])
|
||||
|
||||
Reference in New Issue
Block a user