Commit: d4eace74794ea5b20d0fb871c7270ff040f8c3bc
Author: Dalai Felinto
Date:   Mon Feb 6 14:49:26 2017 +0100
Branches: render-layers
https://developer.blender.org/rBd4eace74794ea5b20d0fb871c7270ff040f8c3bc

Base refactor 1/4

Rename Base.flag > Base.flag_legacy

===================================================================

M       source/blender/blenkernel/intern/mball_tessellate.c
M       source/blender/blenkernel/intern/object.c
M       source/blender/blenkernel/intern/scene.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/blenloader/intern/versioning_280.c
M       source/blender/editors/animation/anim_channels_edit.c
M       source/blender/editors/animation/anim_filter.c
M       source/blender/editors/gpencil/gpencil_convert.c
M       source/blender/editors/object/object_constraint.c
M       source/blender/editors/object/object_relations.c
M       source/blender/editors/object/object_select.c
M       source/blender/editors/space_info/info_stats.c
M       source/blender/editors/space_logic/logic_window.c
M       source/blender/editors/space_nla/nla_channels.c
M       source/blender/editors/space_outliner/outliner_select.c
M       source/blender/editors/space_outliner/outliner_tools.c
M       source/blender/editors/space_view3d/drawarmature.c
M       source/blender/editors/space_view3d/drawobject.c
M       source/blender/editors/space_view3d/view3d_draw_legacy.c
M       source/blender/editors/space_view3d/view3d_select.c
M       source/blender/editors/space_view3d/view3d_view.c
M       source/blender/editors/transform/transform_conversions.c
M       source/blender/editors/transform/transform_snap_object.c
M       source/blender/editors/uvedit/uvedit_draw.c
M       source/blender/makesdna/DNA_scene_types.h
M       source/blender/makesrna/intern/rna_object.c

===================================================================

