Update src/blenderbim/blenderbim/bim/module/model/array.py

Co-authored-by: Bruno Perdigão <57102715+brunoperdigao@users.noreply.github.com>
This commit is contained in:
Ryan Schultz
2024-05-28 11:02:09 -05:00
committed by GitHub
parent 66cf06c990
commit bf27e41275
@@ -89,7 +89,11 @@ class EnableEditingArray(bpy.types.Operator, tool.Ifc.Operator):
if relating_obj:
element = tool.Ifc.get_entity(relating_obj)
data = json.loads(ifcopenshell.util.element.get_pset(element, "BBIM_Array", "Data"))[self.item]
parent_globalid = ifcopenshell.util.element.get_pset(element, "BBIM_Array", "Parent")
parent_element = tool.Ifc.get().by_guid(parent_globalid)
data = json.loads(ifcopenshell.util.element.get_pset(parent_element, "BBIM_Array", "Data"))[self.item]
else:
data = json.loads(ifcopenshell.util.element.get_pset(element, "BBIM_Array", "Data"))[self.item]
props.count = data["count"]
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
props.x = data["x"] * si_conversion