Renaming: sl > scene_layer
authorDalai Felinto <dfelinto@gmail.com>
Tue, 11 Apr 2017 14:09:30 +0000 (16:09 +0200)
committerDalai Felinto <dfelinto@gmail.com>
Tue, 11 Apr 2017 14:09:30 +0000 (16:09 +0200)
12 files changed:
source/blender/editors/armature/armature_select.c
source/blender/editors/curve/editcurve.c
source/blender/editors/curve/editcurve_paint.c
source/blender/editors/include/ED_view3d.h
source/blender/editors/space_view3d/view3d_draw_legacy.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/space_view3d/view3d_view.c
source/blender/editors/transform/transform.c
source/blender/editors/transform/transform.h
source/blender/editors/transform/transform_conversions.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_snap.c

index b78adba408c13a3ede5d4ba65f9dc7147291d15b..8db1cb7d6c073268e3b73d1f513e742d3dc3f983 100644 (file)
@@ -180,7 +180,7 @@ void *get_nearest_bone(bContext *C, const int xy[2], bool findunsel)
        hits = view3d_opengl_select(&vc, buffer, MAXPICKBUF, &rect, VIEW3D_SELECT_PICK_NEAREST);
 
        if (hits > 0)
-               return get_bone_from_selectbuffer(vc.scene, vc.sl->basact, buffer, hits, findunsel, true);
+               return get_bone_from_selectbuffer(vc.scene, vc.scene_layer->basact, buffer, hits, findunsel, true);
        
        return NULL;
 }
index 09dcdfc35bd900f572435f98488317e4cd02f3ac..57805f92c8a199fbb8eecd0f63cc78aba860f199 100644 (file)
@@ -5015,7 +5015,7 @@ static int add_vertex_invoke(bContext *C, wmOperator *op, const wmEvent *event)
                        const float mval[2] = {UNPACK2(event->mval)};
 
                        struct SnapObjectContext *snap_context = ED_transform_snap_object_context_create_view3d(
-                               CTX_data_main(C), vc.scene, vc.sl, 0,
+                               CTX_data_main(C), vc.scene, vc.scene_layer, 0,
                                vc.ar, vc.v3d);
 
                        ED_transform_snap_object_project_view3d_mixed(
index 7212496a2ccb3e9eba75c4826e6925b478a989dc..eb6e3074cabc2f3e8e1a9b33fe59c69e1be09d27 100644 (file)
@@ -700,7 +700,7 @@ static bool curve_draw_init(bContext *C, wmOperator *op, bool is_invoke)
        }
        else {
                cdd->vc.scene = CTX_data_scene(C);
-               cdd->vc.sl = CTX_data_scene_layer(C);
+               cdd->vc.scene_layer = CTX_data_scene_layer(C);
                cdd->vc.obedit = CTX_data_edit_object(C);
        }
 
