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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-10-31 18:07:36 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-11-04 12:54:59 +0300
commite236f5b5749f256034e7605a66f611f1fad74c41 (patch)
tree9db334e7b8760bef134801417336c6e0785e4269 /source/blender/editors/mask/mask_relationships.c
parent3d55d80c59d97ce12d1e5f344e7f1aaf1c9c2a4f (diff)
Masking: Cleanup, limit variable scope
Diffstat (limited to 'source/blender/editors/mask/mask_relationships.c')
-rw-r--r--source/blender/editors/mask/mask_relationships.c20
1 files changed, 6 insertions, 14 deletions
diff --git a/source/blender/editors/mask/mask_relationships.c b/source/blender/editors/mask/mask_relationships.c
index b72edd3977b..130ebb61a90 100644
--- a/source/blender/editors/mask/mask_relationships.c
+++ b/source/blender/editors/mask/mask_relationships.c
@@ -43,18 +43,14 @@
static int mask_parent_clear_exec(bContext *C, wmOperator *UNUSED(op))
{
Mask *mask = CTX_data_edit_mask(C);
- MaskLayer *mask_layer;
-
- for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
- MaskSpline *spline;
- int i;
+ for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
continue;
}
- for (spline = mask_layer->splines.first; spline; spline = spline->next) {
- for (i = 0; i < spline->tot_point; i++) {
+ for (MaskSpline *spline = mask_layer->splines.first; spline; spline = spline->next) {
+ for (int i = 0; i < spline->tot_point; i++) {
MaskSplinePoint *point = &spline->points[i];
if (MASKPOINT_ISSEL_ANY(point)) {
@@ -89,7 +85,6 @@ void MASK_OT_parent_clear(wmOperatorType *ot)
static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
{
Mask *mask = CTX_data_edit_mask(C);
- MaskLayer *mask_layer;
/* parent info */
SpaceClip *sc = CTX_wm_space_clip(C);
@@ -141,16 +136,13 @@ static int mask_parent_set_exec(bContext *C, wmOperator *UNUSED(op))
return OPERATOR_CANCELLED;
}
- for (mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
- MaskSpline *spline;
- int i;
-
+ for (MaskLayer *mask_layer = mask->masklayers.first; mask_layer; mask_layer = mask_layer->next) {
if (mask_layer->restrictflag & (MASK_RESTRICT_VIEW | MASK_RESTRICT_SELECT)) {
continue;
}
- for (spline = mask_layer->splines.first; spline; spline = spline->next) {
- for (i = 0; i < spline->tot_point; i++) {
+ for (MaskSpline *spline = mask_layer->splines.first; spline; spline = spline->next) {
+ for (int i = 0; i < spline->tot_point; i++) {
MaskSplinePoint *point = &spline->points[i];
if (MASKPOINT_ISSEL_ANY(point)) {