Blender V4.5
DNA_collection_types.h
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2001-2002 NaN Holding BV. All rights reserved.
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
10
11#pragma once
12
13#include "DNA_ID.h"
14#include "DNA_defs.h"
15#include "DNA_listBase.h"
16
17struct Collection;
18struct Object;
19struct GHash;
20
21/* Light linking relation of a collection or an object. */
22typedef struct CollectionLightLinking {
23 /* Light and shadow linking configuration, an enumerator of eCollectionLightLinkingState.
24 * The meaning depends on whether the collection is specified as a light or shadow linking on the
25 * Object's LightLinking.
26 *
27 * For the light linking collection:
28 *
29 * - INCLUDE: the receiver is included into the light linking and is only receiving lights from
30 * emitters which include it in their light linking collections. The receiver is not affected
31 * by regular scene lights.
32 *
33 * - EXCLUDE: the receiver does not receive light from this emitter, but is lit by regular
34 * lights in the scene or by emitters which are linked to it via INCLUDE on their
35 * light_state.
36 *
37 * For the shadow linking collection:
38 *
39 * - INCLUDE: the collection or object casts shadows from the emitter. It does not cast shadow
40 * from light sources which do not have INCLUDE on their light linking configuration for it.
41 *
42 * - EXCLUDE: the collection or object does not cast shadow when lit by this emitter, but does
43 * for other light sources in the scene. */
44 uint8_t link_state;
45
46 uint8_t _pad[3];
48
56
64
65/* Collection IO property storage and access. */
66typedef struct CollectionExport {
68
70 char fh_idname[64];
71 char name[64];
72
74 uint32_t flag;
75
76 uint32_t _pad0;
78
82
83/* Light linking state of object or collection: defines how they react to the emitters in the
84 * scene. See the comment for the link_state in the CollectionLightLinking for the details. */
89
98
103
125
126typedef struct Collection {
127#ifdef __cplusplus
129 static constexpr ID_Type id_type = ID_GR;
130#endif
131
133
136
141
142 char _pad0[4];
143
146
148
149 unsigned int layer DNA_DEPRECATED;
151
152 uint8_t flag;
153 int8_t color_tag;
154
155 char _pad1[2];
156
157 uint8_t lineart_usage; /* #eCollectionLineArt_Usage */
158 uint8_t lineart_flags; /* #eCollectionLineArt_Flags */
161
162 struct ViewLayer *view_layer DNA_DEPRECATED;
163
164 /* Keep last. */
167
169enum {
174 // COLLECTION_DISABLED_DEPRECATED = (1 << 2), /* DIRTY */
183};
184
185#define COLLECTION_FLAG_ALL_RUNTIME \
186 (COLLECTION_HAS_OBJECT_CACHE | COLLECTION_HAS_OBJECT_CACHE_INSTANCED)
187
189enum {
203};
204
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_GR
@ COLLECTION_HIDE_RENDER
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
@ COLLECTION_HIDE_SELECT
@ COLLECTION_IS_MASTER
@ COLLECTION_HAS_OBJECT_CACHE
@ COLLECTION_HIDE_VIEWPORT
eCollectionLightLinkingState
@ COLLECTION_LIGHT_LINKING_STATE_EXCLUDE
@ COLLECTION_LIGHT_LINKING_STATE_INCLUDE
eCollectionLineArt_Usage
@ COLLECTION_LRT_EXCLUDE
@ COLLECTION_LRT_INCLUDE
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_FORCE_INTERSECTION
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_NO_INTERSECTION
@ COLLECTION_TAG_COLLECTION_OBJECT_DIRTY
@ COLLECTION_TAG_RELATION_REBUILD
eCollectionLineArt_Flags
@ COLLECTION_LRT_USE_INTERSECTION_MASK
@ COLLECTION_LRT_USE_INTERSECTION_PRIORITY
IOHandlerPanelFlag
@ IO_HANDLER_PANEL_OPEN
@ COLLECTION_COLOR_NONE
@ COLLECTION_COLOR_02
@ COLLECTION_COLOR_05
@ COLLECTION_COLOR_07
@ COLLECTION_COLOR_06
@ COLLECTION_COLOR_TOT
@ COLLECTION_COLOR_04
@ COLLECTION_COLOR_01
@ COLLECTION_COLOR_08
@ COLLECTION_COLOR_03
These structs are the foundation for all linked lists in the library system.
struct Collection * collection
CollectionLightLinking light_linking
struct CollectionChild * prev
struct CollectionChild * next
struct CollectionExport * prev
IDProperty * export_properties
struct CollectionExport * next
struct CollectionObject * prev
struct CollectionObject * next
CollectionLightLinking light_linking
struct PreviewImage * preview
unsigned int layer DNA_DEPRECATED
uint8_t lineart_intersection_priority
uint8_t lineart_intersection_mask
Collection_Runtime runtime
Definition DNA_ID.h:404