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:
authorCampbell Barton <ideasman42@gmail.com>2013-09-18 05:22:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-09-18 05:22:28 +0400
commit9d6f05edb810ed06b7d1a48c7c00cd6e62956d5f (patch)
tree6e14114a60808920315abac5eabcf1c4ea956344 /source/blender/windowmanager/intern/wm_operators.c
parenteb4bf9212be6e72f1fcad60cf5828364321f969a (diff)
fix relating to bug [#36758],
When printing operator reports, ommit unset properties. This is needed because in some cases operators check if a value is set or not, so filling in default arguments may change behavior.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_operators.c')
-rw-r--r--source/blender/windowmanager/intern/wm_operators.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c
index 1e984649ca7..03567e864db 100644
--- a/source/blender/windowmanager/intern/wm_operators.c
+++ b/source/blender/windowmanager/intern/wm_operators.c
@@ -542,22 +542,20 @@ char *WM_operator_pystring(bContext *C, wmOperatorType *ot, PointerRNA *opptr, i
/* only to get the orginal props for comparisons */
PointerRNA opptr_default;
- if (all_args == 0 || opptr == NULL) {
+ if (opptr == NULL) {
WM_operator_properties_create_ptr(&opptr_default, ot);
-
- if (opptr == NULL)
- opptr = &opptr_default;
+ opptr = &opptr_default;
}
WM_operator_py_idname(idname_py, ot->idname);
BLI_dynstr_appendf(dynstr, "bpy.ops.%s(", idname_py);
- cstring_args = RNA_pointer_as_string_keywords(C, opptr, &opptr_default, FALSE,
+ cstring_args = RNA_pointer_as_string_keywords(C, opptr, false,
all_args, max_prop_length);
BLI_dynstr_append(dynstr, cstring_args);
MEM_freeN(cstring_args);
- if (all_args == 0 || opptr == &opptr_default)
+ if (opptr == &opptr_default)
WM_operator_properties_free(&opptr_default);
BLI_dynstr_append(dynstr, ")");