diff options
author | Julian Eisel <julian@blender.org> | 2020-04-03 14:25:03 +0300 |
---|---|---|
committer | Julian Eisel <julian@blender.org> | 2020-04-03 14:34:50 +0300 |
commit | 905c0269f302e8e0e7a27dda8d5256fdcd06ce60 (patch) | |
tree | 1c720d4f0069879d5b4c0c9ea8db867106920d4f /source/blender/editors/gpencil/gpencil_edit.c | |
parent | 1a69384e76e2b1ab11c87a582eb2cdf26386ac59 (diff) |
Cleanup: Rename ScrArea variables from sa to area
Follow up of b2ee1770d4c3 and 10c2254d412d, part of T74432.
Now the area and region naming conventions should be less confusing.
Mostly a careful batch rename but had to do few smaller fixes.
Also ran clang-format on affected files.
Diffstat (limited to 'source/blender/editors/gpencil/gpencil_edit.c')
-rw-r--r-- | source/blender/editors/gpencil/gpencil_edit.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/gpencil/gpencil_edit.c b/source/blender/editors/gpencil/gpencil_edit.c index 8c31df02a11..14fd54bf287 100644 --- a/source/blender/editors/gpencil/gpencil_edit.c +++ b/source/blender/editors/gpencil/gpencil_edit.c @@ -1379,8 +1379,8 @@ void GPENCIL_OT_copy(wmOperatorType *ot) static bool gp_strokes_paste_poll(bContext *C) { - ScrArea *sa = CTX_wm_area(C); - if (!((sa != NULL) && (sa->spacetype == SPACE_VIEW3D))) { + ScrArea *area = CTX_wm_area(C); + if (!((area != NULL) && (area->spacetype == SPACE_VIEW3D))) { return false; } /* 1) Must have GP datablock to paste to @@ -2606,11 +2606,11 @@ void GPENCIL_OT_dissolve(wmOperatorType *ot) */ static bool gp_snap_poll(bContext *C) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); Object *ob = CTX_data_active_object(C); return (ob != NULL) && (ob->type == OB_GPENCIL) && - ((sa != NULL) && (sa->spacetype == SPACE_VIEW3D)); + ((area != NULL) && (area->spacetype == SPACE_VIEW3D)); } /* --------------------------------- */ @@ -3240,9 +3240,9 @@ static void gpencil_stroke_join_strokes(bGPDstroke *gps_a, } /* define start and end points of each stroke */ - float sa[3], sb[3], ea[3], eb[3]; + float area[3], sb[3], ea[3], eb[3]; pt = &gps_a->points[0]; - copy_v3_v3(sa, &pt->x); + copy_v3_v3(area, &pt->x); pt = &gps_a->points[gps_a->totpoints - 1]; copy_v3_v3(ea, &pt->x); @@ -4625,7 +4625,7 @@ static int gpencil_cutter_lasso_select(bContext *C, void *user_data) { bGPdata *gpd = ED_gpencil_data_get_active(C); - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); ToolSettings *ts = CTX_data_tool_settings(C); const float scale = ts->gp_sculpt.isect_threshold; @@ -4636,7 +4636,7 @@ static int gpencil_cutter_lasso_select(bContext *C, bool changed = false; /* sanity checks */ - if (sa == NULL) { + if (area == NULL) { BKE_report(op->reports, RPT_ERROR, "No active area"); return OPERATOR_CANCELLED; } @@ -4732,9 +4732,9 @@ static bool gpencil_cutter_poll(bContext *C) static int gpencil_cutter_exec(bContext *C, wmOperator *op) { - ScrArea *sa = CTX_wm_area(C); + ScrArea *area = CTX_wm_area(C); /* sanity checks */ - if (sa == NULL) { + if (area == NULL) { BKE_report(op->reports, RPT_ERROR, "No active area"); return OPERATOR_CANCELLED; } |