[Bf-blender-cvs] [67faa2d34d2] greasepencil-object: Fix missing thickness when scale or mirror

Antonio Vazquez noreply at git.blender.org
Sat Jun 23 16:28:50 CEST 2018


Commit: 67faa2d34d2265f9919f090d86bab7235813d91c
Author: Antonio Vazquez
Date:   Sat Jun 23 16:28:41 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rB67faa2d34d2265f9919f090d86bab7235813d91c

Fix missing thickness when scale or mirror

The line was reset to minimum thickness when it was scale with -1 or the mirror transform was used.

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

M	source/blender/editors/transform/transform_conversions.c

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

diff --git a/source/blender/editors/transform/transform_conversions.c b/source/blender/editors/transform/transform_conversions.c
index b84e7a419f1..2d3babe07f4 100644
--- a/source/blender/editors/transform/transform_conversions.c
+++ b/source/blender/editors/transform/transform_conversions.c
@@ -8329,9 +8329,13 @@ static void createTransGPencil(bContext *C, TransInfo *t)
 									if (pt->flag & GP_SPOINT_SELECT)
 										td->flag |= TD_SELECTED;
 
-									/* for other transform modes (e.g. shrink-fatten), need to additional data */
-									td->val = &pt->pressure;
-									td->ival = pt->pressure;
+									/* for other transform modes (e.g. shrink-fatten), need to additional data
+									 * but never for scale or mirror
+									 */
+									if ((t->mode != TFM_RESIZE) && (t->mode != TFM_MIRROR)) {
+										td->val = &pt->pressure;
+										td->ival = pt->pressure;
+									}
 
 									/* screenspace needs special matrices... */
 									if ((gps->flag & (GP_STROKE_3DSPACE | GP_STROKE_2DSPACE | GP_STROKE_2DIMAGE)) == 0) {



More information about the Bf-blender-cvs mailing list