From f35fbb95b8d736fa88e801e372960a077506cb07 Mon Sep 17 00:00:00 2001 From: "s.martinez" Date: Tue, 24 Jun 2025 17:59:53 +0200 Subject: [PATCH 1/2] fix: shape geometry link behavior. Before the patch, shapes were systematically linked to the scene's main collection, regardless of the collection selection. The patch changes this to link geometry only if no canvas collection is selected. --- operators/shape.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/operators/shape.py b/operators/shape.py index b86e3dd..6320acf 100644 --- a/operators/shape.py +++ b/operators/shape.py @@ -48,11 +48,10 @@ class RP_OT_create_shape(Operator): mesh.from_pydata(verts, edges, faces) - for col in bpy.data.collections: - if col.rig_picker.link_shape: - col.objects.link(ob) - else: - scn.collection.objects.link(ob) + picker_cols = [col for col in bpy.data.collections if col.rig_picker.link_shape] + + for col in picker_cols or [scn.collection]: + col.objects.link(ob) ob.location.z = 0.05 ob.location.x = offset From 21c4fe2117d60a2895793eb0080c75a70e007e21 Mon Sep 17 00:00:00 2001 From: "s.martinez" Date: Tue, 24 Jun 2025 18:08:40 +0200 Subject: [PATCH 2/2] clean: change typo --- operators/shape.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/operators/shape.py b/operators/shape.py index 6320acf..a8861ce 100644 --- a/operators/shape.py +++ b/operators/shape.py @@ -48,9 +48,9 @@ class RP_OT_create_shape(Operator): mesh.from_pydata(verts, edges, faces) - picker_cols = [col for col in bpy.data.collections if col.rig_picker.link_shape] + picker_selected_cols = [col for col in bpy.data.collections if col.rig_picker.link_shape] - for col in picker_cols or [scn.collection]: + for col in picker_selected_cols or [scn.collection]: col.objects.link(ob) ob.location.z = 0.05