drawing.create_camera not to assign camera to the scene collection

Noticed that added drawing camera was linked to the scene collection and after collector.assign it was linked to the 2 collections instead of just 1 - it's own drawing collection and the scene collection.
This commit is contained in:
Andrej730
2024-08-22 18:29:27 +05:00
parent cabffdc549
commit e9b4b6560e
2 changed files with 1 additions and 2 deletions
-1
View File
@@ -265,7 +265,6 @@ class Drawing(bonsai.core.tool.Drawing):
else:
camera.data.BIMCameraProperties.diagram_scale = "1:100|1/100"
camera.matrix_world = matrix
bpy.context.scene.collection.objects.link(camera)
return camera
@classmethod
+1 -1
View File
@@ -61,7 +61,7 @@ class TestCreateCamera(NewFile):
assert obj.data.type == "PERSP"
assert obj.data.ortho_scale == 50
assert obj.data.clip_end == 10
assert obj.users_collection[0] == bpy.context.scene.collection
assert obj.users_collection == tuple()
class TestCreateSvgSheet(NewFile):