[Bf-blender-cvs] [b05570736cc] greasepencil-object: GPencil: Testing idea for changing weights when opacity factor is greater than 1.0
Antonioya
noreply at git.blender.org
Thu Jul 18 20:50:12 CEST 2019
Commit: b05570736cc1e4770c796851fa95d3e9543747ea
Author: Antonioya
Date: Thu Jul 18 20:50:03 2019 +0200
Branches: greasepencil-object
https://developer.blender.org/rBb05570736cc1e4770c796851fa95d3e9543747ea
GPencil: Testing idea for changing weights when opacity factor is greater than 1.0
===================================================================
M source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
===================================================================
diff --git a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
index 6c1206f851d..9928ebb150f 100644
--- a/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
+++ b/source/blender/gpencil_modifiers/intern/MOD_gpencilopacity.c
@@ -146,6 +146,11 @@ static void deformStroke(GpencilModifierData *md,
else {
CLAMP(weight, 0.0f, 1.0f);
weight = 1.0f - weight;
+ /* High factor values, change weight too. */
+ if ((mmd->factor > 1.0f) && (weight < 1.0f)) {
+ weight += mmd->factor - 1.0f;
+ CLAMP(weight, 0.0f, 1.0f);
+ }
pt->strength += (mmd->factor * weight) - 1.0f;
}
CLAMP(pt->strength, 0.0f, 1.0f);
More information about the Bf-blender-cvs
mailing list