fix new collection not being added in scene

This commit is contained in:
pullusb
2024-07-08 12:25:18 +02:00
parent 129ecb72cf
commit d0a413b4bf
2 changed files with 5 additions and 2 deletions
+4 -1
View File
@@ -348,7 +348,10 @@ class BPM_OT_create_and_place_in_camera(Operator):
l = gp_data.layers.new('GP_Layer')
l.frames.new(context.scene.frame_current)
core.set_collection(ob, 'GP') # Gpencils
gp_col = core.set_collection(ob, 'GP') # Gpencils
## Add Collection to current scene
if not gp_col in context.scene.collection.children_recursive:
context.scene.collection.children.link(gp_col)
# Add to bg_plane collection
new_item = context.scene.bg_props.planes.add()