Blender  V3.3
DNA_collection_types.h
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2001-2002 NaN Holding BV. All rights reserved. */
3 
10 #pragma once
11 
12 #include "DNA_ID.h"
13 #include "DNA_defs.h"
14 #include "DNA_listBase.h"
15 
16 #ifdef __cplusplus
17 extern "C" {
18 #endif
19 
20 struct Collection;
21 struct Object;
22 
23 typedef struct CollectionObject {
25  struct Object *ob;
27 
28 typedef struct CollectionChild {
32 
40 };
41 
45 };
46 
47 typedef struct Collection {
48  ID id;
49 
54 
56 
57  unsigned int layer DNA_DEPRECATED;
58  float instance_offset[3];
59 
60  short flag;
61  /* Runtime-only, always cleared on file load. */
62  short tag;
63 
64  short lineart_usage; /* eCollectionLineArt_Usage */
65  unsigned char lineart_flags; /* eCollectionLineArt_Flags */
68  char _pad[5];
69 
71 
72  /* Runtime. Cache of objects in this collection and all its
73  * children. This is created on demand when e.g. some physics
74  * simulation needs it, we don't want to have it for every
75  * collections due to memory usage reasons. */
77 
78  /* Need this for line art sub-collection selections. */
80 
81  /* Runtime. List of collections that are a parent of this
82  * datablock. */
84 
85  /* Deprecated */
86  struct SceneCollection *collection DNA_DEPRECATED;
87  struct ViewLayer *view_layer DNA_DEPRECATED;
89 
90 /* Collection->flag */
91 enum {
92  COLLECTION_HIDE_VIEWPORT = (1 << 0), /* Disable in viewports. */
93  COLLECTION_HIDE_SELECT = (1 << 1), /* Not selectable in viewport. */
94  /* COLLECTION_DISABLED_DEPRECATED = (1 << 2), */ /* Not used anymore */
95  COLLECTION_HIDE_RENDER = (1 << 3), /* Disable in renders. */
96  COLLECTION_HAS_OBJECT_CACHE = (1 << 4), /* Runtime: object_cache is populated. */
97  COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */
98  COLLECTION_HAS_OBJECT_CACHE_INSTANCED = (1 << 6), /* for object_cache_instanced. */
99 };
100 
101 /* Collection->tag */
102 enum {
103  /* That code (BKE_main_collections_parent_relations_rebuild and the like)
104  * is called from very low-level places, like e.g ID remapping...
105  * Using a generic tag like LIB_TAG_DOIT for this is just impossible, we need our very own. */
107 };
108 
109 /* Collection->color_tag. */
110 typedef enum CollectionColorTag {
120 
123 
124 #ifdef __cplusplus
125 }
126 #endif
ID and Library types, which are fundamental for sdna.
@ COLLECTION_TAG_RELATION_REBUILD
struct CollectionObject CollectionObject
struct CollectionChild CollectionChild
struct Collection Collection
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
CollectionColorTag
@ 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.
signed short int16_t
Definition: stdint.h:76
struct Collection * collection
struct CollectionChild * prev
struct CollectionChild * next
struct Object * ob
struct CollectionObject * prev
struct CollectionObject * next
float instance_offset[3]
struct ViewLayer *view_layer DNA_DEPRECATED
struct SceneCollection *collection DNA_DEPRECATED
struct PreviewImage * preview
unsigned int layer DNA_DEPRECATED
unsigned char lineart_intersection_mask
ListBase object_cache_instanced
unsigned char lineart_intersection_priority
unsigned char lineart_flags
ListBase object_cache
Definition: DNA_ID.h:368