mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-19 22:50:21 +00:00
don't allow editing LAYER2 objects.
This commit is contained in:
@@ -2544,7 +2544,6 @@ class OverrideModeSetObject(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
props.is_changing_mode = False
|
props.is_changing_mode = False
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class DirectProfileEdit(bpy.types.Operator, tool.Ifc.Operator):
|
class DirectProfileEdit(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
bl_idname = "bim.direct_profile_edit"
|
bl_idname = "bim.direct_profile_edit"
|
||||||
bl_label = "IFC Direct Profile Edit"
|
bl_label = "IFC Direct Profile Edit"
|
||||||
@@ -2615,6 +2614,12 @@ class DirectProfileEdit(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
self.report({"ERROR"}, "Active object is not an IFC element")
|
self.report({"ERROR"}, "Active object is not an IFC element")
|
||||||
return {"CANCELLED"}
|
return {"CANCELLED"}
|
||||||
|
|
||||||
|
# Check if this is a LAYER2 element (wall, railing, etc.)
|
||||||
|
material_usage = tool.Model.get_usage_type(element)
|
||||||
|
if material_usage == "LAYER2":
|
||||||
|
self.report({"ERROR"}, "LAYER2 elements (walls, railings, etc.) cannot use profile editing.")
|
||||||
|
return {"CANCELLED"}
|
||||||
|
|
||||||
representation = tool.Geometry.get_active_representation(obj)
|
representation = tool.Geometry.get_active_representation(obj)
|
||||||
if not representation:
|
if not representation:
|
||||||
self.report({"ERROR"}, "Object has no active representation")
|
self.report({"ERROR"}, "Object has no active representation")
|
||||||
@@ -2678,7 +2683,6 @@ class DirectProfileEdit(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
|
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
class FlipObject(bpy.types.Operator):
|
class FlipObject(bpy.types.Operator):
|
||||||
bl_idname = "bim.flip_object"
|
bl_idname = "bim.flip_object"
|
||||||
bl_label = "Flip Object"
|
bl_label = "Flip Object"
|
||||||
|
|||||||
Reference in New Issue
Block a user