Commit: 4045b3d7b685aeeb6003d3f90b4a41f6337b6159 Author: Henrik Dick Date: Mon Mar 14 11:11:22 2022 +0100 Branches: master https://developer.blender.org/rB4045b3d7b685aeeb6003d3f90b4a41f6337b6159
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 =================================================================== M source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c =================================================================== diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c index 3aaa032ef70..95c3f2c161f 100644 --- a/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c +++ b/source/blender/gpencil_modifiers/intern/MOD_gpenciloffset.c @@ -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); _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs