diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 14:59:59 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-05-17 15:27:13 +0300 |
commit | 34d67601b716046cf15f3e808a92bc91d0af804f (patch) | |
tree | a6875fadf1c129513a889cba61c6627d1a76e45b /source/blender/makesrna/intern/rna_internal_types.h | |
parent | 8b5816e76bbf18246a5e28ec64a8e4c035f15e7a (diff) |
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
Diffstat (limited to 'source/blender/makesrna/intern/rna_internal_types.h')
-rw-r--r-- | source/blender/makesrna/intern/rna_internal_types.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_internal_types.h b/source/blender/makesrna/intern/rna_internal_types.h index 92c895bd854..14d850be012 100644 --- a/source/blender/makesrna/intern/rna_internal_types.h +++ b/source/blender/makesrna/intern/rna_internal_types.h @@ -37,6 +37,7 @@ struct IDProperty; struct Main; struct PointerRNA; struct PropertyRNA; +struct ReportList; struct Scene; struct StructRNA; struct bContext; @@ -85,7 +86,9 @@ typedef const EnumPropertyItem *(*PropEnumItemFunc)(struct bContext *C, bool *r_free); typedef PointerRNA (*PropPointerGetFunc)(struct PointerRNA *ptr); typedef StructRNA *(*PropPointerTypeFunc)(struct PointerRNA *ptr); -typedef void (*PropPointerSetFunc)(struct PointerRNA *ptr, const PointerRNA value); +typedef void (*PropPointerSetFunc)(struct ReportList *reports, + struct PointerRNA *ptr, + const PointerRNA value); typedef bool (*PropPointerPollFunc)(struct PointerRNA *ptr, const PointerRNA value); typedef bool (*PropPointerPollFuncPy)(struct PointerRNA *ptr, const PointerRNA value, |