Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2017-02-03 17:06:11 +0300
committerDalai Felinto <dfelinto@gmail.com>2017-02-03 17:06:11 +0300
commit79924fce490cc85cfee7fd2a5431b912b40deef8 (patch)
tree0faec08628fdfa3c7dce0fa395a044bf110134e1
parent865a0de03d94ea1906c9b515933bc96aaf0c8cd0 (diff)
RNA: use new getter/setter functions for LayerEngineSettings
-rw-r--r--source/blender/makesrna/intern/rna_scene.c19
1 files changed, 5 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 08ac1783830..9eb54e32049 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -2371,33 +2371,24 @@ static StructRNA *rna_CollectionEngineSettings_refine(struct PointerRNA *ptr)
/****** clay engine settings *******/
-#define RNA_LAYER_ENGINE_GET_SET(_TYPE_, _CLASS_, _NAME_) \
+#define RNA_LAYER_ENGINE_GET_SET(_TYPE_, _NAME_) \
static _TYPE_ rna_LayerEngineSettings_##_NAME_##_get(PointerRNA *ptr) \
{ \
CollectionEngineSettings *ces = (CollectionEngineSettings *)ptr->data; \
- \
- _CLASS_ *prop = (_CLASS_ *)BKE_collection_engine_property_get(ces, #_NAME_); \
- BLI_assert(prop); \
- \
- return prop->value; \
+ return BKE_collection_engine_property_value_get_##_TYPE_(ces, #_NAME_); \
} \
\
static void rna_LayerEngineSettings_##_NAME_##_set(PointerRNA *ptr, _TYPE_ value) \
{ \
CollectionEngineSettings *ces = (CollectionEngineSettings *)ptr->data; \
- \
- _CLASS_ *prop = (_CLASS_ *)BKE_collection_engine_property_get(ces, #_NAME_); \
- BLI_assert(prop); \
- prop->data.flag |= COLLECTION_PROP_USE; \
- \
- prop->value = value; \
+ BKE_collection_engine_property_value_set_##_TYPE_(ces, #_NAME_, value); \
}
#define RNA_LAYER_ENGINE_GET_SET_FLOAT(_NAME_) \
- RNA_LAYER_ENGINE_GET_SET(float, CollectionEnginePropertyFloat, _NAME_)
+ RNA_LAYER_ENGINE_GET_SET(float, _NAME_)
#define RNA_LAYER_ENGINE_GET_SET_INT(_NAME_) \
- RNA_LAYER_ENGINE_GET_SET(int, CollectionEnginePropertyInt, _NAME_)
+ RNA_LAYER_ENGINE_GET_SET(int, _NAME_)
RNA_LAYER_ENGINE_GET_SET_INT(type)