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.)
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user