[Bf-blender-cvs] [7c04ef210e0] master: Fix T87263: Animation decorator not working on Grease Pencil Build modifier Factor value

Philipp Oeser noreply at git.blender.org
Wed Apr 7 18:46:55 CEST 2021


Commit: 7c04ef210e0e688956b416c3ccc6570b5330b4b3
Author: Philipp Oeser
Date:   Wed Apr 7 12:29:01 2021 +0200
Branches: master
https://developer.blender.org/rB7c04ef210e0e688956b416c3ccc6570b5330b4b3

Fix T87263: Animation decorator not working on Grease Pencil Build modifier Factor value

When having a checkbox and a value both in one row together with an
animation decorator it is questionable whether the decorator should act
on animating the checkbox or the corresponding value. At the moment,
usage in modifiers does not seem to be very consistent:

Here the animation decorator works for animating the checkbox:
- `Build` (greasepencil) > `Factor` (this was reported and is changed in
this patch to act on the value instead of the checkbox)
- `DataTransfer` > `Topology Mapping` > `Max Distance` (this I guess
should also act on the value instead of the checkbox)
- `Edge Split` > `Edge Angle` (questionable)
- `Mirror` > `Merge` (questionable)
- `Screw` > `Merge` (questionable)
- `Wireframe` > `Crease Edges` (questionable)

Here the animation decorator works for animating the value:
- `VertexWeightEdit` > `Group Add/Remove Threshold`
- `Decimate` > `Symmetry`

So in this patch only the behavior in the greasepencil Build modifier UI
is changed, since I think it is quite obvious that one would more often
use the decorator for animating the factor value than for animating the
checkbox.

Maniphest Tasks: T87263

Differential Revision: https://developer.blender.org/D10910

===================================================================

M	source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c

===================================================================

diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
index 87d677a5c8a..d7fc08e38f3 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilbuild.c
@@ -564,10 +564,12 @@ static void panel_draw(const bContext *UNUSED(C), Panel *panel)
   uiItemS(layout);
 
   row = uiLayoutRowWithHeading(layout, true, IFACE_("Use Factor"));
+  uiLayoutSetPropDecorate(row, false);
   uiItemR(row, ptr, "use_percentage", 0, "", ICON_NONE);
   sub = uiLayoutRow(row, true);
   uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_percentage"));
   uiItemR(sub, ptr, "percentage_factor", 0, "", ICON_NONE);
+  uiItemDecoratorR(row, ptr, "percentage_factor", 0);
 
   /* Check for incompatible time modifier. */
   Object *ob = ob_ptr.data;



More information about the Bf-blender-cvs mailing list