Blender V5.0
DNA_layer_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2023 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
8
9#pragma once
10
11#include "DNA_freestyle_types.h"
12#include "DNA_listBase.h"
13
14#include "BLI_utildefines.h"
15
35 EEVEE_RENDER_PASS_UNUSED_14 = (1 << 14), /* EEVEE_RENDER_PASS_BLOOM */
37 /*
38 * TODO(@jbakker): Clean up conflicting bits after EEVEE has been removed.
39 * #EEVEE_RENDER_PASS_CRYPTOMATTE is for EEVEE, `EEVEE_RENDER_PASS_CRYTPOMATTE_*` are for
40 * EEVEE-Next.
41 */
50#define EEVEE_RENDER_PASS_MAX_BIT 21
52
53/* #ViewLayer::grease_pencil_flags */
57
58/* #ViewLayerAOV.type */
63
64/* #ViewLayerAOV.flag */
68
69/* #ViewLayer.cryptomatte_flag */
77#define VIEW_LAYER_CRYPTOMATTE_ALL \
78 (VIEW_LAYER_CRYPTOMATTE_OBJECT | VIEW_LAYER_CRYPTOMATTE_MATERIAL | VIEW_LAYER_CRYPTOMATTE_ASSET)
79
80typedef struct Base {
81 struct Base *next, *prev;
82
83 struct Object *object;
84
85 /* Pointer to an original base. Is initialized for evaluated view layer.
86 * NOTE: Only allowed to be accessed from within active dependency graph. */
87 struct Base *base_orig;
88
89 unsigned int lay DNA_DEPRECATED;
90 /* Final flags, including both accumulated collection flags and object's
91 * restriction flags. */
92 short flag;
93 /* Flags which are based on the collections flags evaluation, does not
94 * include flags from object's restrictions. */
97 unsigned short local_view_bits;
98 unsigned short local_collections_bits;
99 char _pad1[2];
101
116
117/* Type containing EEVEE settings per view-layer */
122
124typedef struct ViewLayerAOV {
126
127 /* Name of the AOV */
128 char name[64];
129 int flag;
130 /* Type of AOV (color/value)
131 * matches `eViewLayerAOVType` */
132 int type;
134
136typedef struct ViewLayerLightgroup {
138
139 /* Name of the Light-group. */
140 char name[64];
142
143/* Light-group membership information. */
144typedef struct LightgroupMembership {
145 /* Name of the Light-group. */
146 char name[64];
148
199
200/* Base->flag */
201enum {
202 /* User controlled flags. */
203 BASE_SELECTED = (1 << 0), /* Object is selected. */
204 BASE_HIDDEN = (1 << 8), /* Object is hidden for editing. */
205
206 /* Runtime evaluated flags. */
207
208 /* Object is enabled and potentially visible in a viewport. Layer collection
209 * visibility, local collection visibility, and local view are not part of this
210 * and may cause the object to be hidden depending on the 3D viewport settings.
211 *
212 * Objects with this flag will be considered visible by the viewport depsgraph
213 * and be evaluated as a result.
214 *
215 * This implies BASE_ENABLED_VIEWPORT. */
217
218 /* Object can be selected. */
219 BASE_SELECTABLE = (1 << 2),
220
221 /* Object comes from a duplicator. */
222 BASE_FROM_DUPLI = (1 << 3),
223
224 /* Object is enabled and visible in a viewport with default viewport settings,
225 * (so without any local view or local collection visibility overrides). Used
226 * when editors other than the 3D viewport need to know if an object is visible. */
228
229 /* Object comes from a scene set. */
230 BASE_FROM_SET = (1 << 5),
231
232 /* Object is enabled for viewport or final render respectively. Only enabled
233 * objects can be pulled into the depsgraph for evaluation, either through being
234 * directly visible, as a dependency of another object, or as part of colliders
235 * and effectors for physics. */
238
239 /* BASE_DEPRECATED = (1 << 9), */
240
241 /* Object masked out from render */
242 BASE_HOLDOUT = (1 << 10),
243 /* Object only contributes indirectly to render */
245};
246
247/* LayerCollection->flag */
248enum {
249 /* LAYER_COLLECTION_DEPRECATED0 = (1 << 0), */
250 /* LAYER_COLLECTION_DEPRECATED1 = (1 << 1), */
251 /* LAYER_COLLECTION_DEPRECATED2 = (1 << 2), */
252 /* LAYER_COLLECTION_DEPRECATED3 = (1 << 3), */
258};
259
260/* Layer Collection->runtime_flag
261 * Keep it synced with base->flag based on g_base_collection_flags. */
262enum {
264 /* LAYER_COLLECTION_VISIBLE_DEPSGRAPH = (1 << 1), */ /* UNUSED */
267};
268
269/* ViewLayer->flag */
270enum {
272 /* VIEW_LAYER_DEPRECATED = (1 << 1), */
276};
#define ENUM_OPERATORS(_type, _max)
eViewLayerCryptomatteFlags
@ VIEW_LAYER_CRYPTOMATTE_MATERIAL
@ VIEW_LAYER_CRYPTOMATTE_ASSET
@ VIEW_LAYER_CRYPTOMATTE_ACCURATE
@ VIEW_LAYER_CRYPTOMATTE_OBJECT
@ LAYER_COLLECTION_HIDE
@ LAYER_COLLECTION_EXCLUDE
@ LAYER_COLLECTION_INDIRECT_ONLY
@ LAYER_COLLECTION_PREVIOUSLY_EXCLUDED
@ LAYER_COLLECTION_HOLDOUT
@ BASE_HIDDEN
@ BASE_INDIRECT_ONLY
@ BASE_FROM_DUPLI
@ BASE_FROM_SET
@ BASE_ENABLED_AND_VISIBLE_IN_DEFAULT_VIEWPORT
@ BASE_ENABLED_AND_MAYBE_VISIBLE_IN_VIEWPORT
@ BASE_ENABLED_RENDER
@ BASE_HOLDOUT
@ BASE_ENABLED_VIEWPORT
@ LAYER_COLLECTION_VISIBLE_VIEW_LAYER
@ LAYER_COLLECTION_HIDE_VIEWPORT
@ LAYER_COLLECTION_HAS_OBJECTS
eViewLayerGreasePencilFlags
@ GREASE_PENCIL_AS_SEPARATE_PASS
#define EEVEE_RENDER_PASS_MAX_BIT
eViewLayerEEVEEPassType
@ EEVEE_RENDER_PASS_UNUSED_8
@ EEVEE_RENDER_PASS_CRYPTOMATTE_MATERIAL
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_NORMAL
@ EEVEE_RENDER_PASS_UNUSED_14
@ EEVEE_RENDER_PASS_CRYPTOMATTE_OBJECT
@ EEVEE_RENDER_PASS_DIFFUSE_LIGHT
@ EEVEE_RENDER_PASS_VOLUME_LIGHT
@ EEVEE_RENDER_PASS_AOV
@ EEVEE_RENDER_PASS_DIFFUSE_COLOR
@ EEVEE_RENDER_PASS_CRYPTOMATTE_ASSET
@ EEVEE_RENDER_PASS_CRYPTOMATTE
@ EEVEE_RENDER_PASS_ENVIRONMENT
@ EEVEE_RENDER_PASS_COMBINED
@ EEVEE_RENDER_PASS_SPECULAR_LIGHT
@ EEVEE_RENDER_PASS_VECTOR
@ EEVEE_RENDER_PASS_SPECULAR_COLOR
@ EEVEE_RENDER_PASS_EMIT
@ EEVEE_RENDER_PASS_DEPTH
@ EEVEE_RENDER_PASS_MIST
@ EEVEE_RENDER_PASS_TRANSPARENT
@ EEVEE_RENDER_PASS_SHADOW
@ EEVEE_RENDER_PASS_POSITION
eViewLayerAOVType
@ AOV_TYPE_COLOR
@ AOV_TYPE_VALUE
eViewLayerAOVFlag
@ AOV_CONFLICT
@ VIEW_LAYER_HAS_EXPORT_COLLECTIONS
@ VIEW_LAYER_FREESTYLE
@ VIEW_LAYER_RENDER
@ VIEW_LAYER_OUT_OF_SYNC
These structs are the foundation for all linked lists in the library system.
#define BASE_SELECTED(v3d, base)
#define BASE_SELECTABLE(v3d, base)
#define typedef
short flag_from_collection
struct Base * next
struct Base * prev
short flag
struct Object * object
unsigned short local_view_bits
char _pad1[2]
unsigned int lay DNA_DEPRECATED
short flag_legacy
unsigned short local_collections_bits
struct Base * base_orig
struct LayerCollection * prev
struct LayerCollection * next
ListBase layer_collections
unsigned short local_collections_bits
struct Collection * collection
struct ViewLayerAOV * prev
struct ViewLayerAOV * next
float ambient_occlusion_distance
struct ViewLayerLightgroup * prev
struct ViewLayerLightgroup * next
struct ViewLayerEEVEE eevee
struct FreestyleConfig freestyle_config
short cryptomatte_flag
ListBase lightgroups
struct IDProperty * id_properties
short cryptomatte_levels
ViewLayerLightgroup * active_lightgroup
ViewLayerAOV * active_aov
struct ViewLayer * prev
int grease_pencil_flags
ListBase layer_collections
struct World * world_override
LayerCollection * active_collection
struct GHash * object_bases_hash
struct Base ** object_bases_array
struct ViewLayer * next
struct Base * basact
struct SceneStats * stats
struct IDProperty * system_properties
ListBase object_bases
float pass_alpha_threshold
ListBase aovs
struct Material * mat_override
char name[64]