diff options
author | Dalai Felinto <dfelinto@gmail.com> | 2017-03-30 18:01:23 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-03-30 18:01:23 +0300 |
commit | ce3c7e8ff515e5bfbf70d0f4f60557e26c9d98a1 (patch) | |
tree | 1062bd45d22a2a0aff4e4a227079154b78c42263 /source/blender/makesdna/DNA_layer_types.h | |
parent | 98e69631b0cf31b5b73c1d9afb9bd9fc81fc42be (diff) |
Layers: use IDProperty and override collection properties system
First this replace a custom data struct with IDProperty, and use
IDProperty group merge and copying functions. Which means that a collection
property setting is only created if necessary.
This implements the "Layer Collection settings" override system, as
suggested in the "Override Manifesto" document.
The core is working, with Scene, LayerCollection and Object using a
single IDProperty to store all the render settings data. Next step is to
migrate this to depsgraph.
Note: Clay engine "ssao_samples" was hardcoded to 32 for now. It will come
back as part of "Workspace Settings" later.
Many thanks for Bastien Montagne for the help with the UI template
nightmare ;)
Differential Revision: https://developer.blender.org/D2563
Diffstat (limited to 'source/blender/makesdna/DNA_layer_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index de2bd51f647..2ea0638acfb 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -61,6 +61,7 @@ typedef struct LayerCollection { ListBase layer_collections; /* synced with collection->collections */ ListBase engine_settings; /* CollectionEngineSettings */ ListBase mode_settings; /* CollectionModeSettings */ + struct IDProperty *properties; /* overrides */ } LayerCollection; typedef struct SceneLayer { @@ -112,53 +113,6 @@ enum { /* *************************************************************** */ /* Engine Settings */ -typedef struct CollectionEngineProperty { - struct CollectionEngineProperty *next, *prev; - char name[64]; /* MAX_NAME */ - short type; - short pad; - char flag; - char pad2[3]; -} CollectionEngineProperty; - -typedef struct CollectionEnginePropertyInt { - struct CollectionEngineProperty data; - int value; - int pad; -} CollectionEnginePropertyInt; - -typedef struct CollectionEnginePropertyBool { - struct CollectionEngineProperty data; - int value; - int pad; -} CollectionEnginePropertyBool; - -typedef struct CollectionEnginePropertyFloat { - struct CollectionEngineProperty data; - float value; - float pad; -} CollectionEnginePropertyFloat; - -typedef struct CollectionEngineSettings { - struct CollectionEngineSettings *next, *prev; - char name[32]; /* engine name - MAX_NAME */ - ListBase properties; /* CollectionProperty */ - int type; /* CollectionEngineSettingsType */ - int pad; -} CollectionEngineSettings; - -/* CollectionEngineProperty->flag */ -enum { - COLLECTION_PROP_USE = (1 << 0), -}; - -/* CollectionEngineProperty.type */ -typedef enum CollectionEnginePropertyType { - COLLECTION_PROP_TYPE_FLOAT = 0, - COLLECTION_PROP_TYPE_INT = 1, - COLLECTION_PROP_TYPE_BOOL = 2, -} CollectionEnginePropertyType; - /* CollectionEngineSettings->type */ typedef enum CollectionEngineSettingsType { COLLECTION_MODE_NONE = 0, |