mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-09 17:31:45 +00:00
Fix #1491. Bug where drawings couldn't have a slash in their names.
This commit is contained in:
@@ -1059,7 +1059,7 @@ class RefreshDrawingList(bpy.types.Operator):
|
||||
continue
|
||||
if "IfcAnnotation/" in obj.name:
|
||||
new = bpy.context.scene.DocProperties.drawings.add()
|
||||
new.name = obj.name.split("/")[1]
|
||||
new.name = "/".join(obj.name.split("/")[1:])
|
||||
new.camera = obj
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
@@ -99,9 +99,11 @@ def updateDrawingName(self, context):
|
||||
return
|
||||
if self.camera.name == self.name:
|
||||
return
|
||||
self.camera.name = "IfcGroup/{}".format(self.name)
|
||||
self.camera.users_collection[0].name = self.camera.name
|
||||
self.name = self.camera.name.split("/")[1]
|
||||
self.camera.name = "IfcAnnotation/{}".format(self.name)
|
||||
unique_name = "/".join(self.camera.name.split("/")[1:])
|
||||
self.camera.users_collection[0].name = "IfcGroup/{}".format(unique_name)
|
||||
if self.name != unique_name:
|
||||
self.name = unique_name
|
||||
|
||||
|
||||
def refreshActiveDrawingIndex(self, context):
|
||||
|
||||
Reference in New Issue
Block a user