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:
Diffstat (limited to 'source/blender/editors/mask')
-rw-r--r--source/blender/editors/mask/mask_add.c22
-rw-r--r--source/blender/editors/mask/mask_draw.c4
-rw-r--r--source/blender/editors/mask/mask_edit.c12
-rw-r--r--source/blender/editors/mask/mask_ops.c26
-rw-r--r--source/blender/editors/mask/mask_query.c98
-rw-r--r--source/blender/editors/mask/mask_select.c26
6 files changed, 94 insertions, 94 deletions
diff --git a/source/blender/editors/mask/mask_add.c b/source/blender/editors/mask/mask_add.c
index 9945383211a..767976b5ae6 100644
--- a/source/blender/editors/mask/mask_add.c
+++ b/source/blender/editors/mask/mask_add.c
@@ -444,11 +444,11 @@ static void mask_point_make_pixel_space(bContext *C,
float point_normalized[2],
float point_pixel[2])
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
float scalex, scaley;
- ED_mask_pixelspace_factor(sa, region, &scalex, &scaley);
+ ED_mask_pixelspace_factor(area, region, &scalex, &scaley);
point_pixel[0] = point_normalized[0] * scalex;
point_pixel[1] = point_normalized[1] * scaley;
@@ -556,12 +556,12 @@ static int add_vertex_exec(bContext *C, wmOperator *op)
static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
float co[2];
- ED_mask_mouse_pos(sa, region, event->mval, co);
+ ED_mask_mouse_pos(area, region, event->mval, co);
RNA_float_set_array(op->ptr, "location", co);
@@ -648,12 +648,12 @@ static int add_feather_vertex_exec(bContext *C, wmOperator *op)
static int add_feather_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
float co[2];
- ED_mask_mouse_pos(sa, region, event->mval, co);
+ ED_mask_mouse_pos(area, region, event->mval, co);
RNA_float_set_array(op->ptr, "location", co);
@@ -693,7 +693,7 @@ void MASK_OT_add_feather_vertex(wmOperatorType *ot)
static int create_primitive_from_points(
bContext *C, wmOperator *op, const float (*points)[2], int num_points, char handle_type)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
Mask *mask;
MaskLayer *mask_layer;
MaskSpline *new_spline;
@@ -701,7 +701,7 @@ static int create_primitive_from_points(
int i, width, height;
int size = RNA_float_get(op->ptr, "size");
- ED_mask_get_size(sa, &width, &height);
+ ED_mask_get_size(area, &width, &height);
scale = (float)size / max_ii(width, height);
/* Get location in mask space. */
@@ -762,12 +762,12 @@ static int create_primitive_from_points(
static int primitive_add_invoke(bContext *C, wmOperator *op, const wmEvent *UNUSED(event))
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
float cursor[2];
int width, height;
- ED_mask_get_size(sa, &width, &height);
- ED_mask_cursor_location_get(sa, cursor);
+ ED_mask_get_size(area, &width, &height);
+ ED_mask_cursor_location_get(area, cursor);
cursor[0] *= width;
cursor[1] *= height;
diff --git a/source/blender/editors/mask/mask_draw.c b/source/blender/editors/mask/mask_draw.c
index 91c02408f95..88e9c7c3664 100644
--- a/source/blender/editors/mask/mask_draw.c
+++ b/source/blender/editors/mask/mask_draw.c
@@ -638,7 +638,7 @@ static void draw_mask_layers(const bContext *C,
void ED_mask_draw(const bContext *C, const char draw_flag, const char draw_type)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
Mask *mask = CTX_data_edit_mask(C);
int width, height;
@@ -646,7 +646,7 @@ void ED_mask_draw(const bContext *C, const char draw_flag, const char draw_type)
return;
}
- ED_mask_get_size(sa, &width, &height);
+ ED_mask_get_size(area, &width, &height);
draw_mask_layers(C, mask, draw_flag, draw_type, width, height);
}
diff --git a/source/blender/editors/mask/mask_edit.c b/source/blender/editors/mask/mask_edit.c
index e696cc37bd3..663ae0097ad 100644
--- a/source/blender/editors/mask/mask_edit.c
+++ b/source/blender/editors/mask/mask_edit.c
@@ -44,9 +44,9 @@
bool ED_maskedit_poll(bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
- if (sa) {
- switch (sa->spacetype) {
+ ScrArea *area = CTX_wm_area(C);
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP:
return ED_space_clip_maskedit_poll(C);
case SPACE_SEQ:
@@ -60,9 +60,9 @@ bool ED_maskedit_poll(bContext *C)
bool ED_maskedit_mask_poll(bContext *C)
{
- ScrArea *sa = CTX_wm_area(C);
- if (sa) {
- switch (sa->spacetype) {
+ ScrArea *area = CTX_wm_area(C);
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP:
return ED_space_clip_maskedit_mask_poll(C);
case SPACE_SEQ:
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index c4e3763dd94..a0ece69bf17 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -55,16 +55,16 @@
Mask *ED_mask_new(bContext *C, const char *name)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
Main *bmain = CTX_data_main(C);
Mask *mask;
mask = BKE_mask_new(bmain, name);
- if (sa && sa->spacedata.first) {
- switch (sa->spacetype) {
+ if (area && area->spacedata.first) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_space_clip_set_mask(C, sc, mask);
break;
}
@@ -73,7 +73,7 @@ Mask *ED_mask_new(bContext *C, const char *name)
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_space_image_set_mask(C, sima, mask);
break;
}
@@ -260,7 +260,7 @@ static bool spline_under_mouse_get(const bContext *C,
MaskSpline **r_mask_spline)
{
const float threshold = 19.0f;
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
SpaceClip *sc = CTX_wm_space_clip(C);
int width, height;
float pixel_co[2];
@@ -270,7 +270,7 @@ static bool spline_under_mouse_get(const bContext *C,
bool undistort = false;
*r_mask_layer = NULL;
*r_mask_spline = NULL;
- ED_mask_get_size(sa, &width, &height);
+ ED_mask_get_size(area, &width, &height);
pixel_co[0] = co[0] * width;
pixel_co[1] = co[1] * height;
if (sc != NULL) {
@@ -420,7 +420,7 @@ static void check_sliding_handle_type(MaskSplinePoint *point, eMaskWhichHandle w
static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *event)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
Mask *mask = CTX_data_edit_mask(C);
@@ -435,8 +435,8 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *
const float threshold = 19;
eMaskWhichHandle which_handle;
- ED_mask_mouse_pos(sa, region, event->mval, co);
- ED_mask_get_size(sa, &width, &height);
+ ED_mask_mouse_pos(area, region, event->mval, co);
+ ED_mask_get_size(area, &width, &height);
cv_point = ED_mask_point_find_nearest(
C, mask, co, threshold, &cv_mask_layer, &cv_spline, &which_handle, &cv_score);
@@ -534,7 +534,7 @@ static void *slide_point_customdata(bContext *C, wmOperator *op, const wmEvent *
}
customdata->which_handle = which_handle;
- ED_mask_mouse_pos(sa, region, event->mval, customdata->prev_mouse_coord);
+ ED_mask_mouse_pos(area, region, event->mval, customdata->prev_mouse_coord);
}
return customdata;
@@ -658,11 +658,11 @@ static int slide_point_modal(bContext *C, wmOperator *op, const wmEvent *event)
ATTR_FALLTHROUGH; /* update CV position */
case MOUSEMOVE: {
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
float delta[2];
- ED_mask_mouse_pos(sa, region, event->mval, co);
+ ED_mask_mouse_pos(area, region, event->mval, co);
sub_v2_v2v2(delta, co, data->prev_mouse_coord);
if (data->is_accurate) {
mul_v2_fl(delta, 0.2f);
diff --git a/source/blender/editors/mask/mask_query.c b/source/blender/editors/mask/mask_query.c
index 6b1bb0a08e2..cf5997d8a18 100644
--- a/source/blender/editors/mask/mask_query.c
+++ b/source/blender/editors/mask/mask_query.c
@@ -61,7 +61,7 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
float *r_u,
float *r_score)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
MaskLayer *point_mask_layer;
@@ -75,8 +75,8 @@ bool ED_mask_find_nearest_diff_point(const bContext *C,
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id);
- ED_mask_get_size(sa, &width, &height);
- ED_mask_pixelspace_factor(sa, region, &scalex, &scaley);
+ ED_mask_get_size(area, &width, &height);
+ ED_mask_pixelspace_factor(area, region, &scalex, &scaley);
co[0] = normal_co[0] * scalex;
co[1] = normal_co[1] * scaley;
@@ -219,7 +219,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C,
eMaskWhichHandle *r_which_handle,
float *r_score)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
MaskLayer *point_mask_layer = NULL;
@@ -234,8 +234,8 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C,
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id);
- ED_mask_get_size(sa, &width, &height);
- ED_mask_pixelspace_factor(sa, region, &scalex, &scaley);
+ ED_mask_get_size(area, &width, &height);
+ ED_mask_pixelspace_factor(area, region, &scalex, &scaley);
co[0] = normal_co[0] * scalex;
co[1] = normal_co[1] * scaley;
@@ -374,7 +374,7 @@ bool ED_mask_feather_find_nearest(const bContext *C,
MaskSplinePointUW **r_uw,
float *r_score)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
MaskLayer *point_mask_layer = NULL;
@@ -389,8 +389,8 @@ bool ED_mask_feather_find_nearest(const bContext *C,
Depsgraph *depsgraph = CTX_data_ensure_evaluated_depsgraph(C);
Mask *mask_eval = (Mask *)DEG_get_evaluated_id(depsgraph, &mask_orig->id);
- ED_mask_get_size(sa, &width, &height);
- ED_mask_pixelspace_factor(sa, region, &scalex, &scaley);
+ ED_mask_get_size(area, &width, &height);
+ ED_mask_pixelspace_factor(area, region, &scalex, &scaley);
co[0] = normal_co[0] * scalex;
co[1] = normal_co[1] * scaley;
@@ -490,12 +490,12 @@ bool ED_mask_feather_find_nearest(const bContext *C,
}
/* takes event->mval */
-void ED_mask_mouse_pos(ScrArea *sa, ARegion *region, const int mval[2], float co[2])
+void ED_mask_mouse_pos(ScrArea *area, ARegion *region, const int mval[2], float co[2])
{
- if (sa) {
- switch (sa->spacetype) {
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_clip_mouse_pos(sc, region, mval, co);
BKE_mask_coord_from_movieclip(sc->clip, &sc->user, co, co);
break;
@@ -505,7 +505,7 @@ void ED_mask_mouse_pos(ScrArea *sa, ARegion *region, const int mval[2], float co
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_image_mouse_pos(sima, region, mval, co);
BKE_mask_coord_from_image(sima->image, &sima->iuser, co, co);
break;
@@ -525,14 +525,14 @@ void ED_mask_mouse_pos(ScrArea *sa, ARegion *region, const int mval[2], float co
/* input: x/y - mval space
* output: xr/yr - mask point space */
-void ED_mask_point_pos(ScrArea *sa, ARegion *region, float x, float y, float *xr, float *yr)
+void ED_mask_point_pos(ScrArea *area, ARegion *region, float x, float y, float *xr, float *yr)
{
float co[2];
- if (sa) {
- switch (sa->spacetype) {
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_clip_point_stable_pos(sc, region, x, y, &co[0], &co[1]);
BKE_mask_coord_from_movieclip(sc->clip, &sc->user, co, co);
break;
@@ -541,7 +541,7 @@ void ED_mask_point_pos(ScrArea *sa, ARegion *region, float x, float y, float *xr
zero_v2(co); /* MASKTODO */
break;
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_image_point_pos(sima, region, x, y, &co[0], &co[1]);
BKE_mask_coord_from_image(sima->image, &sima->iuser, co, co);
break;
@@ -563,14 +563,14 @@ void ED_mask_point_pos(ScrArea *sa, ARegion *region, float x, float y, float *xr
}
void ED_mask_point_pos__reverse(
- ScrArea *sa, ARegion *region, float x, float y, float *xr, float *yr)
+ ScrArea *area, ARegion *region, float x, float y, float *xr, float *yr)
{
float co[2];
- if (sa) {
- switch (sa->spacetype) {
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
co[0] = x;
co[1] = y;
BKE_mask_coord_to_movieclip(sc->clip, &sc->user, co, co);
@@ -581,7 +581,7 @@ void ED_mask_point_pos__reverse(
zero_v2(co); /* MASKTODO */
break;
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
co[0] = x;
co[1] = y;
BKE_mask_coord_to_image(sima->image, &sima->iuser, co, co);
@@ -659,12 +659,12 @@ bool ED_mask_selected_minmax(const bContext *C, float min[2], float max[2])
/** \name Generic 2D View Queries
* \{ */
-void ED_mask_get_size(ScrArea *sa, int *width, int *height)
+void ED_mask_get_size(ScrArea *area, int *width, int *height)
{
- if (sa && sa->spacedata.first) {
- switch (sa->spacetype) {
+ if (area && area->spacedata.first) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_space_clip_get_size(sc, width, height);
break;
}
@@ -675,7 +675,7 @@ void ED_mask_get_size(ScrArea *sa, int *width, int *height)
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_space_image_get_size(sima, width, height);
break;
}
@@ -694,12 +694,12 @@ void ED_mask_get_size(ScrArea *sa, int *width, int *height)
}
}
-void ED_mask_zoom(ScrArea *sa, ARegion *region, float *zoomx, float *zoomy)
+void ED_mask_zoom(ScrArea *area, ARegion *region, float *zoomx, float *zoomy)
{
- if (sa && sa->spacedata.first) {
- switch (sa->spacetype) {
+ if (area && area->spacedata.first) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_space_clip_get_zoom(sc, region, zoomx, zoomy);
break;
}
@@ -708,7 +708,7 @@ void ED_mask_zoom(ScrArea *sa, ARegion *region, float *zoomx, float *zoomy)
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_space_image_get_zoom(sima, region, zoomx, zoomy);
break;
}
@@ -725,12 +725,12 @@ void ED_mask_zoom(ScrArea *sa, ARegion *region, float *zoomx, float *zoomy)
}
}
-void ED_mask_get_aspect(ScrArea *sa, ARegion *UNUSED(region), float *aspx, float *aspy)
+void ED_mask_get_aspect(ScrArea *area, ARegion *UNUSED(region), float *aspx, float *aspy)
{
- if (sa && sa->spacedata.first) {
- switch (sa->spacetype) {
+ if (area && area->spacedata.first) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
ED_space_clip_get_aspect(sc, aspx, aspy);
break;
}
@@ -739,7 +739,7 @@ void ED_mask_get_aspect(ScrArea *sa, ARegion *UNUSED(region), float *aspx, float
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
ED_space_image_get_aspect(sima, aspx, aspy);
break;
}
@@ -756,12 +756,12 @@ void ED_mask_get_aspect(ScrArea *sa, ARegion *UNUSED(region), float *aspx, float
}
}
-void ED_mask_pixelspace_factor(ScrArea *sa, ARegion *region, float *scalex, float *scaley)
+void ED_mask_pixelspace_factor(ScrArea *area, ARegion *region, float *scalex, float *scaley)
{
- if (sa && sa->spacedata.first) {
- switch (sa->spacetype) {
+ if (area && area->spacedata.first) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *sc = sa->spacedata.first;
+ SpaceClip *sc = area->spacedata.first;
float aspx, aspy;
UI_view2d_scale_get(&region->v2d, scalex, scaley);
@@ -776,7 +776,7 @@ void ED_mask_pixelspace_factor(ScrArea *sa, ARegion *region, float *scalex, floa
break;
}
case SPACE_IMAGE: {
- SpaceImage *sima = sa->spacedata.first;
+ SpaceImage *sima = area->spacedata.first;
float aspx, aspy;
UI_view2d_scale_get(&region->v2d, scalex, scaley);
@@ -799,12 +799,12 @@ void ED_mask_pixelspace_factor(ScrArea *sa, ARegion *region, float *scalex, floa
}
}
-void ED_mask_cursor_location_get(ScrArea *sa, float cursor[2])
+void ED_mask_cursor_location_get(ScrArea *area, float cursor[2])
{
- if (sa) {
- switch (sa->spacetype) {
+ if (area) {
+ switch (area->spacetype) {
case SPACE_CLIP: {
- SpaceClip *space_clip = sa->spacedata.first;
+ SpaceClip *space_clip = area->spacedata.first;
copy_v2_v2(cursor, space_clip->cursor);
break;
}
@@ -813,7 +813,7 @@ void ED_mask_cursor_location_get(ScrArea *sa, float cursor[2])
break;
}
case SPACE_IMAGE: {
- SpaceImage *space_image = sa->spacedata.first;
+ SpaceImage *space_image = area->spacedata.first;
copy_v2_v2(cursor, space_image->cursor);
break;
}
diff --git a/source/blender/editors/mask/mask_select.c b/source/blender/editors/mask/mask_select.c
index b21d20b360a..12d8a9005a9 100644
--- a/source/blender/editors/mask/mask_select.c
+++ b/source/blender/editors/mask/mask_select.c
@@ -385,12 +385,12 @@ static int select_exec(bContext *C, wmOperator *op)
static int select_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
float co[2];
- ED_mask_mouse_pos(sa, region, event->mval, co);
+ ED_mask_mouse_pos(area, region, event->mval, co);
RNA_float_set_array(op->ptr, "location", co);
@@ -435,7 +435,7 @@ void MASK_OT_select(wmOperatorType *ot)
static int box_select_exec(bContext *C, wmOperator *op)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
Mask *mask = CTX_data_edit_mask(C);
@@ -454,8 +454,8 @@ static int box_select_exec(bContext *C, wmOperator *op)
/* get rectangle from operator */
WM_operator_properties_border_to_rcti(op, &rect);
- ED_mask_point_pos(sa, region, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
- ED_mask_point_pos(sa, region, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
+ ED_mask_point_pos(area, region, rect.xmin, rect.ymin, &rectf.xmin, &rectf.ymin);
+ ED_mask_point_pos(area, region, rect.xmax, rect.ymax, &rectf.xmax, &rectf.ymax);
/* do actual selection */
for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
@@ -525,7 +525,7 @@ static bool do_lasso_select_mask(bContext *C,
short moves,
const eSelectOp sel_op)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
Mask *mask = CTX_data_edit_mask(C);
@@ -565,7 +565,7 @@ static bool do_lasso_select_mask(bContext *C,
float screen_co[2];
/* point in screen coords */
- ED_mask_point_pos__reverse(sa,
+ ED_mask_point_pos__reverse(area,
region,
point_deform->bezt.vec[1][0],
point_deform->bezt.vec[1][1],
@@ -651,7 +651,7 @@ static int mask_spline_point_inside_ellipse(BezTriple *bezt,
static int circle_select_exec(bContext *C, wmOperator *op)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
Mask *mask = CTX_data_edit_mask(C);
@@ -667,14 +667,14 @@ static int circle_select_exec(bContext *C, wmOperator *op)
const int radius = RNA_int_get(op->ptr, "radius");
/* compute ellipse and position in unified coordinates */
- ED_mask_get_size(sa, &width, &height);
- ED_mask_zoom(sa, region, &zoomx, &zoomy);
+ ED_mask_get_size(area, &width, &height);
+ ED_mask_zoom(area, region, &zoomx, &zoomy);
width = height = max_ii(width, height);
ellipse[0] = width * zoomx / radius;
ellipse[1] = height * zoomy / radius;
- ED_mask_point_pos(sa, region, x, y, &offset[0], &offset[1]);
+ ED_mask_point_pos(area, region, x, y, &offset[0], &offset[1]);
const eSelectOp sel_op = ED_select_op_modal(RNA_enum_get(op->ptr, "mode"),
WM_gesture_is_modal_first(op->customdata));
@@ -748,7 +748,7 @@ void MASK_OT_select_circle(wmOperatorType *ot)
static int mask_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmEvent *event)
{
- ScrArea *sa = CTX_wm_area(C);
+ ScrArea *area = CTX_wm_area(C);
ARegion *region = CTX_wm_region(C);
Mask *mask = CTX_data_edit_mask(C);
@@ -760,7 +760,7 @@ static int mask_select_linked_pick_invoke(bContext *C, wmOperator *op, const wmE
const float threshold = 19;
bool changed = false;
- ED_mask_mouse_pos(sa, region, event->mval, co);
+ ED_mask_mouse_pos(area, region, event->mval, co);
point = ED_mask_point_find_nearest(C, mask, co, threshold, &mask_layer, &spline, NULL, NULL);