Blender  V2.93
DNA_collection_types.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * The Original Code is Copyright (C) 2001-2002 by NaN Holding BV.
17  * All rights reserved.
18  */
19 
26 #pragma once
27 
28 #include "DNA_ID.h"
29 #include "DNA_defs.h"
30 #include "DNA_listBase.h"
31 
32 #ifdef __cplusplus
33 extern "C" {
34 #endif
35 
36 struct Collection;
37 struct Object;
38 
39 typedef struct CollectionObject {
41  struct Object *ob;
43 
44 typedef struct CollectionChild {
48 
58 };
59 
60 typedef struct Collection {
61  ID id;
62 
67 
69 
70  unsigned int layer DNA_DEPRECATED;
71  float instance_offset[3];
72 
73  short flag;
74  /* Runtime-only, always cleared on file load. */
75  short tag;
76 
79 
81 
82  /* Runtime. Cache of objects in this collection and all its
83  * children. This is created on demand when e.g. some physics
84  * simulation needs it, we don't want to have it for every
85  * collections due to memory usage reasons. */
87 
88  /* Need this for line art sub-collection selections. */
90 
91  /* Runtime. List of collections that are a parent of this
92  * datablock. */
94 
95  /* Deprecated */
96  struct SceneCollection *collection DNA_DEPRECATED;
97  struct ViewLayer *view_layer DNA_DEPRECATED;
99 
100 /* Collection->flag */
101 enum {
102  COLLECTION_RESTRICT_VIEWPORT = (1 << 0), /* Disable in viewports. */
103  COLLECTION_RESTRICT_SELECT = (1 << 1), /* Not selectable in viewport. */
104  /* COLLECTION_DISABLED_DEPRECATED = (1 << 2), */ /* Not used anymore */
105  COLLECTION_RESTRICT_RENDER = (1 << 3), /* Disable in renders. */
106  COLLECTION_HAS_OBJECT_CACHE = (1 << 4), /* Runtime: object_cache is populated. */
107  COLLECTION_IS_MASTER = (1 << 5), /* Is master collection embedded in the scene. */
108  COLLECTION_HAS_OBJECT_CACHE_INSTANCED = (1 << 6), /* for object_cache_instanced. */
109 };
110 
111 /* Collection->tag */
112 enum {
113  /* That code (BKE_main_collections_parent_relations_rebuild and the like)
114  * is called from very low-level places, like e.g ID remapping...
115  * Using a generic tag like LIB_TAG_DOIT for this is just impossible, we need our very own. */
117 };
118 
119 /* Collection->color_tag. */
120 typedef enum CollectionColorTag {
130 
133 
134 #ifdef __cplusplus
135 }
136 #endif
ID and Library types, which are fundamental for sdna.
struct CollectionObject CollectionObject
struct CollectionChild CollectionChild
struct Collection Collection
eCollectionLineArt_Usage
@ COLLECTION_LRT_EXCLUDE
@ COLLECTION_LRT_INCLUDE
@ COLLECTION_LRT_INTERSECTION_ONLY
@ COLLECTION_LRT_OCCLUSION_ONLY
@ COLLECTION_LRT_NO_INTERSECTION
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
@ COLLECTION_RESTRICT_RENDER
@ COLLECTION_HAS_OBJECT_CACHE_INSTANCED
@ COLLECTION_RESTRICT_VIEWPORT
@ COLLECTION_IS_MASTER
@ COLLECTION_HAS_OBJECT_CACHE
@ COLLECTION_RESTRICT_SELECT
@ COLLECTION_TAG_RELATION_REBUILD
These structs are the foundation for all linked lists in the library system.
signed short int16_t
Definition: stdint.h:79
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
ListBase object_cache_instanced
ListBase object_cache
Definition: DNA_ID.h:273