From 7db265ec615898d3d2ceb83a5f201e86e08007f0 Mon Sep 17 00:00:00 2001 From: Simon Thommes Date: Tue, 26 Nov 2024 12:48:48 +0100 Subject: [PATCH 1/2] - add warnings for mirrored surface and grease pencil when toggling deformable --- scripts-blender/addons/brushstroke_tools/ops.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/scripts-blender/addons/brushstroke_tools/ops.py b/scripts-blender/addons/brushstroke_tools/ops.py index 062d2eaf..d729c81f 100644 --- a/scripts-blender/addons/brushstroke_tools/ops.py +++ b/scripts-blender/addons/brushstroke_tools/ops.py @@ -699,6 +699,13 @@ class BSBST_OT_switch_deformable(bpy.types.Operator): def execute(self, context): settings = context.scene.BSBST_settings + if self.deformable: + surf_ob = utils.get_active_context_surface_object(context) + if surf_ob: + for mod in surf_ob.modifiers: + if mod.type == 'MIRROR': + self.report({"WARNING"}, "Surface Objects with mirror modifier cannot properly support stable deformation. Apply the mirror modifier to proceed.") + if self.switch_all: bs_objects = [bpy.data.objects.get(bs.name) for bs in settings.context_brushstrokes] bs_objects = [bs for bs in bs_objects if bs] @@ -708,6 +715,10 @@ class BSBST_OT_switch_deformable(bpy.types.Operator): return {"CANCELLED"} for ob in bs_objects: + if self.deformable: + if utils.compare_versions(bpy.app.version, (5,0,0)) < 0: # TODO adjust for when GP supports node tool execution + if ob.type == 'GREASEPENCIL': + self.report({"WARNING"}, "Grease Pencil does not currently support drawing on deformable surface geometry.") set_brushstrokes_deformable(ob, self.deformable) context.view_layer.depsgraph.update() -- 2.30.2 From 68297e6d30cdfad42893a3be170a423786cb4a57 Mon Sep 17 00:00:00 2001 From: Simon Thommes Date: Tue, 26 Nov 2024 12:53:04 +0100 Subject: [PATCH 2/2] - update changelog --- scripts-blender/addons/brushstroke_tools/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts-blender/addons/brushstroke_tools/CHANGELOG.md b/scripts-blender/addons/brushstroke_tools/CHANGELOG.md index 6fbe7742..cb6c232e 100644 --- a/scripts-blender/addons/brushstroke_tools/CHANGELOG.md +++ b/scripts-blender/addons/brushstroke_tools/CHANGELOG.md @@ -4,6 +4,7 @@ - subpanel compatibility in preparation for Blender 4.4 (#347) - track `brush_stroke.curve_parameter` attribute on original curves for draw layers (#349) - add `Taper Shift` parameter to draw layers (#349) +- warnings when toggling deformable (mirrored surface/grease pencil) (#357) ## 1.0.4 - 2024-11-11 -- 2.30.2