mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 02:47:48 +00:00
Lock all representation items that are not movable
Otherwise it was confusing that user can move item but when they exit item mode position was lost
This commit is contained in:
@@ -2357,7 +2357,7 @@ class ImportRepresentationItems(bpy.types.Operator, tool.Ifc.Operator):
|
||||
tool.Geometry.import_item(item_obj)
|
||||
tool.Geometry.import_item_attributes(item_obj)
|
||||
|
||||
if tool.Geometry.is_meshlike_item(item):
|
||||
if not tool.Geometry.is_movable(item):
|
||||
tool.Geometry.lock_object(item_obj)
|
||||
|
||||
tool.Root.reload_item_decorator()
|
||||
|
||||
@@ -842,6 +842,10 @@ class Geometry(bonsai.core.tool.Geometry):
|
||||
def is_meshlike_item(cls, item: ifcopenshell.entity_instance) -> bool:
|
||||
return item.is_a("IfcTessellatedItem") or item.is_a("IfcManifoldSolidBrep")
|
||||
|
||||
@classmethod
|
||||
def is_movable(cls, item: ifcopenshell.entity_instance) -> bool:
|
||||
return item.is_a("IfcSweptAreaSolid")
|
||||
|
||||
@classmethod
|
||||
def is_profile_based(cls, data: bpy.types.Mesh) -> bool:
|
||||
return data.BIMMeshProperties.subshape_type == "PROFILE"
|
||||
|
||||
Reference in New Issue
Block a user