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-09-13 05:50:21 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-13 05:50:21 +0400
commit4cb6d5d214529749bbeeb2a63018b2d54ffa3417 (patch)
tree5cd36b8461ffa8b3ccdf74c9d80d6752db67eefe /source/blender/editors/mask
parent3e4b353cfa7258a6678252db4d382094782f42f7 (diff)
code cleanup: reduce calls to CTX_ functions inline, add some docs to mask rasterizer.
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_add.c5
-rw-r--r--source/blender/editors/mask/mask_ops.c10
2 files changed, 9 insertions, 6 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index b37f758596b..7fe1ac09df6 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -556,6 +556,7 @@ static int add_vertex_new(const bContext *C, Mask *mask, MaskLayer *masklay, con
static int add_vertex_exec(bContext *C, wmOperator *op)
{
+ Scene *scene = CTX_data_scene(C);
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *masklay;
@@ -595,7 +596,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
BKE_mask_calc_handle_point_auto(spline, point_other, FALSE);
/* TODO: only update this spline */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
return OPERATOR_FINISHED;
@@ -617,7 +618,7 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
}
/* TODO: only update this spline */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
return OPERATOR_FINISHED;
}
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index 1df1e5a66fe..88fbb91edfb 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -915,6 +915,7 @@ static void delete_feather_points(MaskSplinePoint *point)
static int delete_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Scene *scene = CTX_data_scene(C);
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *masklay;
@@ -1002,7 +1003,7 @@ static int delete_exec(bContext *C, wmOperator *UNUSED(op))
}
/* TODO: only update edited splines */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | NA_EDITED, mask);
@@ -1060,7 +1061,7 @@ static int mask_switch_direction_exec(bContext *C, wmOperator *UNUSED(op))
if (change) {
/* TODO: only update this spline */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
@@ -1126,7 +1127,7 @@ static int mask_normals_make_consistent_exec(bContext *C, wmOperator *UNUSED(op)
if (change) {
/* TODO: only update this spline */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | ND_SELECT, mask);
@@ -1324,6 +1325,7 @@ void MASK_OT_hide_view_set(wmOperatorType *ot)
static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
+ Scene *scene = CTX_data_scene(C);
Mask *mask = CTX_data_edit_mask(C);
MaskLayer *masklay;
int changed = FALSE;
@@ -1351,7 +1353,7 @@ static int mask_feather_weight_clear_exec(bContext *C, wmOperator *UNUSED(op))
if (changed) {
/* TODO: only update edited splines */
- BKE_mask_update_display(mask, CTX_data_scene(C)->r.cfra);
+ BKE_mask_update_display(mask, CFRA);
WM_event_add_notifier(C, NC_MASK | ND_DRAW, mask);
DAG_id_tag_update(&mask->id, 0);