Page MenuHome

Fix T76522: Grease Pencil transform fill and Adjust Last Operation panel issue [proposal]
ClosedPublic

Authored by Antonio Vazquez (antoniov) on Fri, May 15, 11:35 AM.

Details

Summary

The exec method was totally wrong and also the UI panel now shows all parameters except mode, because mode is not logic and it's only valid for the tool.

Diff Detail

Repository
rB Blender

Event Timeline

Dalai Felinto (dfelinto) retitled this revision from Proposed fix for T76522 to Fix T76522: Grease Pencil transform fill and Adjust Last Operation panel issue [proposal].Fri, May 15, 6:19 PM
  • Removed exec panel. After testing a lot, I have seen this panel is not logic for this operator that is designed to be used only in modal mode. Also, the values are not easy to use because you can select several strokes at time.

If you need change the values in a python script, you don't need the operator, just access to the properties exposed props in RNA.

  • Changes to make the use smoother.

Not sure I can review this good enough.

My notes:

  • the behavior of the tool seems to have been changed quite a bit? (not sure if this can be split in two -- fix & change of the tool)
  • one other solution to hide the redo panel is to mark all properties PROP_HIDDEN | PROP_SKIP_SAVE

1
2
3diff --git a/source/blender/editors/gpencil/gpencil_uv.c b/source/blender/editors/gpencil/gpencil_uv.c
4index 2238d768bcd..26078f9a946 100644
5--- a/source/blender/editors/gpencil/gpencil_uv.c
6+++ b/source/blender/editors/gpencil/gpencil_uv.c
7@@ -501,6 +501,7 @@ void GPENCIL_OT_transform_fill(wmOperatorType *ot)
8
9 /* properties */
10 ot->prop = RNA_def_enum(ot->srna, "mode", uv_mode, GP_UV_ROTATE, "Mode", "");
11+ RNA_def_property_flag(ot->prop, PROP_HIDDEN | PROP_SKIP_SAVE);
12
13 prop = RNA_def_float_vector(
14 ot->srna, "location", 2, NULL, -FLT_MAX, FLT_MAX, "Location", "", -FLT_MAX, FLT_MAX);

Using the tool itself is still a mystery to me [sorry, maybe I should try harder... and maybe this is also out of scope of this 'bugfix']

  • translating seems to swap axis occasionally? (it follows the mouse, but when I cross the origin this gets reversed?)
  • starting a translation often "jumps" on mouse/pen down, this seems wrong to me...
  • it is also unclear where the origin of transformations (rotation/scale) are?

maybe there are others (greasepencil team) who could review this better?

  • Simplified code and remove any "Jump" when select again transform in the first mouse click.

I have changed how is calculated the transform. The old code was the result of several testing/design steps and the function was over complicated.

@Matias Mendiola (mendio) Could you test the tool? Now it must be more smooth and predictable, specially in Transform Location.

@Matias Mendiola (mendio) Could you test the tool? Now it must be more smooth and predictable, specially in Transform Location.

It's working much more predictable and easy to tweak now, it's ok for me

This revision is now accepted and ready to land.Mon, May 25, 3:26 PM

@Philipp Oeser (lichtwerk) Do you think is ready for master?

Only did end-user testing (havent checked code, trust you on this) and yes: it is much better now, thx!