mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 06:39:13 +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.is_loaded = True
|
||||||
cls.data = {
|
cls.data = {
|
||||||
"is_loaded": cls.get_is_loaded(),
|
"is_loaded": cls.get_is_loaded(),
|
||||||
"relations": cls.relations(),
|
"active_relations": cls.active_relations(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -49,7 +49,7 @@ class BrickschemaData:
|
|||||||
return BrickStore.graph is not None
|
return BrickStore.graph is not None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def relations(cls):
|
def active_relations(cls):
|
||||||
if BrickStore.graph is None:
|
if BrickStore.graph is None:
|
||||||
return []
|
return []
|
||||||
props = bpy.context.scene.BIMBrickProperties
|
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")
|
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)
|
row = self.layout.row(align=True)
|
||||||
col = row.column()
|
col = row.column()
|
||||||
col.alignment = "RIGHT"
|
col.alignment = "RIGHT"
|
||||||
@@ -134,7 +134,7 @@ class BIM_PT_brickschema(Panel):
|
|||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.label(text="Failed to find this entity!", icon="ERROR")
|
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 = self.layout.row(align=True)
|
||||||
row.label(text=relation["predicate_name"])
|
row.label(text=relation["predicate_name"])
|
||||||
row.label(text=relation["object_name"])
|
row.label(text=relation["object_name"])
|
||||||
|
|||||||
Reference in New Issue
Block a user