From eec1d3c5014e342f6948e831d1b374be7181f2b1 Mon Sep 17 00:00:00 2001 From: pullusb Date: Mon, 15 Jul 2024 15:53:44 +0200 Subject: [PATCH] remove interpolation plane when using scene geometry raycasts --- __init__.py | 2 +- interpolate_strokes/operators.py | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index a144d39..e3176b0 100755 --- a/__init__.py +++ b/__init__.py @@ -1,7 +1,7 @@ bl_info = { "name": "gp interpolate", "author": "Christophe Seux, Samuel Bernou", - "version": (0, 7, 2), + "version": (0, 7, 3), "blender": (3, 6, 0), "location": "Sidebar > Gpencil Tab > Interpolate", "description": "Interpolate Grease pencil strokes over 3D", diff --git a/interpolate_strokes/operators.py b/interpolate_strokes/operators.py index df7a98b..c4082b8 100644 --- a/interpolate_strokes/operators.py +++ b/interpolate_strokes/operators.py @@ -197,6 +197,12 @@ class GP_OT_interpolate_stroke(bpy.types.Operator): target_obj = self.plane elif self.settings.method == 'GEOMETRY': + ## Remove interpolation_plane collection ! (unseen, but can be hit) + if interp_plane := bpy.data.objects.get('interpolation_plane'): + bpy.data.objects.remove(interp_plane) + if interp_col := bpy.data.collections.get('interpolation_tool'): + bpy.data.collections.remove(interp_col) + if col != context.scene.collection: included_cols.append(col.name) ## Maybe include a plane just behind geo ? probably bad idea