add missing notifiers for mask tools, some wouldn't refresh the compositor.

This commit is contained in:
Campbell Barton 2013-06-23 15:48:00 +00:00
parent 70fd2320c8
commit 23c053748d
2 changed files with 12 additions and 3 deletions

@ -250,6 +250,7 @@ class MASK_PT_tools():
col.operator("mask.delete")
col.operator("mask.cyclic_toggle")
col.operator("mask.switch_direction")
col.operator("mask.handle_type_set")
col = layout.column(align=True)
col.label(text="Parenting:")

@ -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)