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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_weightvgmix.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgmix.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvgmix.c b/source/blender/modifiers/intern/MOD_weightvgmix.c
index 1078ebfaeb2..1b6472e2d42 100644
--- a/source/blender/modifiers/intern/MOD_weightvgmix.c
+++ b/source/blender/modifiers/intern/MOD_weightvgmix.c
@@ -105,6 +105,12 @@ static float mix_weight(float weight, float weight2, char mix_mode)
if (mix_mode == MOD_WVG_MIX_AVG) {
return (weight + weight2) * 0.5f;
}
+ if (mix_mode == MOD_WVG_MIX_MIN) {
+ return (weight < weight2 ? weight : weight2);
+ }
+ if (mix_mode == MOD_WVG_MIX_MAX) {
+ return (weight > weight2 ? weight : weight2);
+ }
return weight2;
}