GPencil: Fix offset modifier negative scale thickness
If the scale in the offset modifier was set to a value lower than -1, the object would get mirrored. The problem was, that the thickness was set to 0 by that. This fix makes the thickness calculation only use the absolute values. Differential Revision: http://developer.blender.org/D14324
This commit is contained in:
parent
bf5e9ef2df
commit
4045b3d7b6
|
@ -152,7 +152,7 @@ static void deformStroke(GpencilModifierData *md,
|
|||
loc_eul_size_to_mat4(mat, loc, rot, scale);
|
||||
|
||||
/* Apply scale to thickness. */
|
||||
float unit_scale = (scale[0] + scale[1] + scale[2]) / 3.0f;
|
||||
float unit_scale = (fabsf(scale[0]) + fabsf(scale[1]) + fabsf(scale[2])) / 3.0f;
|
||||
pt->pressure *= unit_scale;
|
||||
|
||||
mul_m4_v3(mat, &pt->x);
|
||||
|
|
Loading…
Reference in New Issue