mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-27 18:57:17 +00:00
fill userdefined type field during reassigning IFC class #4034
to avoid confusion
This commit is contained in:
@@ -67,8 +67,11 @@ class EnableReassignClass(bpy.types.Operator):
|
|||||||
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
element = self.file.by_id(obj.BIMObjectProperties.ifc_definition_id)
|
||||||
context.scene.BIMRootProperties.ifc_class = element.is_a()
|
context.scene.BIMRootProperties.ifc_class = element.is_a()
|
||||||
context.scene.BIMRootProperties.relating_class_object = None
|
context.scene.BIMRootProperties.relating_class_object = None
|
||||||
if hasattr(element, "PredefinedType") and element.PredefinedType:
|
if hasattr(element, "PredefinedType"):
|
||||||
context.scene.BIMRootProperties.ifc_predefined_type = element.PredefinedType
|
if element.PredefinedType:
|
||||||
|
context.scene.BIMRootProperties.ifc_predefined_type = element.PredefinedType
|
||||||
|
userdefined_type = ifcopenshell.util.element.get_predefined_type(element)
|
||||||
|
context.scene.BIMRootProperties.ifc_userdefined_type = userdefined_type or ""
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user