From efe289f3121f1eb9a7d85520cf5bfaeed88bcf50 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 31 May 2012 10:01:21 +0000 Subject: [PATCH] Fix adding feather points when there's deformed spline for mask Deformed spline should be re-evaluated after adding new feather points Used both BKE_mask_update_display and DAG_id_tag_update because of: - If adding feather point is happening from macro which adds point and slides it, deformed spline should be updated immediatelly so sliding operator will use updated feather, - If adding happens outside of such macro, update DAG is necessary to make needed updates in other areas (such as compositor, i.e.) --- source/blender/editors/mask/mask_ops.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c index 53f87b92707..2eaae673364 100644 --- a/source/blender/editors/mask/mask_ops.c +++ b/source/blender/editors/mask/mask_ops.c @@ -1317,12 +1317,17 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op) return OPERATOR_FINISHED; if (find_nearest_diff_point(C, mask, co, threshold, TRUE, &maskobj, &spline, &point, &u, NULL)) { + Scene *scene = CTX_data_scene(C); float w = BKE_mask_point_weight(spline, point, u); BKE_mask_point_add_uw(point, u, w); + BKE_mask_update_display(mask, scene->r.cfra); + WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask); + DAG_id_tag_update(&mask->id, 0); + return OPERATOR_FINISHED; }