mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-28 19:27:10 +00:00
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:
@@ -88,24 +88,16 @@ class EnableEditingArray(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
relating_obj = props.relating_array_object
|
relating_obj = props.relating_array_object
|
||||||
|
|
||||||
if relating_obj:
|
if relating_obj:
|
||||||
relating_props = relating_obj.BIMArrayProperties
|
element = tool.Ifc.get_entity(relating_obj)
|
||||||
|
data = json.loads(ifcopenshell.util.element.get_pset(element, "BBIM_Array", "Data"))[self.item]
|
||||||
props.count = relating_props.count
|
props.count = data["count"]
|
||||||
props.x = relating_props.x
|
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
|
||||||
props.y = relating_props.y
|
props.x = data["x"] * si_conversion
|
||||||
props.z = relating_props.z
|
props.y = data["y"] * si_conversion
|
||||||
props.use_local_space = relating_props.use_local_space
|
props.z = data["z"] * si_conversion
|
||||||
props.sync_children = relating_props.sync_children
|
props.use_local_space = data.get("use_local_space", False)
|
||||||
props.method = relating_props.method
|
props.sync_children = data.get("sync_children", False)
|
||||||
else:
|
props.method = data.get("method", "OFFSET")
|
||||||
data = json.loads(ifcopenshell.util.element.get_pset(element, "BBIM_Array", "Data"))[self.item]
|
|
||||||
si_conversion = ifcopenshell.util.unit.calculate_unit_scale(tool.Ifc.get())
|
|
||||||
props.x = data["x"] * si_conversion
|
|
||||||
props.y = data["y"] * si_conversion
|
|
||||||
props.z = data["z"] * si_conversion
|
|
||||||
props.use_local_space = data.get("use_local_space", False)
|
|
||||||
props.sync_children = data.get("sync_children", False)
|
|
||||||
props.method = data.get("method", "OFFSET")
|
|
||||||
|
|
||||||
props.is_editing = self.item
|
props.is_editing = self.item
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user