mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-12 18:43:26 +00:00
Fix bug where Blender name wouldn't match IFC Name when reassigning class. See #1902.
This commit is contained in:
@@ -70,7 +70,7 @@ class Loader:
|
||||
surface.InnerBoundaries = ()
|
||||
shape = ifcopenshell.geom.create_shape(self.settings, surface)
|
||||
mesh = self.ifc_importer.create_mesh(None, shape)
|
||||
obj = bpy.data.objects.new(f"{boundary.is_a()}/{boundary_id}", mesh)
|
||||
obj = bpy.data.objects.new(f"{boundary.is_a()}/{boundary.Name}", mesh)
|
||||
obj.matrix_world = blender_space.matrix_world
|
||||
boundaries_collection = get_boundaries_collection(blender_space)
|
||||
boundaries_collection.objects.link(obj)
|
||||
|
||||
@@ -106,7 +106,7 @@ class ReassignClass(bpy.types.Operator):
|
||||
"predefined_type": predefined_type,
|
||||
},
|
||||
)
|
||||
obj.name = "{}/{}".format(product.is_a(), "/".join(obj.name.split("/")[1:]))
|
||||
obj.name = "{}/{}".format(product.is_a(), getattr(product, "Name", "None"))
|
||||
IfcStore.link_element(product, obj)
|
||||
obj.BIMObjectProperties.is_reassigning_class = False
|
||||
return {"FINISHED"}
|
||||
|
||||
Reference in New Issue
Block a user