Blender  V3.3
DNA_layer_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
7 #pragma once
8 
9 #include "DNA_freestyle_types.h"
10 #include "DNA_listBase.h"
11 
12 #ifdef __cplusplus
13 extern "C" {
14 #endif
15 
22  EEVEE_RENDER_PASS_Z = (1 << 1),
34  EEVEE_RENDER_PASS_AO = (1 << 13),
36  EEVEE_RENDER_PASS_AOV = (1 << 15),
40 #define EEVEE_RENDER_PASS_MAX_BIT 17
41 
42 /* #ViewLayerAOV.type */
43 typedef enum eViewLayerAOVType {
47 
48 /* #ViewLayerAOV.flag */
49 typedef enum eViewLayerAOVFlag {
50  AOV_CONFLICT = (1 << 0),
52 
53 /* #ViewLayer.cryptomatte_flag */
60 #define VIEW_LAYER_CRYPTOMATTE_ALL \
61  (VIEW_LAYER_CRYPTOMATTE_OBJECT | VIEW_LAYER_CRYPTOMATTE_MATERIAL | VIEW_LAYER_CRYPTOMATTE_ASSET)
62 
63 typedef struct Base {
64  struct Base *next, *prev;
65 
66  /* Flags which are based on the collections flags evaluation, does not
67  * include flags from object's restrictions. */
69 
70  /* Final flags, including both accumulated collection flags and object's
71  * restriction flags. */
72  short flag;
73 
74  unsigned short local_view_bits;
75  short sx, sy;
76  char _pad1[6];
77  struct Object *object;
78  unsigned int lay DNA_DEPRECATED;
80  unsigned short local_collections_bits;
81  short _pad2[3];
82 
83  /* Pointer to an original base. Is initialized for evaluated view layer.
84  * NOTE: Only allowed to be accessed from within active dependency graph. */
85  struct Base *base_orig;
86  void *_pad;
87 } Base;
88 
89 typedef struct ViewLayerEngineData {
92  void *storage;
93  void (*free)(void *storage);
95 
96 typedef struct LayerCollection {
99  struct SceneCollection *scene_collection DNA_DEPRECATED;
100  short flag;
102  char _pad[4];
103 
106 
107  unsigned short local_collections_bits;
108  short _pad2[3];
110 
111 /* Type containing EEVEE settings per view-layer */
112 typedef struct ViewLayerEEVEE {
114  int _pad[1];
116 
118 typedef struct ViewLayerAOV {
119  struct ViewLayerAOV *next, *prev;
120 
121  /* Name of the AOV */
122  char name[64];
123  int flag;
124  /* Type of AOV (color/value)
125  * matches `eViewLayerAOVType` */
126  int type;
128 
130 typedef struct ViewLayerLightgroup {
132 
133  /* Name of the Lightgroup */
134  char name[64];
136 
137 /* Lightgroup membership information. */
138 typedef struct LightgroupMembership {
139  /* Name of the Lightgroup */
140  char name[64];
142 
143 typedef struct ViewLayer {
144  struct ViewLayer *next, *prev;
146  char name[64];
147  short flag;
148  char _pad[6];
152  struct SceneStats *stats;
153  struct Base *basact;
154 
160 
161  /* Old SceneRenderLayer data. */
162  int layflag;
164  int passflag;
168  char _pad1[4];
169 
170  int samples;
171 
175 
177  struct ViewLayerEEVEE eevee;
178 
179  /* List containing the `ViewLayerAOV`s */
182 
183  /* List containing the 'ViewLayerLightgroup`s */
186 
187  /* Runtime data */
193 
194 /* Base->flag */
195 enum {
196  /* User controlled flags. */
197  BASE_SELECTED = (1 << 0), /* Object is selected. */
198  BASE_HIDDEN = (1 << 8), /* Object is hidden for editing. */
199 
200  /* Runtime evaluated flags. */
201  BASE_VISIBLE_DEPSGRAPH = (1 << 1), /* Object is enabled and visible for the depsgraph. */
202  BASE_SELECTABLE = (1 << 2), /* Object can be selected. */
203  BASE_FROM_DUPLI = (1 << 3), /* Object comes from duplicator. */
204  BASE_VISIBLE_VIEWLAYER = (1 << 4), /* Object is enabled and visible for the viewlayer. */
205  BASE_FROM_SET = (1 << 5), /* Object comes from set. */
206  BASE_ENABLED_VIEWPORT = (1 << 6), /* Object is enabled in viewport. */
207  BASE_ENABLED_RENDER = (1 << 7), /* Object is enabled in final render */
208  /* BASE_DEPRECATED = (1 << 9), */
209  BASE_HOLDOUT = (1 << 10), /* Object masked out from render */
210  BASE_INDIRECT_ONLY = (1 << 11), /* Object only contributes indirectly to render */
211 };
212 
213 /* LayerCollection->flag */
214 enum {
215  /* LAYER_COLLECTION_DEPRECATED0 = (1 << 0), */
216  /* LAYER_COLLECTION_DEPRECATED1 = (1 << 1), */
217  /* LAYER_COLLECTION_DEPRECATED2 = (1 << 2), */
218  /* LAYER_COLLECTION_DEPRECATED3 = (1 << 3), */
224 };
225 
226 /* Layer Collection->runtime_flag
227  * Keep it synced with base->flag based on g_base_collection_flags. */
228 enum {
230  /* LAYER_COLLECTION_VISIBLE_DEPSGRAPH = (1 << 1), */ /* UNUSED */
233 };
234 
235 /* ViewLayer->flag */
236 enum {
237  VIEW_LAYER_RENDER = (1 << 0),
238  /* VIEW_LAYER_DEPRECATED = (1 << 1), */
240 };
241 
242 /****************************** Deprecated ******************************/
243 
244 /* Compatibility with collections saved in early 2.8 versions,
245  * used in file reading and versioning code. */
246 #define USE_COLLECTION_COMPAT_28
247 
248 typedef struct SceneCollection {
251  char name[64];
254  short flag;
255  char type;
256  char _pad;
262 
263 #ifdef __cplusplus
264 }
265 #endif
struct LightgroupMembership LightgroupMembership
eViewLayerCryptomatteFlags
@ VIEW_LAYER_CRYPTOMATTE_MATERIAL
@ VIEW_LAYER_CRYPTOMATTE_ASSET
@ VIEW_LAYER_CRYPTOMATTE_ACCURATE
@ VIEW_LAYER_CRYPTOMATTE_OBJECT
struct Base Base
@ LAYER_COLLECTION_HIDE
@ LAYER_COLLECTION_EXCLUDE
@ LAYER_COLLECTION_INDIRECT_ONLY
@ LAYER_COLLECTION_PREVIOUSLY_EXCLUDED
@ LAYER_COLLECTION_HOLDOUT
struct ViewLayerEngineData ViewLayerEngineData
eViewLayerEEVEEPassType
@ EEVEE_RENDER_PASS_UNUSED_8
@ EEVEE_RENDER_PASS_AO
@ EEVEE_RENDER_PASS_NORMAL
@ EEVEE_RENDER_PASS_DIFFUSE_LIGHT
@ EEVEE_RENDER_PASS_VOLUME_LIGHT
@ EEVEE_RENDER_PASS_AOV
@ EEVEE_RENDER_PASS_BLOOM
@ EEVEE_RENDER_PASS_DIFFUSE_COLOR
@ EEVEE_RENDER_PASS_CRYPTOMATTE
@ EEVEE_RENDER_PASS_Z
@ 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_MIST
@ EEVEE_RENDER_PASS_SHADOW
@ BASE_HIDDEN
@ BASE_INDIRECT_ONLY
@ BASE_FROM_DUPLI
@ BASE_FROM_SET
@ BASE_SELECTABLE
@ BASE_ENABLED_RENDER
@ BASE_HOLDOUT
@ BASE_VISIBLE_VIEWLAYER
@ BASE_VISIBLE_DEPSGRAPH
@ BASE_ENABLED_VIEWPORT
@ BASE_SELECTED
eViewLayerAOVType
@ AOV_TYPE_COLOR
@ AOV_TYPE_VALUE
struct ViewLayerLightgroup ViewLayerLightgroup
@ VIEW_LAYER_FREESTYLE
@ VIEW_LAYER_RENDER
struct ViewLayerEEVEE ViewLayerEEVEE
@ LAYER_COLLECTION_VISIBLE_VIEW_LAYER
@ LAYER_COLLECTION_HIDE_VIEWPORT
@ LAYER_COLLECTION_HAS_OBJECTS
struct SceneCollection SceneCollection
struct ViewLayer ViewLayer
eViewLayerAOVFlag
@ AOV_CONFLICT
struct LayerCollection LayerCollection
struct ViewLayerAOV ViewLayerAOV
These structs are the foundation for all linked lists in the library system.
SyclQueue void void size_t num_bytes void
short flag_from_collection
short _pad2[3]
struct Base * next
char _pad1[6]
struct Base * prev
short flag
int flag_legacy
short sy
struct Object * object
unsigned short local_view_bits
void * _pad
unsigned int lay DNA_DEPRECATED
short sx
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 SceneCollection *scene_collection DNA_DEPRECATED
struct SceneCollection * prev
ListBase scene_collections
struct SceneCollection * next
struct ViewLayerAOV * prev
struct ViewLayerAOV * next
struct DrawEngineType * engine_type
struct ViewLayerEngineData * next
void(* free)(void *storage)
struct ViewLayerEngineData * prev
struct ViewLayerLightgroup * prev
struct ViewLayerLightgroup * next
struct ViewLayerEEVEE eevee
ListBase drawdata
char _pad1[4]
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
ListBase layer_collections
LayerCollection * active_collection
char _pad[6]
struct GHash * object_bases_hash
struct Base ** object_bases_array
struct ViewLayer * next
struct Base * basact
struct SceneStats * stats
ListBase object_bases
float pass_alpha_threshold
ListBase aovs
struct Material * mat_override
char name[64]