mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-20 23:36:20 +00:00
Fix IfcGridAxis unlock not working in IFC4X3
In IFC4X3, IfcGrid is a subtype of IfcPositioningElement, but IfcGridAxis is not. The unlock handler only fetched IfcPositioningElement instances, so grid axes were never unlocked and remained immovable. Fix: include IfcGridAxis in the element list for the IFC4X3 (non-IFC2X3/IFC4) branch of update_grid_is_locked.
This commit is contained in:
@@ -128,7 +128,7 @@ def update_grid_is_locked(self: "BIMGridProperties", context: bpy.types.Context)
|
|||||||
if tool.Ifc.get().schema in ("IFC2X3", "IFC4"):
|
if tool.Ifc.get().schema in ("IFC2X3", "IFC4"):
|
||||||
elements = tool.Ifc.get().by_type("IfcGrid") + tool.Ifc.get().by_type("IfcGridAxis")
|
elements = tool.Ifc.get().by_type("IfcGrid") + tool.Ifc.get().by_type("IfcGridAxis")
|
||||||
else:
|
else:
|
||||||
elements = tool.Ifc.get().by_type("IfcPositioningElement")
|
elements = tool.Ifc.get().by_type("IfcPositioningElement") + tool.Ifc.get().by_type("IfcGridAxis")
|
||||||
for element in elements:
|
for element in elements:
|
||||||
if obj := tool.Ifc.get_object(element):
|
if obj := tool.Ifc.get_object(element):
|
||||||
if self.is_locked:
|
if self.is_locked:
|
||||||
|
|||||||
Reference in New Issue
Block a user