index 319d5afe0f3beaedb56f82425555e14235f64ce3..ba85e2deb52364e4dcb29dfac76a59586d2b3c20 100644 (file)
@@ -71,7 +71,7 @@ enum eGPUFXFlags;
 /* for derivedmesh drawing callbacks, for view3d_select, .... */
 typedef struct ViewContext {
        struct Scene *scene;
-       struct SceneLayer *sl;
+       struct SceneLayer *scene_layer;
        struct Object *obact;
        struct Object *obedit;
        struct ARegion *ar;
index 14b8f78e4c7c100ad9c3a2d84d9ec6bbed1e28c5..7cd926d180c3a6d7c9211be42e906c83e969cfa6 100644 (file)
@@ -356,7 +356,7 @@ static void view3d_opengl_read_Z_pixels(ARegion *ar, int x, int y, int w, int h,
 void ED_view3d_backbuf_validate(ViewContext *vc)
 {
        if (vc->v3d->flag & V3D_INVALID_BACKBUF)
-               backdrawview3d(vc->scene, vc->sl, vc->win, vc->ar, vc->v3d);
+               backdrawview3d(vc->scene, vc->scene_layer, vc->win, vc->ar, vc->v3d);
 }
 
 /**
index e22e89dff12e02e62c0d0d5c28dcbf36d8a0ec8a..c53efd02b92e834a7aad307a3f7bb760b9573b11 100644 (file)
@@ -110,7 +110,7 @@ void view3d_set_viewcontext(bContext *C, ViewContext *vc)
        memset(vc, 0, sizeof(ViewContext));
        vc->ar = CTX_wm_region(C);
        vc->scene = CTX_data_scene(C);
-       vc->sl = CTX_data_scene_layer(C);
+       vc->scene_layer = CTX_data_scene_layer(C);
        vc->v3d = CTX_wm_view3d(C);
        vc->win = CTX_wm_window(C);
        vc->rv3d = CTX_wm_region_view3d(C);
@@ -390,9 +390,9 @@ static void do_lasso_select_objects(ViewContext *vc, const int mcords[][2], cons
        Base *base;
        
        if (extend == false && select)
-               object_deselect_all_visible(vc->sl);
+               object_deselect_all_visible(vc->scene_layer);
 
-       for (base = vc->sl->object_bases.first; base; base = base->next) {
+       for (base = vc->scene_layer->object_bases.first; base; base = base->next) {
                if (BASE_SELECTABLE_NEW(base)) { /* use this to avoid un-needed lasso lookups */
                        if (ED_view3d_project_base(vc->ar, base) == V3D_PROJ_RET_OK) {
                                if (BLI_lasso_is_point_inside(mcords, moves, base->sx, base->sy, IS_CLIPPED)) {
@@ -1264,7 +1264,7 @@ finally:
 static Base *mouse_select_eval_buffer(ViewContext *vc, unsigned int *buffer, int hits,
                                       Base *startbase, bool has_bones, bool do_nearest)
 {
-       SceneLayer *sl = vc->sl;
+       SceneLayer *sl = vc->scene_layer;
        Base *base, *basact = NULL;
        int a;
        
@@ -1359,7 +1359,7 @@ Base *ED_view3d_give_base_under_cursor(bContext *C, const int mval[2])
        
        if (hits > 0) {
                const bool has_bones = selectbuffer_has_bones(buffer, hits);
-               basact = mouse_select_eval_buffer(&vc, buffer, hits, vc.sl->object_bases.first, has_bones, do_nearest);
+               basact = mouse_select_eval_buffer(&vc, buffer, hits, vc.scene_layer->object_bases.first, has_bones, do_nearest);
        }
        
        return basact;
@@ -2019,7 +2019,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
                        CTX_DATA_END;
                }
                else {
-                       object_deselect_all_visible(vc->sl);
+                       object_deselect_all_visible(vc->scene_layer);
                }
        }
 
@@ -2042,7 +2042,7 @@ static int do_object_pose_box_select(bContext *C, ViewContext *vc, rcti *rect, b
                Base *base;
                col = vbuffer + 3;
                
-               for (base = vc->sl->object_bases.first; base && hits; base = base->next) {
+               for (base = vc->scene_layer->object_bases.first; base && hits; base = base->next) {
                        if (BASE_SELECTABLE_NEW(base)) {
                                while (base->selcol == (*col & 0xFFFF)) {   /* we got an object */
                                        if (*col & 0xFFFF0000) {                    /* we got a bone */
@@ -2774,7 +2774,7 @@ static void obedit_circle_select(ViewContext *vc, const bool select, const int m
 
 static bool object_circle_select(ViewContext *vc, const bool select, const int mval[2], float rad)
 {
-       SceneLayer *sl = vc->sl;
+       SceneLayer *sl = vc->scene_layer;
        const float radius_squared = rad * rad;
        const float mval_fl[2] = {mval[0], mval[1]};
        bool changed = false;
index c9fb2dab5e219527953945ea9221230e91871faa..08f8516593f58153f65c61999e076b50a59f7ce6 100644 (file)
@@ -1112,7 +1112,7 @@ int view3d_opengl_select(
         eV3DSelectMode select_mode)
 {
        Scene *scene = vc->scene;
-       SceneLayer *sl = vc->sl;
+       SceneLayer *sl = vc->scene_layer;
        View3D *v3d = vc->v3d;
        ARegion *ar = vc->ar;
        rcti rect;
index 1be4d0c3172b580f41fb7306597c5577659a56a2..c479203bbeb24f4d896d8b0d9dab69670c7c09f2 100644 (file)
@@ -1889,7 +1889,7 @@ static void drawTransformPixel(const struct bContext *UNUSED(C), ARegion *ar, vo
 {      
        TransInfo *t = arg;
        Scene *scene = t->scene;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Object *ob = OBACT_NEW;
        
        /* draw autokeyframing hint in the corner 
index 8765169fcb2abef1bf9b4b944ada27f8e64be2c0..5544b08bbe9367bd0c899eaa6c7a1d82b553f585 100644 (file)
@@ -465,7 +465,7 @@ typedef struct TransInfo {
        struct ScrArea  *sa;
        struct ARegion  *ar;
        struct Scene    *scene;
-       struct SceneLayer *sl;
+       struct SceneLayer *scene_layer;
        struct ToolSettings *settings;
        struct wmTimer *animtimer;
        struct wmKeyMap *keymap;  /* so we can do lookups for header text */
index c09434a3bc98bc7832f08cb32e64ca00cd8f9bb4..9e4c3cdfc7d45b08bbfcafd51709241443cc4d48 100644 (file)
@@ -286,7 +286,7 @@ static void set_prop_dist(TransInfo *t, const bool with_dist)
 
 static void createTransTexspace(TransInfo *t)
 {
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        TransData *td;
        Object *ob;
        ID *id;
@@ -1800,7 +1800,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
        Base *base = CTX_data_active_base(C);
        Object *ob = CTX_data_active_object(C);
        ParticleEditSettings *pset = PE_settings(t->scene);
-       PTCacheEdit *edit = PE_get_current(t->scene, t->sl, ob);
+       PTCacheEdit *edit = PE_get_current(t->scene, t->scene_layer, ob);
        ParticleSystem *psys = NULL;
        ParticleSystemModifierData *psmd = NULL;
        PTCacheEditPoint *point;
@@ -1917,7 +1917,7 @@ static void createTransParticleVerts(bContext *C, TransInfo *t)
 void flushTransParticles(TransInfo *t)
 {
        Scene *scene = t->scene;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Object *ob = OBACT_NEW;
        PTCacheEdit *edit = PE_get_current(scene, sl, ob);
        ParticleSystem *psys = edit->psys;
@@ -5438,7 +5438,7 @@ static void ObjectToTransData(TransInfo *t, TransData *td, Object *ob)
 /* it deselects Bases, so we have to call the clear function always after */
 static void set_trans_object_base_flags(TransInfo *t)
 {
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
 
        /*
         * if Base selected and has parent selected:
@@ -5451,7 +5451,7 @@ static void set_trans_object_base_flags(TransInfo *t)
                return;
 
        /* makes sure base flags and object flags are identical */
-       BKE_scene_base_flag_to_objects(t->sl);
+       BKE_scene_base_flag_to_objects(t->scene_layer);
 
        /* Make sure depsgraph is here. */
        DAG_scene_relations_update(G.main, t->scene);
@@ -5528,7 +5528,7 @@ static bool mark_children(Object *ob)
 static int count_proportional_objects(TransInfo *t)
 {
        int total = 0;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Base *base;
 
        /* rotations around local centers are allowed to propagate, so we take all objects */
@@ -5593,7 +5593,7 @@ static int count_proportional_objects(TransInfo *t)
 
 static void clear_trans_object_base_flags(TransInfo *t)
 {
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Base *base;
 
        for (base = sl->object_bases.first; base; base = base->next) {
@@ -6388,10 +6388,10 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
        else if (t->options & CTX_PAINT_CURVE) {
                /* pass */
        }
-       else if ((t->sl->basact) &&
-                (ob = t->sl->basact->object) &&
+       else if ((t->scene_layer->basact) &&
+                (ob = t->scene_layer->basact->object) &&
                 (ob->mode & OB_MODE_PARTICLE_EDIT) &&
-                PE_get_current(t->scene, t->sl, ob))
+                PE_get_current(t->scene, t->scene_layer, ob))
        {
                /* do nothing */
        }
@@ -6432,7 +6432,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t)
 
                        /* Set autokey if necessary */
                        if (!canceled) {
-                               autokeyframe_ob_cb_func(C, t->scene, t->sl, (View3D *)t->view, ob, t->mode);
+                               autokeyframe_ob_cb_func(C, t->scene, t->scene_layer, (View3D *)t->view, ob, t->mode);
                        }
                        
                        /* restore rigid body transform */
@@ -6516,7 +6516,7 @@ static void createTransObject(bContext *C, TransInfo *t)
        CTX_DATA_END;
        
        if (is_prop_edit) {
-               SceneLayer *sl = t->sl;
+               SceneLayer *sl = t->scene_layer;
                Base *base;
 
                for (base = sl->object_bases.first; base; base = base->next) {
@@ -7972,7 +7972,7 @@ static void createTransGPencil(bContext *C, TransInfo *t)
 void createTransData(bContext *C, TransInfo *t)
 {
        Scene *scene = t->scene;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Object *ob = OBACT_NEW;
 
        /* if tests must match recalcData for correct updates */
@@ -8138,7 +8138,7 @@ void createTransData(bContext *C, TransInfo *t)
                 * lines below just check is also visible */
                Object *ob_armature = modifiers_isDeformedByArmature(ob);
                if (ob_armature && ob_armature->mode & OB_MODE_POSE) {
-                       Base *base_arm = BKE_scene_layer_base_find(t->sl, ob_armature);
+                       Base *base_arm = BKE_scene_layer_base_find(t->scene_layer, ob_armature);
                        if (base_arm) {
                                if (BASE_VISIBLE_NEW(base_arm)) {
                                        createTransPose(t, ob_armature);
index 1d67b574fd03b5a467667bfad946c67b3cab38fa..d9dc6bf0dfd9cd11ef11e8e3a7ab2dd0dcb646a7 100644 (file)
@@ -315,7 +315,7 @@ static bool fcu_test_selected(FCurve *fcu)
 /* helper for recalcData() - for Action Editor transforms */
 static void recalcData_actedit(TransInfo *t)
 {
-       SceneLayer *sl= t->sl;
+       SceneLayer *sl= t->scene_layer;
        SpaceAction *saction = (SpaceAction *)t->sa->spacedata.first;
        
        bAnimContext ac = {NULL};
@@ -326,7 +326,7 @@ static void recalcData_actedit(TransInfo *t)
        /* initialize relevant anim-context 'context' data from TransInfo data */
        /* NOTE: sync this with the code in ANIM_animdata_get_context() */
        ac.scene = t->scene;
-       ac.scene_layer = t->sl;
+       ac.scene_layer = t->scene_layer;
        ac.obact = OBACT_NEW;
        ac.sa = t->sa;
        ac.ar = t->ar;
@@ -364,7 +364,7 @@ static void recalcData_actedit(TransInfo *t)
 static void recalcData_graphedit(TransInfo *t)
 {
        SpaceIpo *sipo = (SpaceIpo *)t->sa->spacedata.first;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        
        ListBase anim_data = {NULL, NULL};
        bAnimContext ac = {NULL};
@@ -376,7 +376,7 @@ static void recalcData_graphedit(TransInfo *t)
        /* initialize relevant anim-context 'context' data from TransInfo data */
        /* NOTE: sync this with the code in ANIM_animdata_get_context() */
        ac.scene = t->scene;
-       ac.scene_layer = t->sl;
+       ac.scene_layer = t->scene_layer;
        ac.obact = OBACT_NEW;
        ac.sa = t->sa;
        ac.ar = t->ar;
@@ -711,7 +711,7 @@ static void recalcData_spaceclip(TransInfo *t)
 /* helper for recalcData() - for object transforms, typically in the 3D view */
 static void recalcData_objects(TransInfo *t)
 {
-       Base *base = t->sl->basact;
+       Base *base = t->scene_layer->basact;
 
        if (t->obedit) {
                if (ELEM(t->obedit->type, OB_CURVE, OB_SURF)) {
@@ -898,7 +898,7 @@ static void recalcData_objects(TransInfo *t)
                else
                        BKE_pose_where_is(t->scene, ob);
        }
-       else if (base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, t->sl, base->object)) {
+       else if (base && (base->object->mode & OB_MODE_PARTICLE_EDIT) && PE_get_current(t->scene, t->scene_layer, base->object)) {
                if (t->state != TRANS_CANCEL) {
                        applyProject(t);
                }
@@ -928,7 +928,7 @@ static void recalcData_objects(TransInfo *t)
                        // TODO: autokeyframe calls need some setting to specify to add samples (FPoints) instead of keyframes?
                        if ((t->animtimer) && IS_AUTOKEY_ON(t->scene)) {
                                animrecord_check_state(t->scene, &ob->id, t->animtimer);
-                               autokeyframe_ob_cb_func(t->context, t->scene, t->sl, (View3D *)t->view, ob, t->mode);
+                               autokeyframe_ob_cb_func(t->context, t->scene, t->scene_layer, (View3D *)t->view, ob, t->mode);
                        }
                        
                        /* sets recalc flags fully, instead of flushing existing ones 
@@ -1120,7 +1120,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
        PropertyRNA *prop;
        
        t->scene = sce;
-       t->sl = sl;
+       t->scene_layer = sl;
        t->sa = sa;
        t->ar = ar;
        t->obedit = obedit;
@@ -1774,7 +1774,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
                }
        }
        else if (t->flag & T_POSE) {
-               SceneLayer *sl = t->sl;
+               SceneLayer *sl = t->scene_layer;
                Object *ob = OBACT_NEW;
                if (ob) {
                        bPoseChannel *pchan = BKE_pose_channel_active(ob);
@@ -1785,7 +1785,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
                }
        }
        else if (t->options & CTX_PAINT_CURVE) {
-               Paint *p = BKE_paint_get_active(t->scene, t->sl);
+               Paint *p = BKE_paint_get_active(t->scene, t->scene_layer);
                Brush *br = p->brush;
                PaintCurve *pc = br->paint_curve;
                copy_v3_v3(r_center, pc->points[pc->add_index - 1].bez.vec[1]);
@@ -1794,7 +1794,7 @@ bool calculateCenterActive(TransInfo *t, bool select_only, float r_center[3])
        }
        else {
                /* object mode */
-               SceneLayer *sl = t->sl;
+               SceneLayer *sl = t->scene_layer;
                Object *ob = OBACT_NEW;
                Base *base = BASACT_NEW;
                if (ob && ((!select_only) || ((base->flag & BASE_SELECTED) != 0))) {
index a37ca83dcf1f24a5ac233152afbd0edada639735..18996de068bbd9e75e7059f6b21ec9ce052a8d93 100644 (file)
@@ -503,7 +503,7 @@ static void initSnappingMode(TransInfo *t)
 {
        ToolSettings *ts = t->settings;
        Object *obedit = t->obedit;
-       SceneLayer *sl = t->sl;
+       SceneLayer *sl = t->scene_layer;
        Base *base_act = sl->basact;
 
        if (t->spacetype == SPACE_NODE) {
@@ -585,7 +585,7 @@ static void initSnappingMode(TransInfo *t)
        if (t->spacetype == SPACE_VIEW3D) {
                if (t->tsnap.object_context == NULL) {
                        t->tsnap.object_context = ED_transform_snap_object_context_create_view3d(
-                               G.main, t->scene, t->sl, 0,
+                               G.main, t->scene, t->scene_layer, 0,
                                t->ar, t->view);
 
                        ED_transform_snap_object_context_set_editmesh_callbacks(