From 79924fce490cc85cfee7fd2a5431b912b40deef8 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Fri, 3 Feb 2017 15:06:11 +0100 Subject: RNA: use new getter/setter functions for LayerEngineSettings --- source/blender/makesrna/intern/rna_scene.c | 19 +++++-------------- 1 file 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) -- cgit v1.2.3