Commit: 7895c6b83db862b13afee1facd8b6dc5e24dbede
Author: Sergey Sharybin
Date:   Wed Feb 27 16:12:59 2019 +0100
Branches: master
https://developer.blender.org/rB7895c6b83db862b13afee1facd8b6dc5e24dbede

Remove unused base flag

Was only set and read from a single location.
Removing to keep things more manageable.

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

M       source/blender/blenkernel/intern/layer.c
M       source/blender/blenkernel/intern/object_update.c
M       source/blender/makesdna/DNA_layer_types.h

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

diff --git a/source/blender/blenkernel/intern/layer.c 
b/source/blender/blenkernel/intern/layer.c
index 74c7ce6d9bd..cf8f94abdae 100644
--- a/source/blender/blenkernel/intern/layer.c
+++ b/source/blender/blenkernel/intern/layer.c
@@ -705,7 +705,7 @@ static short layer_collection_sync(
                        if (((child_restrict & COLLECTION_RESTRICT_VIEW) == 0) 
&&
                            ((object_restrict & OB_RESTRICT_VIEW) == 0))
                        {
-                               base->flag |= BASE_ENABLED | 
BASE_ENABLED_VIEWPORT;
+                               base->flag |= BASE_ENABLED_VIEWPORT;
 
                                if ((child_layer_restrict & 
LAYER_COLLECTION_RESTRICT_VIEW) == 0) {
                                        base->flag |= BASE_VISIBLE;
@@ -725,7 +725,7 @@ static short layer_collection_sync(
                        }
 
                        /* Update runtime flags used for display and tools. */
-                       if (base->flag & BASE_ENABLED) {
+                       if (base->flag & BASE_ENABLED_VIEWPORT) {
                                lc->runtime_flag |= 
LAYER_COLLECTION_HAS_ENABLED_OBJECTS;
                        }
 
@@ -782,7 +782,6 @@ void BKE_layer_collection_sync(const Scene *scene, 
ViewLayer *view_layer)
        /* Clear visible and selectable flags to be reset. */
        for (Base *base = view_layer->object_bases.first; base; base = 
base->next) {
                base->flag &= ~(BASE_VISIBLE |
-                               BASE_ENABLED |
                                BASE_SELECTABLE |
                                BASE_ENABLED_VIEWPORT |
                                BASE_ENABLED_RENDER |
diff --git a/source/blender/blenkernel/intern/object_update.c 
b/source/blender/blenkernel/intern/object_update.c
index da6960ebc95..7f66cfd5dc3 100644
--- a/source/blender/blenkernel/intern/object_update.c
+++ b/source/blender/blenkernel/intern/object_update.c
@@ -430,14 +430,13 @@ void BKE_object_eval_eval_base_flags(Depsgraph *depsgraph,
 
        /* Compute visibility for depsgraph evaluation mode. */
        if (base->flag & base_enabled_flag) {
-               base->flag |= BASE_ENABLED;
                /* When rendering, visibility is controlled by the 
enable/disable option. */
                if (mode == DAG_EVAL_RENDER) {
                        base->flag |= BASE_VISIBLE;
                }
        }
        else {
-               base->flag &= ~(BASE_ENABLED | BASE_VISIBLE | BASE_SELECTABLE);
+               base->flag &= ~(BASE_VISIBLE | BASE_SELECTABLE);
        }
        /* If base is not selectable, clear select. */
        if ((base->flag & BASE_SELECTABLE) == 0) {
diff --git a/source/blender/makesdna/DNA_layer_types.h 
b/source/blender/makesdna/DNA_layer_types.h
index 44246952468..ce51be0d620 100644
--- a/source/blender/makesdna/DNA_layer_types.h
+++ b/source/blender/makesdna/DNA_layer_types.h
@@ -111,7 +111,7 @@ enum {
        BASE_FROM_SET         = (1 << 5), /* Object comes from set. */
        BASE_ENABLED_VIEWPORT = (1 << 6), /* Object is enabled in viewport. */
        BASE_ENABLED_RENDER   = (1 << 7), /* Object is enabled in final render 
*/
-       BASE_ENABLED          = (1 << 9), /* Object is enabled. */
+       /* BASE_DEPRECATED          = (1 << 9), */
        BASE_HOLDOUT          = (1 << 10), /* Object masked out from render */
        BASE_INDIRECT_ONLY    = (1 << 11), /* Object only contributes 
indirectly to render */
 };

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to