diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 18:51:49 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-11-23 19:58:01 +0300 |
commit | b79b8478ee3bb1b115c5d6b8bdb0cc74d5169955 (patch) | |
tree | d67b529dc95488186255631660d3251cfb5da5da /source/blender/editors/space_view3d/view3d_select.c | |
parent | 2f9df08aa8eaad1127f1b44aed518e1beaf91df7 (diff) |
Cleanup: Rename ViewLayer *sl > ViewLayer *view_layer
Diffstat (limited to 'source/blender/editors/space_view3d/view3d_select.c')
-rw-r--r-- | source/blender/editors/space_view3d/view3d_select.c | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c index 0d86d95c779..4658ca566d2 100644 --- a/source/blender/editors/space_view3d/view3d_select.c +++ b/source/blender/editors/space_view3d/view3d_select.c @@ -376,11 +376,11 @@ static void do_lasso_select_pose(ViewContext *vc, Object *ob, const int mcords[] } } -static void object_deselect_all_visible(ViewLayer *sl) +static void object_deselect_all_visible(ViewLayer *view_layer) { Base *base; - for (base = sl->object_bases.first; base; base = base->next) { + for (base = view_layer->object_bases.first; base; base = base->next) { if (BASE_SELECTABLE(base)) { ED_object_base_select(base, BA_DESELECT); } @@ -1057,9 +1057,9 @@ void VIEW3D_OT_select_menu(wmOperatorType *ot) RNA_def_boolean(ot->srna, "toggle", 0, "Toggle", "Toggle selection instead of deselecting everything first"); } -static void deselectall_except(ViewLayer *sl, Base *b) /* deselect all except b */ +static void deselectall_except(ViewLayer *view_layer, Base *b) /* deselect all except b */ { - for (Base *base = sl->object_bases.first; base; base = base->next) { + for (Base *base = view_layer->object_bases.first; base; base = base->next) { if (base->flag & BASE_SELECTED) { if (b != base) { ED_object_base_select(base, BA_DESELECT); @@ -1274,7 +1274,7 @@ finally: static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int hits, Base *startbase, bool has_bones, bool do_nearest) { - ViewLayer *sl = vc->view_layer; + ViewLayer *view_layer = vc->view_layer; Base *base, *basact = NULL; int a; @@ -1294,8 +1294,8 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int } else { /* only exclude active object when it is selected... */ - if (BASACT(sl) && (BASACT(sl)->flag & BASE_SELECTED) && hits > 1) { - notcol = BASACT(sl)->object->select_color; + if (BASACT(view_layer) && (BASACT(view_layer)->flag & BASE_SELECTED) && hits > 1) { + notcol = BASACT(view_layer)->object->select_color; } for (a = 0; a < hits; a++) { @@ -1306,7 +1306,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int } } - base = FIRSTBASE(sl); + base = FIRSTBASE(view_layer); while (base) { if (BASE_SELECTABLE(base)) { if (base->object->select_color == selcol) break; @@ -1323,7 +1323,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int * with an un-selectable choice */ if ((base->flag & BASE_SELECTABLED) == 0) { base = base->next; - if (base == NULL) base = FIRSTBASE(sl); + if (base == NULL) base = FIRSTBASE(view_layer); if (base == startbase) break; } @@ -1346,7 +1346,7 @@ static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int if (basact) break; base = base->next; - if (base == NULL) base = FIRSTBASE(sl); + if (base == NULL) base = FIRSTBASE(view_layer); if (base == startbase) break; } } @@ -1408,7 +1408,7 @@ static bool ed_object_select_pick( ViewContext vc; ARegion *ar = CTX_wm_region(C); Scene *scene = CTX_data_scene(C); - ViewLayer *sl = CTX_data_view_layer(C); + ViewLayer *view_layer = CTX_data_view_layer(C); Base *base, *startbase = NULL, *basact = NULL, *oldbasact = NULL; bool is_obedit; float dist = ED_view3d_select_dist_px() * 1.3333f; @@ -1428,8 +1428,8 @@ static bool ed_object_select_pick( } /* always start list from basact in wire mode */ - startbase = FIRSTBASE(sl); - if (BASACT(sl) && BASACT(sl)->next) startbase = BASACT(sl)->next; + startbase = FIRSTBASE(view_layer); + if (BASACT(view_layer) && BASACT(view_layer)->next) startbase = BASACT(view_layer)->next; /* This block uses the control key to make the object selected by its center point rather than its contents */ /* in editmode do not activate */ @@ -1448,7 +1448,7 @@ static bool ed_object_select_pick( V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_WIN | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK) { float dist_temp = len_manhattan_v2v2(mval_fl, screen_co); - if (base == BASACT(sl)) dist_temp += 10.0f; + if (base == BASACT(view_layer)) dist_temp += 10.0f; if (dist_temp < dist) { dist = dist_temp; basact = base; @@ -1457,7 +1457,7 @@ static bool ed_object_select_pick( } base = base->next; - if (base == NULL) base = FIRSTBASE(sl); + if (base == NULL) base = FIRSTBASE(view_layer); if (base == startbase) break; } } @@ -1487,7 +1487,7 @@ static bool ed_object_select_pick( if (has_bones && basact) { if (basact->object->type == OB_CAMERA) { - if (BASACT(sl) == basact) { + if (BASACT(view_layer) == basact) { int i, hitresult; bool changed = false; @@ -1544,7 +1544,7 @@ static bool ed_object_select_pick( } } } - else if (ED_do_pose_selectbuffer(scene, sl, basact, buffer, hits, extend, deselect, toggle, do_nearest)) { + else if (ED_do_pose_selectbuffer(scene, view_layer, basact, buffer, hits, extend, deselect, toggle, do_nearest)) { /* then bone is found */ /* we make the armature selected: @@ -1557,14 +1557,14 @@ static bool ed_object_select_pick( WM_event_add_notifier(C, NC_OBJECT | ND_BONE_ACTIVE, basact->object); /* in weightpaint, we use selected bone to select vertexgroup, so no switch to new active object */ - if (BASACT(sl) && (BASACT(sl)->object->mode & OB_MODE_WEIGHT_PAINT)) { + if (BASACT(view_layer) && (BASACT(view_layer)->object->mode & OB_MODE_WEIGHT_PAINT)) { /* prevent activating */ basact = NULL; } } /* prevent bone selecting to pass on to object selecting */ - if (basact == BASACT(sl)) + if (basact == BASACT(view_layer)) basact = NULL; } } @@ -1576,13 +1576,13 @@ static bool ed_object_select_pick( if (vc.obedit) { /* only do select */ - deselectall_except(sl, basact); + deselectall_except(view_layer, basact); ED_object_base_select(basact, BA_SELECT); } /* also prevent making it active on mouse selection */ else if (BASE_SELECTABLE(basact)) { - oldbasact = BASACT(sl); + oldbasact = BASACT(view_layer); if (extend) { ED_object_base_select(basact, BA_SELECT); @@ -1601,7 +1601,7 @@ static bool ed_object_select_pick( } } else { - deselectall_except(sl, basact); + deselectall_except(view_layer, basact); ED_object_base_select(basact, BA_SELECT); } @@ -2828,7 +2828,7 @@ static void obedit_circle_select( static bool object_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad) { - ViewLayer *sl = vc->view_layer; + ViewLayer *view_layer = vc->view_layer; const float radius_squared = rad * rad; const float mval_fl[2] = {mval[0], mval[1]}; bool changed = false; @@ -2836,7 +2836,7 @@ static bool object_circle_select(ViewContext *vc, const bool select, const int m Base *base; - for (base = FIRSTBASE(sl); base; base = base->next) { + for (base = FIRSTBASE(view_layer); base; base = base->next) { if (BASE_SELECTABLE(base) && ((base->flag & BASE_SELECTED) != select_flag)) { float screen_co[2]; if (ED_view3d_project_float_global(vc->ar, base->object->obmat[3], screen_co, |