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:
authorAntonioya <blendergit@gmail.com>2019-01-15 22:24:07 +0300
committerAntonioya <blendergit@gmail.com>2019-01-15 22:24:07 +0300
commitd844271aef2d4bfbe0177918ee6c993d6ed9e1c3 (patch)
tree93756377802571380cf90f971ea4b37b68c47094 /source/blender/gpencil_modifiers
parentb1fa2a8fbbd9d17da7e1fea8afd29055f47113c8 (diff)
GP: Use weight in noise modifier for all types
The weight was used only for position.
Diffstat (limited to 'source/blender/gpencil_modifiers')
-rw-r--r--source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
index 722cf861fb1..7a9a3efbd95 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilnoise.c
@@ -219,10 +219,10 @@ static void deformStroke(
/* apply randomness to thickness */
if (mmd->flag & GP_NOISE_MOD_THICKNESS) {
if (vdir > 0.5f) {
- pt1->pressure -= pt1->pressure * vran * mmd->factor;
+ pt1->pressure -= pt1->pressure * vran * mmd->factor * weight;
}
else {
- pt1->pressure += pt1->pressure * vran * mmd->factor;
+ pt1->pressure += pt1->pressure * vran * mmd->factor * weight;
}
CLAMP_MIN(pt1->pressure, GPENCIL_STRENGTH_MIN);
}
@@ -230,20 +230,20 @@ static void deformStroke(
/* apply randomness to color strength */
if (mmd->flag & GP_NOISE_MOD_STRENGTH) {
if (vdir > 0.5f) {
- pt1->strength -= pt1->strength * vran * mmd->factor;
+ pt1->strength -= pt1->strength * vran * mmd->factor * weight;
}
else {
- pt1->strength += pt1->strength * vran * mmd->factor;
+ pt1->strength += pt1->strength * vran * mmd->factor * weight;
}
CLAMP_MIN(pt1->strength, GPENCIL_STRENGTH_MIN);
}
/* apply randomness to uv rotation */
if (mmd->flag & GP_NOISE_MOD_UV) {
if (vdir > 0.5f) {
- pt1->uv_rot -= pt1->uv_rot * vran * mmd->factor;
+ pt1->uv_rot -= pt1->uv_rot * vran * mmd->factor * weight;
}
else {
- pt1->uv_rot += pt1->uv_rot * vran * mmd->factor;
+ pt1->uv_rot += pt1->uv_rot * vran * mmd->factor * weight;
}
CLAMP(pt1->uv_rot, -M_PI_2, M_PI_2);
}