diff --git a/source/blender/blenkernel/intern/mball_tessellate.c 
b/source/blender/blenkernel/intern/mball_tessellate.c
index 5c0b09f0ff..2ba3ede8c1 100644
--- a/source/blender/blenkernel/intern/mball_tessellate.c
+++ b/source/blender/blenkernel/intern/mball_tessellate.c
@@ -1102,7 +1102,7 @@ static void init_meta(EvaluationContext *eval_ctx, 
PROCESS *process, Scene *scen
                        zero_size = 0;
                        ml = NULL;
 
-                       if (bob == ob && (base->flag & OB_FROMDUPLI) == 0) {
+                       if (bob == ob && (base->flag_legacy & OB_FROMDUPLI) == 
0) {
                                mb = ob->data;
 
                                if (mb->editelems) ml = mb->editelems->first;
diff --git a/source/blender/blenkernel/intern/object.c 
b/source/blender/blenkernel/intern/object.c
index f781717122..8f7c3f53ca 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -2549,7 +2549,7 @@ void BKE_scene_foreach_display_point(
        Object *ob;
 
        for (base = FIRSTBASE; base; base = base->next) {
-               if (BASE_VISIBLE_BGMODE(v3d, scene, base) && (base->flag & 
flag) == flag) {
+               if (BASE_VISIBLE_BGMODE(v3d, scene, base) && (base->flag_legacy 
& flag) == flag) {
                        ob = base->object;
 
                        if ((ob->transflag & OB_DUPLI) == 0) {
diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index cc136e8e74..8edcac9a72 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1108,7 +1108,7 @@ int BKE_scene_base_iter_next(EvaluationContext *eval_ctx, 
SceneBaseIter *iter,
                                }
                                /* handle dupli's */
                                if (iter->dupob) {
-                                       (*base)->flag |= OB_FROMDUPLI;
+                                       (*base)->flag_legacy |= OB_FROMDUPLI;
                                        *ob = iter->dupob->ob;
                                        iter->phase = F_DUPLI;
 
@@ -1127,7 +1127,7 @@ int BKE_scene_base_iter_next(EvaluationContext *eval_ctx, 
SceneBaseIter *iter,
                                }
                                else if (iter->phase == F_DUPLI) {
                                        iter->phase = F_SCENE;
-                                       (*base)->flag &= ~OB_FROMDUPLI;
+                                       (*base)->flag_legacy &= ~OB_FROMDUPLI;
                                        
                                        if (iter->dupli_refob) {
                                                /* Restore last object's real 
matrix. */
@@ -1272,7 +1272,7 @@ Base *BKE_scene_base_add(Scene *sce, Object *ob)
        BLI_addhead(&sce->base, b);
 
        b->object = ob;
-       b->flag = ob->flag;
+       b->flag_legacy = ob->flag;
        b->lay = ob->lay;
 
        return b;
@@ -1292,17 +1292,17 @@ void BKE_scene_base_deselect_all(Scene *sce)
        Base *b;
 
        for (b = sce->base.first; b; b = b->next) {
-               b->flag &= ~SELECT;
+               b->flag_legacy &= ~SELECT;
                int flag = b->object->flag & (OB_FROMGROUP);
-               b->object->flag = b->flag;
+               b->object->flag = b->flag_legacy;
                b->object->flag |= flag;
        }
 }
 
 void BKE_scene_base_select(Scene *sce, Base *selbase)
 {
-       selbase->flag |= SELECT;
-       selbase->object->flag = selbase->flag;
+       selbase->flag_legacy |= SELECT;
+       selbase->object->flag = selbase->flag_legacy;
 
        sce->basact = selbase;
 }
@@ -1773,13 +1773,13 @@ void BKE_scene_base_flag_sync_from_base(Base *base)
        /* keep the object only flags untouched */
        int flag = ob->flag & OB_FROMGROUP;
 
-       ob->flag = base->flag;
+       ob->flag = base->flag_legacy;
        ob->flag |= flag;
 }
 
 void BKE_scene_base_flag_sync_from_object(Base *base)
 {
-       base->flag = base->object->flag;
+       base->flag_legacy = base->object->flag;
 }
 
 void BKE_scene_object_base_flag_sync_from_base(ObjectBase *base)
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index b12f1d410c..8047b8a503 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -9994,7 +9994,7 @@ static void give_base_to_groups(
 
                        /* assign the base */
                        base = BKE_scene_base_add(scene, ob);
-                       base->flag |= SELECT;
+                       base->flag_legacy |= SELECT;
                        BKE_scene_base_flag_sync_from_base(base);
                        DAG_id_tag_update(&ob->id, OB_RECALC_OB | 
OB_RECALC_DATA | OB_RECALC_TIME);
                        scene->basact = base;
@@ -10093,11 +10093,11 @@ static void link_object_postprocess(ID *id, Scene 
*scene, View3D *v3d, const sho
                ob->mode = OB_MODE_OBJECT;
                base->lay = ob->lay;
                base->object = ob;
-               base->flag = ob->flag;
+               base->flag_legacy = ob->flag;
                id_us_plus_no_lib((ID *)ob);
 
                if (flag & FILE_AUTOSELECT) {
-                       base->flag |= SELECT;
+                       base->flag_legacy |= SELECT;
                        BKE_scene_base_flag_sync_from_base(base);
                        /* do NOT make base active here! screws up GUI stuff, 
if you want it do it on src/ level */
                }
diff --git a/source/blender/blenloader/intern/versioning_280.c 
b/source/blender/blenloader/intern/versioning_280.c
index 92592e9fc6..75d7211d41 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -138,7 +138,7 @@ void do_versions_after_linking_280(Main *main)
                                /* convert selected bases */
                                for (Base *base = scene->base.first; base; base 
= base->next) {
                                        ObjectBase *ob_base = 
BKE_scene_layer_base_find(sl, base->object);
-                                       if ((base->flag & SELECT) != 0) {
+                                       if ((base->flag_legacy & SELECT) != 0) {
                                                if ((ob_base->flag & 
BASE_SELECTABLED) != 0) {
                                                        ob_base->flag |= 
BASE_SELECTED;
                                                }
diff --git a/source/blender/editors/animation/anim_channels_edit.c 
b/source/blender/editors/animation/anim_channels_edit.c
index 985ef1e13d..b2ce46e8f3 100644
--- a/source/blender/editors/animation/anim_channels_edit.c
+++ b/source/blender/editors/animation/anim_channels_edit.c
@@ -2690,7 +2690,7 @@ static int mouse_anim_channels(bContext *C, bAnimContext 
*ac, int channel_index,
                        /* set selection status */
                        if (selectmode == SELECT_INVERT) {
                                /* swap select */
-                               base->flag ^= SELECT;
+                               base->flag_legacy ^= SELECT;
                                BKE_scene_base_flag_sync_from_base(base);
                                
                                if (adt) adt->flag ^= ADT_UI_SELECTED;
@@ -2701,13 +2701,13 @@ static int mouse_anim_channels(bContext *C, 
bAnimContext *ac, int channel_index,
                                /* deselect all */
                                /* TODO: should this deselect all other types 
of channels too? */
                                for (b = sce->base.first; b; b = b->next) {
-                                       b->flag &= ~SELECT;
+                                       b->flag_legacy &= ~SELECT;
                                        BKE_scene_base_flag_sync_from_base(b);
                                        if (b->object->adt) 
b->object->adt->flag &= ~(ADT_UI_SELECTED | ADT_UI_ACTIVE);
                                }
                                
                                /* select object now */
-                               base->flag |= SELECT;
+                               base->flag_legacy |= SELECT;
                                ob->flag |= SELECT;
                                if (adt) adt->flag |= ADT_UI_SELECTED;
                        }
diff --git a/source/blender/editors/animation/anim_filter.c 
b/source/blender/editors/animation/anim_filter.c
index 2f73eb6b71..1b19e7873c 100644
--- a/source/blender/editors/animation/anim_filter.c
+++ b/source/blender/editors/animation/anim_filter.c
@@ -1714,7 +1714,7 @@ static size_t animdata_filter_gpencil(bAnimContext *ac, 
ListBase *anim_data, voi
                                }
                                
                                /* check selection and object type filters */
-                               if ( (ads->filterflag & ADS_FILTER_ONLYSEL) && 
!((base->flag & SELECT) /*|| (base == scene->basact)*/) ) {
+                               if ( (ads->filterflag & ADS_FILTER_ONLYSEL) && 
!((base->flag_legacy & SELECT) /*|| (base == scene->basact)*/) ) {
                                        /* only selected should be shown */
                                        continue;
                                }
@@ -2629,7 +2629,7 @@ static size_t animdata_filter_dopesheet_ob(bAnimContext 
*ac, ListBase *anim_data
                if (filter_mode & ANIMFILTER_LIST_CHANNELS) {
                        /* check if filtering by selection */
                        // XXX: double-check on this - most of the time, a lot 
of tools need to filter out these channels!
-                       if (ANIMCHANNEL_SELOK((base->flag & SELECT))) {
+                       if (ANIMCHANNEL_SELOK((base->flag_legacy & SELECT))) {
                                /* check if filtering by active status */
                                if (ANIMCHANNEL_ACTIVEOK(ob)) {
                                        ANIMCHANNEL_NEW_CHANNEL(base, 
ANIMTYPE_OBJECT, ob);
@@ -2906,7 +2906,7 @@ static bool animdata_filter_base_is_ok(bDopeSheet *ads, 
Scene *scene, Base *base
        }
 
        /* check selection and object type filters */
-       if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag & SELECT) 
/*|| (base == sce->basact)*/)) {
+       if ((ads->filterflag & ADS_FILTER_ONLYSEL) && !((base->flag_legacy & 
SELECT) /*|| (base == sce->basact)*/)) {
                /* only selected should be shown */
                return false;
        }
diff --git a/source/blender/editors/gpencil/gpencil_convert.c 
b/source/blender/editors/gpencil/gpencil_convert.c
index a004d7806b..6c948b88e6 100644
--- a/source/blender/editors/gpencil/gpencil_convert.c
+++ b/source/blender/editors/gpencil/gpencil_convert.c
@@ -1217,7 +1217,7 @@ static void gp_layer_to_curve(bContext *C, ReportList 
*reports, bGPdata *gpd, bG
        
        /* set the layer and select */
        base_new->lay  = ob->lay  = base_orig ? base_orig->lay : 
BKE_screen_view3d_layer_active(v3d, scene);
-       base_new->flag |= SELECT;
+       base_new->flag_legacy |= SELECT;
        BKE_scene_base_flag_sync_from_base(base_new);
 }
 
diff --git a/source/blender/editors/object/object_constraint.c 
b/source/blender/editors/object/object_constraint.c
index 5045c5b119..0816942bdb 100644
--- a/source/blender/editors/object/object_constraint.c
+++ b/source/blender/editors/object/object_constraint.c
@@ -1710,7 +1710,7 @@ static bool get_new_constraint_target(bContext *C, int 
con_type, Object **tar_ob
 
                /* restore, BKE_object_add sets active */
                BASACT = base;
-               base->flag |= SELECT;
+               base->flag_legacy |= SELECT;
                
                /* make our new target the new object */
                *tar_ob = obt;
diff --git a/source/blender/editors/object/object_relations.c 
b/source/blender/editors/object/object_relations.c
index f4731eaec0..18d4c11785 100644
--- a/source/blender/editors/object/object_relations.c
+++ b/source/blender/editors/object/object_relations.c
@@ -1779,7 +1779,7 @@ static void single_obdata_users(Main *bmain, Scene 
*scene, const int flag)
 
        for (base = FIRSTBASE; base; base = base->next) {
                ob = base->object;
-               if (!ID_IS_LINKED_DATABLOCK(ob) && (base->flag & flag) == flag) 
{
+               if (!ID_IS_LINKED_DATABLOCK(ob) && (base->flag_legacy & flag) 
== flag) {
                        id = ob->data;
 
                        if (id && id->us > 1 && !ID_IS_LINKED_DATABLOCK(id)) {
@@ -2109,7 +2109,7 @@ static bool make_local_all__instance_indirect_unused(Main 
*bmain, Scene *scene)
                        id_us_plus(&ob->id);
 
                        base = BKE_scene_base_add(scene, ob);
-                       base->flag |= SELECT;
+                       base->flag_legacy |= SELECT;
                        BKE_scene_base_flag_sync_from_base(base);
                        DAG_id_tag_update(&ob->id, OB_RECALC_OB | 
OB_RECALC_DATA | OB_RECALC_TIME);
 
diff --git a/source/blende

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to