diff options
Diffstat (limited to 'source/blender/makesdna/DNA_layer_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 37 |
1 files changed, 28 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index df2db80fdba..09698716cb3 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -56,7 +56,8 @@ typedef struct LayerCollection { struct Collection *collection; struct SceneCollection *scene_collection DNA_DEPRECATED; short flag; - short pad[3]; + short runtime_flag; + short pad[2]; ListBase layer_collections; /* synced with collection->children */ } LayerCollection; @@ -101,7 +102,8 @@ typedef struct ViewLayer { struct ViewLayer *next, *prev; char name[64]; /* MAX_NAME */ short flag; - short pad[3]; + short runtime_flag; + short pad[2]; ListBase object_bases; /* ObjectBase */ struct SceneStats *stats; /* default allocated now */ struct Base *basact; @@ -130,14 +132,19 @@ typedef struct ViewLayer { /* Base->flag */ enum { - BASE_SELECTED = (1 << 0), - BASE_VISIBLED = (1 << 1), - BASE_SELECTABLED = (1 << 2), - BASE_FROMDUPLI = (1 << 3), + /* User controlled flags. */ + BASE_SELECTED = (1 << 0), /* Object is selected. */ + BASE_HIDDEN = (1 << 8), /* Object is hidden for editing. */ + + /* Runtime evaluated flags. */ + BASE_VISIBLE = (1 << 1), /* Object is enabled and visible. */ + BASE_SELECTABLE = (1 << 2), /* Object can be selected. */ + BASE_FROMDUPLI = (1 << 3), /* Object comes from duplicator. */ /* BASE_DEPRECATED = (1 << 4), */ - BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */ - BASE_VISIBLE_VIEWPORT = (1 << 6), - BASE_VISIBLE_RENDER = (1 << 7), + 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. */ }; /* LayerCollection->flag */ @@ -149,6 +156,13 @@ enum { LAYER_COLLECTION_EXCLUDE = (1 << 4), }; +/* Layer Collection->runtime_flag */ +enum { + LAYER_COLLECTION_HAS_OBJECTS = (1 << 0), + LAYER_COLLECTION_HAS_VISIBLE_OBJECTS = (1 << 1), + LAYER_COLLECTION_HAS_ENABLED_OBJECTS = (1 << 2), +}; + /* ViewLayer->flag */ enum { VIEW_LAYER_RENDER = (1 << 0), @@ -156,6 +170,11 @@ enum { VIEW_LAYER_FREESTYLE = (1 << 2), }; +/* ViewLayer->runtime_flag */ +enum { + VIEW_LAYER_HAS_HIDE = (1 << 0), +}; + /****************************** Deprecated ******************************/ /* Compatibility with collections saved in early 2.8 versions, |