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:
authorSergey Sharybin <sergey.vfx@gmail.com>2019-05-17 14:59:59 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-05-17 15:27:13 +0300
commit34d67601b716046cf15f3e808a92bc91d0af804f (patch)
treea6875fadf1c129513a889cba61c6627d1a76e45b /source/blender/editors/interface/interface.c
parent8b5816e76bbf18246a5e28ec64a8e4c035f15e7a (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/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 0e4b07f4b48..f1724d92402 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -2772,7 +2772,7 @@ bool ui_but_string_set(bContext *C, uiBut *but, const char *str)
}
else if (type == PROP_POINTER) {
if (str[0] == '\0') {
- RNA_property_pointer_set(&but->rnapoin, but->rnaprop, PointerRNA_NULL);
+ RNA_property_pointer_set(NULL, &but->rnapoin, but->rnaprop, PointerRNA_NULL);
return true;
}
else {
@@ -2788,14 +2788,14 @@ bool ui_but_string_set(bContext *C, uiBut *but, const char *str)
* Fact remains, using editstr as main 'reference' over whole search button thingy
* is utterly weak and should be redesigned imho, but that's not a simple task. */
if (prop && RNA_property_collection_lookup_string(&ptr, prop, str, &rptr)) {
- RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+ RNA_property_pointer_set(NULL, &but->rnapoin, but->rnaprop, rptr);
}
else if (but->func_arg2 != NULL) {
RNA_pointer_create(NULL,
RNA_property_pointer_type(&but->rnapoin, but->rnaprop),
but->func_arg2,
&rptr);
- RNA_property_pointer_set(&but->rnapoin, but->rnaprop, rptr);
+ RNA_property_pointer_set(NULL, &but->rnapoin, but->rnaprop, rptr);
}
return true;