mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-08 21:37:34 +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
|
continue
|
||||||
if "IfcAnnotation/" in obj.name:
|
if "IfcAnnotation/" in obj.name:
|
||||||
new = bpy.context.scene.DocProperties.drawings.add()
|
new = bpy.context.scene.DocProperties.drawings.add()
|
||||||
new.name = obj.name.split("/")[1]
|
new.name = "/".join(obj.name.split("/")[1:])
|
||||||
new.camera = obj
|
new.camera = obj
|
||||||
return {"FINISHED"}
|
return {"FINISHED"}
|
||||||
|
|
||||||
|
|||||||
@@ -99,9 +99,11 @@ def updateDrawingName(self, context):
|
|||||||
return
|
return
|
||||||
if self.camera.name == self.name:
|
if self.camera.name == self.name:
|
||||||
return
|
return
|
||||||
self.camera.name = "IfcGroup/{}".format(self.name)
|
self.camera.name = "IfcAnnotation/{}".format(self.name)
|
||||||
self.camera.users_collection[0].name = self.camera.name
|
unique_name = "/".join(self.camera.name.split("/")[1:])
|
||||||
self.name = 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):
|
def refreshActiveDrawingIndex(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user