Object names now guard against duplicate IFC prefixes when assigning.

This commit is contained in:
Dion Moult
2022-01-30 15:06:01 +11:00
parent 538024e035
commit 116252f857
+7
View File
@@ -79,3 +79,10 @@ class Root(blenderbim.core.tool.Root):
ifc_representation_class=ifc_representation_class,
profile_set_usage=profile_set_usage,
)
@classmethod
def set_object_name(cls, obj, element):
name = obj.name
if "/" in name and name.split("/")[0][0:3] == "Ifc":
name = "/".join(name.split("/")[1:])
obj.name = "{}/{}".format(element.is_a(), name)