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
This commit is contained in:
Philipp Oeser 2021-04-07 12:29:01 +02:00
parent 554d921124
commit 7c04ef210e
Notes: blender-bot 2023-02-14 03:46:57 +01:00
Referenced by issue #87263, Grease Pencil. Can't animate Factor value of Build modifier.
1 changed files with 2 additions and 0 deletions

View File

@ -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;