From 34d67601b716046cf15f3e808a92bc91d0af804f Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 May 2019 13:59:59 +0200 Subject: Python: Raise an error even NO_MAIN data is assigned to object The goal is to prevent assignment of temporary or evaluated meshes to objects from the main database. Majority of the change is actually related on passing reports around. On a positive side there are more error prints which can become more visible to scripters. There are still possible further improvements in the related areas. For example, disable user counting for evaluated ID datablocks when assignment happens. But can also happen later on as a separate improvement. Reviewers: brecht, campbellbarton, mont29 Reviewed By: brecht Differential Revision: https://developer.blender.org/D4884 --- source/blender/makesrna/intern/rna_shader_fx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'source/blender/makesrna/intern/rna_shader_fx.c') diff --git a/source/blender/makesrna/intern/rna_shader_fx.c b/source/blender/makesrna/intern/rna_shader_fx.c index 06c968534cc..8696023fbe6 100644 --- a/source/blender/makesrna/intern/rna_shader_fx.c +++ b/source/blender/makesrna/intern/rna_shader_fx.c @@ -185,7 +185,8 @@ static void shaderfx_object_set(Object *self, Object **ob_p, int type, PointerRN } # define RNA_FX_OBJECT_SET(_type, _prop, _obtype) \ - static void rna_##_type##ShaderFx_##_prop##_set(PointerRNA *ptr, PointerRNA value) \ + static void rna_##_type##ShaderFx_##_prop##_set( \ + struct ReportList *UNUSED(reports), PointerRNA *ptr, PointerRNA value) \ { \ _type##ShaderFxData *tmd = (_type##ShaderFxData *)ptr->data; \ shaderfx_object_set(ptr->id.data, &tmd->_prop, _obtype, value); \ -- cgit v1.2.3