WIP allow partial editing of spatial container. See #1222.

This commit is contained in:
Dion Moult
2021-01-04 15:57:12 +11:00
parent d9dbda6b5a
commit 23a66b3a72
8 changed files with 142 additions and 4 deletions
@@ -0,0 +1,18 @@
from blenderbim.bim.ifc import IfcStore
class Data:
products = {}
@classmethod
def load(cls, product_id):
file = IfcStore.get_file()
if not file:
return
product = file.by_id(product_id)
element = product.ContainedInStructure[0].RelatingStructure if product.ContainedInStructure else None
cls.products[product_id] = {
"type": element.is_a() if element else None,
"Name": element.Name if element else None,
"id": int(element.id()) if element else None
}