Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesdna/DNA_layer_types.h
| Show All 31 Lines | |||||
| #endif | #endif | ||||
| #include "DNA_freestyle_types.h" | #include "DNA_freestyle_types.h" | ||||
| #include "DNA_listBase.h" | #include "DNA_listBase.h" | ||||
| typedef struct Base { | typedef struct Base { | ||||
| struct Base *next, *prev; | struct Base *next, *prev; | ||||
| short flag; | short flag; | ||||
| short refcount; | short pad; | ||||
| short sx, sy; | short sx, sy; | ||||
| struct Object *object; | struct Object *object; | ||||
| unsigned int lay; | unsigned int lay; | ||||
| int flag_legacy; | int flag_legacy; | ||||
| } Base; | } Base; | ||||
| typedef struct ViewLayerEngineData { | typedef struct ViewLayerEngineData { | ||||
| struct ViewLayerEngineData *next, *prev; | struct ViewLayerEngineData *next, *prev; | ||||
| struct DrawEngineType *engine_type; | struct DrawEngineType *engine_type; | ||||
| void *storage; | void *storage; | ||||
| void (*free)(void *storage); | void (*free)(void *storage); | ||||
| } ViewLayerEngineData; | } ViewLayerEngineData; | ||||
| typedef struct LayerCollection { | typedef struct LayerCollection { | ||||
| struct LayerCollection *next, *prev; | struct LayerCollection *next, *prev; | ||||
| struct SceneCollection *scene_collection; | struct Collection *collection; | ||||
| struct SceneCollection *scene_collection DNA_DEPRECATED; | |||||
| short flag; | short flag; | ||||
| /* TODO(sergey): Get rid of this once we've got CoW in DEG, */ | short pad[3]; | ||||
| short flag_evaluated; | ListBase layer_collections; /* synced with collection->children */ | ||||
| short pad[2]; | |||||
| ListBase object_bases; /* (ObjectBase *)LinkData->data - synced with collection->objects */ | |||||
| ListBase layer_collections; /* synced with collection->collections */ | |||||
| } LayerCollection; | } LayerCollection; | ||||
| typedef struct ViewLayer { | typedef struct ViewLayer { | ||||
| struct ViewLayer *next, *prev; | struct ViewLayer *next, *prev; | ||||
| char name[64]; /* MAX_NAME */ | char name[64]; /* MAX_NAME */ | ||||
| short active_collection; | |||||
| short flag; | short flag; | ||||
| short pad[2]; | short pad[3]; | ||||
| ListBase object_bases; /* ObjectBase */ | ListBase object_bases; /* ObjectBase */ | ||||
| struct SceneStats *stats; /* default allocated now */ | struct SceneStats *stats; /* default allocated now */ | ||||
| struct Base *basact; | struct Base *basact; | ||||
| ListBase layer_collections; /* LayerCollection */ | ListBase layer_collections; /* LayerCollection */ | ||||
| LayerCollection *active_collection; | |||||
| /* Old SceneRenderLayer data. */ | /* Old SceneRenderLayer data. */ | ||||
| int layflag; | int layflag; | ||||
| int passflag; /* pass_xor has to be after passflag */ | int passflag; /* pass_xor has to be after passflag */ | ||||
| int pass_xor; | int pass_xor; | ||||
| float pass_alpha_threshold; | float pass_alpha_threshold; | ||||
| struct IDProperty *id_properties; /* Equivalent to datablocks ID properties. */ | struct IDProperty *id_properties; /* Equivalent to datablocks ID properties. */ | ||||
| struct FreestyleConfig freestyle_config; | struct FreestyleConfig freestyle_config; | ||||
| /* Runtime data */ | /* Runtime data */ | ||||
| ListBase drawdata; /* ViewLayerEngineData */ | ListBase drawdata; /* ViewLayerEngineData */ | ||||
| struct Base **object_bases_array; | struct Base **object_bases_array; | ||||
| struct GHash *object_bases_hash; | |||||
| } ViewLayer; | } ViewLayer; | ||||
| typedef struct SceneCollection { | |||||
| struct SceneCollection *next, *prev; | |||||
| char name[64]; /* MAX_NAME */ | |||||
| int active_object_index; /* for UI */ | |||||
| char type; | |||||
| char pad[3]; | |||||
| ListBase objects; /* (Object *)LinkData->data */ | |||||
| ListBase scene_collections; /* nested collections */ | |||||
| } SceneCollection; | |||||
| /* Base->flag */ | /* Base->flag */ | ||||
| enum { | enum { | ||||
| BASE_SELECTED = (1 << 0), | BASE_SELECTED = (1 << 0), | ||||
| BASE_VISIBLED = (1 << 1), | BASE_VISIBLED = (1 << 1), | ||||
| BASE_SELECTABLED = (1 << 2), | BASE_SELECTABLED = (1 << 2), | ||||
| BASE_FROMDUPLI = (1 << 3), | BASE_FROMDUPLI = (1 << 3), | ||||
| BASE_DIRTY_ENGINE_SETTINGS = (1 << 4), | BASE_DIRTY_ENGINE_SETTINGS = (1 << 4), | ||||
| BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */ | BASE_FROM_SET = (1 << 5), /* To be set only by the depsgraph */ | ||||
| BASE_VISIBLE_VIEWPORT = (1 << 6), | |||||
| BASE_VISIBLE_RENDER = (1 << 7), | |||||
| }; | }; | ||||
| /* LayerCollection->flag */ | /* LayerCollection->flag */ | ||||
| enum { | enum { | ||||
| COLLECTION_VIEWPORT = (1 << 0), /* Only used for group collections. */ | /* LAYER_COLLECTION_DEPRECATED0 = (1 << 0), */ | ||||
| COLLECTION_SELECTABLE = (1 << 1), | /* LAYER_COLLECTION_DEPRECATED1 = (1 << 1), */ | ||||
| COLLECTION_DISABLED = (1 << 2), | /* LAYER_COLLECTION_DEPRECATED2 = (1 << 2), */ | ||||
| COLLECTION_RENDER = (1 << 3), /* Only used for group collections. */ | /* LAYER_COLLECTION_DEPRECATED3 = (1 << 3), */ | ||||
| LAYER_COLLECTION_EXCLUDE = (1 << 4), | |||||
| }; | }; | ||||
| /* ViewLayer->flag */ | /* ViewLayer->flag */ | ||||
| enum { | enum { | ||||
| VIEW_LAYER_RENDER = (1 << 0), | VIEW_LAYER_RENDER = (1 << 0), | ||||
| VIEW_LAYER_ENGINE_DIRTY = (1 << 1), | VIEW_LAYER_ENGINE_DIRTY = (1 << 1), | ||||
| VIEW_LAYER_FREESTYLE = (1 << 2), | VIEW_LAYER_FREESTYLE = (1 << 2), | ||||
| }; | }; | ||||
| /* SceneCollection->type */ | /****************************** Deprecated ******************************/ | ||||
| enum { | |||||
| COLLECTION_TYPE_NONE = 0, | /* Compatibility with collections saved in early 2.8 versions, | ||||
| COLLECTION_TYPE_GROUP_INTERNAL = 1, | * used in file reading and versioning code. */ | ||||
| }; | #define USE_COLLECTION_COMPAT_28 | ||||
| typedef struct SceneCollection { | |||||
| struct SceneCollection *next, *prev; | |||||
| char name[64]; /* MAX_NAME */ | |||||
| int active_object_index; /* for UI */ | |||||
| short flag; | |||||
| char type; | |||||
| char pad; | |||||
| ListBase objects; /* (Object *)LinkData->data */ | |||||
| ListBase scene_collections; /* nested collections */ | |||||
| } SceneCollection; | |||||
| #ifdef __cplusplus | #ifdef __cplusplus | ||||
| } | } | ||||
| #endif | #endif | ||||
| #endif /* __DNA_LAYER_TYPES_H__ */ | #endif /* __DNA_LAYER_TYPES_H__ */ | ||||