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>2013-06-23 19:48:00 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-23 19:48:00 +0400
commit23c053748db11111d58fb44745d3ca5f6cb6dc6a (patch)
tree1659d6eb6ce5f9e6db56e23514a5ec993ba7b90a /source/blender/editors/mask
parent70fd2320c8d2d9682ef8dea586e260193596d0e3 (diff)
add missing notifiers for mask tools, some wouldn't refresh the compositor.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_ops.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index ff8e27ac264..134806cf5bd 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -1074,6 +1074,7 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
+ WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
return OPERATOR_FINISHED;
}
@@ -1140,6 +1141,7 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op)
BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
+ WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
return OPERATOR_FINISHED;
}
@@ -1172,6 +1174,8 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
MaskLayer *masklay;
int handle_type = RNA_enum_get(op->ptr, "type");
+ bool change = false;
+
for (masklay = mask->masklayers.first; masklay; masklay = masklay->next) {
MaskSpline *spline;
int i;
@@ -1188,15 +1192,19 @@ static int set_handle_type_exec(bContext *C, wmOperator *op)
BezTriple *bezt = &point->bezt;
bezt->h1 = bezt->h2 = handle_type;
+ change = true;
}
}
}
}
- WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
- DAG_id_tag_update(&mask->id, 0);
+ if (change) {
+ WM_event_add_notifier(C, NC_MASK | ND_DATA, mask);
+ DAG_id_tag_update(&mask->id, 0);
- return OPERATOR_FINISHED;
+ return OPERATOR_FINISHED;
+ }
+ return OPERATOR_CANCELLED;
}
void MASK_OT_handle_type_set(wmOperatorType *ot)