Remove unused base flag
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 27 Feb 2019 15:12:59 +0000 (16:12 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 28 Feb 2019 15:35:12 +0000 (16:35 +0100)
Was only set and read from a single location.
Removing to keep things more manageable.

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

index 74c7ce6..cf8f94a 100644 (file)
@@ -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 |
index da6960e..7f66cfd 100644 (file)
@@ -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) {
index 4424695..ce51be0 100644 (file)
@@ -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 */
 };