diff options
Diffstat (limited to 'source/blender/makesdna/DNA_layer_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 85 |
1 files changed, 59 insertions, 26 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index 0af50b2bd4f..827e07725a1 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -34,10 +34,18 @@ typedef enum eViewLayerEEVEEPassType { EEVEE_RENDER_PASS_AO = (1 << 13), EEVEE_RENDER_PASS_BLOOM = (1 << 14), EEVEE_RENDER_PASS_AOV = (1 << 15), + /* + * TODO(@jbakker): Clean up conflicting bits after EEVEE has been removed. + * #EEVEE_RENDER_PASS_CRYPTOMATTE is for EEVEE, `EEVEE_RENDER_PASS_CRYTPOMATTE_*` are for + * EEVEE-Next. + */ EEVEE_RENDER_PASS_CRYPTOMATTE = (1 << 16), - EEVEE_RENDER_PASS_VECTOR = (1 << 17), + EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT = (1 << 16), + EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET = (1 << 17), + EEVEE_RENDER_PASS_CRYPTOMATTE_MATERIAL = (1 << 18), + EEVEE_RENDER_PASS_VECTOR = (1 << 19), } eViewLayerEEVEEPassType; -#define EEVEE_RENDER_PASS_MAX_BIT 17 +#define EEVEE_RENDER_PASS_MAX_BIT 20 /* #ViewLayerAOV.type */ typedef enum eViewLayerAOVType { @@ -63,27 +71,23 @@ typedef enum eViewLayerCryptomatteFlags { typedef struct Base { struct Base *next, *prev; - /* Flags which are based on the collections flags evaluation, does not - * include flags from object's restrictions. */ - short flag_from_collection; + struct Object *object; + + /* Pointer to an original base. Is initialized for evaluated view layer. + * NOTE: Only allowed to be accessed from within active dependency graph. */ + struct Base *base_orig; + unsigned int lay DNA_DEPRECATED; /* Final flags, including both accumulated collection flags and object's * restriction flags. */ short flag; - + /* Flags which are based on the collections flags evaluation, does not + * include flags from object's restrictions. */ + short flag_from_collection; + short flag_legacy; unsigned short local_view_bits; - short sx, sy; - char _pad1[6]; - struct Object *object; - unsigned int lay DNA_DEPRECATED; - int flag_legacy; unsigned short local_collections_bits; - short _pad2[3]; - - /* Pointer to an original base. Is initialized for evaluated view layer. - * NOTE: Only allowed to be accessed from within active dependency graph. */ - struct Base *base_orig; - void *_pad; + char _pad1[2]; } Base; typedef struct ViewLayerEngineData { @@ -198,16 +202,44 @@ enum { BASE_HIDDEN = (1 << 8), /* Object is hidden for editing. */ /* Runtime evaluated flags. */ - BASE_VISIBLE_DEPSGRAPH = (1 << 1), /* Object is enabled and visible for the depsgraph. */ - BASE_SELECTABLE = (1 << 2), /* Object can be selected. */ - BASE_FROM_DUPLI = (1 << 3), /* Object comes from duplicator. */ - BASE_VISIBLE_VIEWLAYER = (1 << 4), /* Object is enabled and visible for the viewlayer. */ - 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 */ + + /* Object is enabled and potentially visible in a viewport. Layer collection + * visibility, local collection visibility, and local view are not part of this + * and may cause the object to be hidden depending on the 3D viewport settings. + * + * Objects with this flag will be considered visible by the viewport depsgraph + * and be evaluated as a result. + * + * This implies BASE_ENABLED_VIEWPORT. */ + BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT = (1 << 1), + + /* Object can be selected. */ + BASE_SELECTABLE = (1 << 2), + + /* Object comes from a duplicator. */ + BASE_FROM_DUPLI = (1 << 3), + + /* Object is enabled and visible in a viewport with default viewport settings, + * (so without any local view or local collection visibility overrides). Used + * when editors other than the 3D viewport need to know if an object is visible. */ + BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT = (1 << 4), + + /* Object comes from a scene set. */ + BASE_FROM_SET = (1 << 5), + + /* Object is enabled for viewport or final render respectively. Only enabled + * objects can be pulled into the depsgraph for evaluation, either through being + * directly visible, as a dependency of another object, or as part of colliders + * and effectors for physics. */ + BASE_ENABLED_VIEWPORT = (1 << 6), + BASE_ENABLED_RENDER = (1 << 7), + /* BASE_DEPRECATED = (1 << 9), */ - BASE_HOLDOUT = (1 << 10), /* Object masked out from render */ - BASE_INDIRECT_ONLY = (1 << 11), /* Object only contributes indirectly to render */ + + /* Object masked out from render */ + BASE_HOLDOUT = (1 << 10), + /* Object only contributes indirectly to render */ + BASE_INDIRECT_ONLY = (1 << 11), }; /* LayerCollection->flag */ @@ -237,6 +269,7 @@ enum { VIEW_LAYER_RENDER = (1 << 0), /* VIEW_LAYER_DEPRECATED = (1 << 1), */ VIEW_LAYER_FREESTYLE = (1 << 2), + VIEW_LAYER_OUT_OF_SYNC = (1 << 3), }; /****************************** Deprecated ******************************/ |