mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
Rename Brick "attributes" to "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(),
|
||||||
"attributes": cls.attributes(),
|
"relations": cls.relations(),
|
||||||
}
|
}
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
@@ -49,7 +49,7 @@ class BrickschemaData:
|
|||||||
return BrickStore.graph is not None
|
return BrickStore.graph is not None
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def attributes(cls):
|
def relations(cls):
|
||||||
if BrickStore.graph is None:
|
if BrickStore.graph is None:
|
||||||
return []
|
return []
|
||||||
props = bpy.context.scene.BIMBrickProperties
|
props = bpy.context.scene.BIMBrickProperties
|
||||||
|
|||||||
@@ -107,16 +107,16 @@ 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")
|
||||||
|
|
||||||
for attribute in BrickschemaData.data["attributes"]:
|
for relation in BrickschemaData.data["relations"]:
|
||||||
row = self.layout.row(align=True)
|
row = self.layout.row(align=True)
|
||||||
row.label(text=attribute["predicate"])
|
row.label(text=relation["predicate"])
|
||||||
row.label(text=attribute["object"])
|
row.label(text=relation["object"])
|
||||||
if attribute["is_uri"]:
|
if relation["is_uri"]:
|
||||||
op = row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT")
|
op = row.operator("bim.view_brick_item", text="", icon="DISCLOSURE_TRI_RIGHT")
|
||||||
op.item = attribute["object_uri"]
|
op.item = relation["object_uri"]
|
||||||
if attribute["is_globalid"]:
|
if relation["is_globalid"]:
|
||||||
op = row.operator("bim.select_global_id", icon="RESTRICT_SELECT_OFF", text="")
|
op = row.operator("bim.select_global_id", icon="RESTRICT_SELECT_OFF", text="")
|
||||||
op.global_id = attribute["object"]
|
op.global_id = relation["object"]
|
||||||
|
|
||||||
|
|
||||||
class BIM_PT_ifc_brickschema_references(Panel):
|
class BIM_PT_ifc_brickschema_references(Panel):
|
||||||
|
|||||||
@@ -375,7 +375,6 @@ class BrickStore:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def load_entity_classes(cls):
|
def load_entity_classes(cls):
|
||||||
|
|
||||||
for root_class in BrickStore.root_classes:
|
for root_class in BrickStore.root_classes:
|
||||||
query = BrickStore.graph.query(
|
query = BrickStore.graph.query(
|
||||||
"""
|
"""
|
||||||
|
|||||||
Reference in New Issue
Block a user