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:
authorCampbell Barton <ideasman42@gmail.com>2012-06-05 16:51:11 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-06-05 16:51:11 +0400
commitfe58f668a122fde73b14d20ffec6cd3f75034eea (patch)
tree967e68ae19645e527a88d28022010110f415eb73 /source/blender/editors/mask/mask_add.c
parentf72c8565bf86cd19396a12d4cdf65aaeb35efb74 (diff)
mask point slide now accounts for scaled bezier weights,
Diffstat (limited to 'source/blender/editors/mask/mask_add.c')
-rw-r--r--source/blender/editors/mask/mask_add.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index 82f82862577..f8c36e866d7 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -654,6 +654,11 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op)
if (find_nearest_diff_point(C, mask, co, threshold, TRUE, &masklay, &spline, &point, &u, NULL)) {
Scene *scene = CTX_data_scene(C);
float w = BKE_mask_point_weight(spline, point, u);
+ float weight_scalar = BKE_mask_point_weight_scalar(spline, point, u);
+
+ if (weight_scalar != 0.0f) {
+ w = w / weight_scalar;
+ }
BKE_mask_point_add_uw(point, u, w);