Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index 5ed08e39197..04a17336a90 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -170,9 +170,12 @@ static void deformStroke(GpencilModifierData *md,
float *noise_table_thickness = (mmd->factor_thickness > 0.0f) ? noise_table(len, seed) : NULL;
float *noise_table_uvs = (mmd->factor_uvs > 0.0f) ? noise_table(len, seed + 4) : NULL;
- /* calculate stroke normal*/
+ /* Calculate stroke normal. */
if (gps->totpoints > 2) {
BKE_gpencil_stroke_normal(gps, normal);
+ if (is_zero_v3(normal)) {
+ copy_v3_fl(normal, 1.0f);
+ }
}
else {
copy_v3_fl(normal, 1.0f);