Blender V5.3
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
17#include "BLI_enum_flags.hh"
18
19namespace blender {
20
21namespace bke {
24} // namespace bke
25
26struct Collection;
27struct Object;
28struct GHash;
29struct LayoutPanelState;
30
33};
35
36/* Light linking state of object or collection: defines how they react to the emitters in the
37 * scene. See the comment for the link_state in the CollectionLightLinking for the details. */
42
52
58
59
65 // COLLECTION_DISABLED_DEPRECATED = (1 << 2), /* DIRTY */
74};
76
77#define COLLECTION_FLAG_ALL_RUNTIME \
78 (COLLECTION_HAS_OBJECT_CACHE | COLLECTION_HAS_OBJECT_CACHE_INSTANCED)
79
94
95/* Light linking relation of a collection or an object. */
97 /* Light and shadow linking configuration, an enumerator of eCollectionLightLinkingState.
98 * The meaning depends on whether the collection is specified as a light or shadow linking on the
99 * Object's LightLinking.
100 *
101 * For the light linking collection:
102 *
103 * - INCLUDE: the receiver is included into the light linking and is only receiving lights from
104 * emitters which include it in their light linking collections. The receiver is not affected
105 * by regular scene lights.
106 *
107 * - EXCLUDE: the receiver does not receive light from this emitter, but is lit by regular
108 * lights in the scene or by emitters which are linked to it via INCLUDE on their
109 * light_state.
110 *
111 * For the shadow linking collection:
112 *
113 * - INCLUDE: the collection or object casts shadows from the emitter. It does not cast shadow
114 * from light sources which do not have INCLUDE on their light linking configuration for it.
115 *
116 * - EXCLUDE: the collection or object does not cast shadow when lit by this emitter, but does
117 * for other light sources in the scene. */
119
120 uint8_t _pad[3] = {};
121};
122
124 struct CollectionObject *next = nullptr, *prev = nullptr;
125 struct Object *ob = nullptr;
126
130 int sort_index = -1;
134 char _pad[4] = {};
135};
136
138 struct CollectionChild *next = nullptr, *prev = nullptr;
139 struct Collection *collection = nullptr;
140
144 int sort_index = -1;
145};
146
147/* Collection IO property storage and access. */
150 char fh_idname[64] = "";
151
154
156
157 /* Keep last. */
159};
160
162 struct CollectionExport *next = nullptr, *prev = nullptr;
163
165 char fh_idname[64] = "";
166 char name[64] = "";
167
170
172
173 ListBaseT<LayoutPanelState> layout_panel_states = {nullptr, nullptr};
174};
175
177#ifdef __cplusplus
179 static constexpr ID_Type id_type = ID_GR;
180#endif
181
183
185 ID *owner_id = nullptr;
186
188 ListBaseT<CollectionObject> gobject = {nullptr, nullptr};
190 ListBaseT<CollectionChild> children = {nullptr, nullptr};
191
192 char _pad0[4] = {};
193
195 ListBaseT<CollectionExport> exporters = {nullptr, nullptr};
197
198 struct PreviewImage *preview = nullptr;
199
200 DNA_DEPRECATED unsigned int layer = 0;
201 float instance_offset[3] = {};
202
205
206 char _pad1[2] = {};
207
212
214
215 /* Keep last. */
217};
218
219} // namespace blender
#define ENUM_OPERATORS(_enum_type)
ID and Library types, which are fundamental for SDNA.
#define DNA_DEPRECATED
Definition DNA_defs.h:21
These structs are the foundation for all linked lists in the library system.
BMesh Iterators.
@ COLLECTION_LRT_NO_INTERSECTION
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_FORCE_INTERSECTION
@ COLLECTION_LRT_USE_INTERSECTION_PRIORITY
@ COLLECTION_LRT_USE_INTERSECTION_MASK
@ COLLECTION_LIGHT_LINKING_STATE_INCLUDE
@ COLLECTION_LIGHT_LINKING_STATE_EXCLUDE
unsigned int uint32_t
Definition BKE_text.h:81
unsigned char uint8_t
Definition BKE_text.h:79
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
signed char int8_t
Definition BKE_text.h:76
struct CollectionChild * next
CollectionLightLinking light_linking
struct CollectionChild * prev
struct CollectionExport * prev
ListBaseT< LayoutPanelState > layout_panel_states
struct CollectionExport * next
bke::CollectionImportRuntime * runtime
eCollectionLightLinkingState link_state
CollectionLightLinking light_linking
struct CollectionObject * prev
struct CollectionObject * next
eCollectionLineArt_Flags lineart_flags
bke::CollectionRuntime * runtime
ListBaseT< CollectionExport > exporters
eCollectionLineArt_Usage lineart_usage
DNA_DEPRECATED unsigned int layer
DNA_DEPRECATED struct ViewLayer * view_layer
ListBaseT< CollectionChild > children
ListBaseT< CollectionObject > gobject
struct PreviewImage * preview
CollectionColorTag color_tag
CollectionImport * importer