mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +00:00
Object names now guard against duplicate IFC prefixes when assigning.
This commit is contained in:
@@ -79,3 +79,10 @@ class Root(blenderbim.core.tool.Root):
|
|||||||
ifc_representation_class=ifc_representation_class,
|
ifc_representation_class=ifc_representation_class,
|
||||||
profile_set_usage=profile_set_usage,
|
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)
|
||||||
|
|||||||
Reference in New Issue
Block a user