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_weightvg_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 4ee1f9f669a..c5e2ecb9660 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -55,7 +55,7 @@
#include "MOD_ui_common.h"
#include "MOD_util.h"
#include "MOD_weightvg_util.h"
-#include "RE_shader_ext.h" /* Texture masking. */
+#include "RE_texture.h" /* Texture masking. */
/* Maps new_w weights in place, using either one of the predefined functions, or a custom curve.
* Return values are in new_w.
@@ -249,9 +249,10 @@ void weightvg_do_mask(const ModifierEvalContext *ctx,
/* For each weight (vertex), make the mix between org and new weights. */
for (i = 0; i < num; i++) {
int idx = indices ? indices[i] : i;
- const float f = invert_vgroup_mask ?
- 1.0f - BKE_defvert_find_weight(&dvert[idx], ref_didx) * fact :
- BKE_defvert_find_weight(&dvert[idx], ref_didx) * fact;
+ const float f = (invert_vgroup_mask ?
+ (1.0f - BKE_defvert_find_weight(&dvert[idx], ref_didx)) :
+ BKE_defvert_find_weight(&dvert[idx], ref_didx)) *
+ fact;
org_w[i] = (new_w[i] * f) + (org_w[i] * (1.0f - f));
/* If that vertex is not in ref vgroup, assume null factor, and hence do nothing! */
}