fix new collection not being added in scene
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user