Blender V5.0
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#ifdef __cplusplus
18namespace blender::bke {
20} // namespace blender::bke
22#else
24#endif
25
26struct Collection;
27struct Object;
28struct GHash;
29
30/* Light linking relation of a collection or an object. */
31typedef struct CollectionLightLinking {
32 /* Light and shadow linking configuration, an enumerator of eCollectionLightLinkingState.
33 * The meaning depends on whether the collection is specified as a light or shadow linking on the
34 * Object's LightLinking.
35 *
36 * For the light linking collection:
37 *
38 * - INCLUDE: the receiver is included into the light linking and is only receiving lights from
39 * emitters which include it in their light linking collections. The receiver is not affected
40 * by regular scene lights.
41 *
42 * - EXCLUDE: the receiver does not receive light from this emitter, but is lit by regular
43 * lights in the scene or by emitters which are linked to it via INCLUDE on their
44 * light_state.
45 *
46 * For the shadow linking collection:
47 *
48 * - INCLUDE: the collection or object casts shadows from the emitter. It does not cast shadow
49 * from light sources which do not have INCLUDE on their light linking configuration for it.
50 *
51 * - EXCLUDE: the collection or object does not cast shadow when lit by this emitter, but does
52 * for other light sources in the scene. */
53 uint8_t link_state;
54
55 uint8_t _pad[3];
57
65
73
74/* Collection IO property storage and access. */
75typedef struct CollectionExport {
77
79 char fh_idname[64];
80 char name[64];
81
83 uint32_t flag;
84
85 uint32_t _pad0;
87
91
92/* Light linking state of object or collection: defines how they react to the emitters in the
93 * scene. See the comment for the link_state in the CollectionLightLinking for the details. */
98
107
112
113typedef struct Collection {
114#ifdef __cplusplus
116 static constexpr ID_Type id_type = ID_GR;
117#endif
118
120
123
128
129 char _pad0[4];
130
133
135
136 unsigned int layer DNA_DEPRECATED;
138
139 uint8_t flag;
140 int8_t color_tag;
141
142 char _pad1[2];
143
144 uint8_t lineart_usage; /* #eCollectionLineArt_Usage */
145 uint8_t lineart_flags; /* #eCollectionLineArt_Flags */
148
149 struct ViewLayer *view_layer DNA_DEPRECATED;
150
151 /* Keep last. */
154
156enum {
161 // COLLECTION_DISABLED_DEPRECATED = (1 << 2), /* DIRTY */
170};
171
172#define COLLECTION_FLAG_ALL_RUNTIME \
173 (COLLECTION_HAS_OBJECT_CACHE | COLLECTION_HAS_OBJECT_CACHE_INSTANCED)
174
ID and Library types, which are fundamental for SDNA.
ID_Type
@ ID_GR
struct CollectionRuntimeHandle CollectionRuntimeHandle
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_HIDE_RENDER
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
@ COLLECTION_HIDE_SELECT
@ COLLECTION_IS_MASTER
@ COLLECTION_HAS_OBJECT_CACHE
@ COLLECTION_HIDE_VIEWPORT
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
CollectionRuntimeHandle * runtime
Definition DNA_ID.h:414