From 565d7f75ccfe955821991793fcd6335e58b6825b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 27 Jul 2020 13:46:58 +1000 Subject: UI: improve errors when evaluating a number button fails Showing the Python error without any explanation is often not enough information and doesn't hint that the error was in the user input. The error report from a invalid expression such as '..1' used to be: ('invalid syntax', ('', 1, 1, '..1')) Now reads: Error evaluating number, see Info editor for details: invalid syntax Address issue raised by T78913. --- source/blender/python/BPY_extern.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'source/blender/python/BPY_extern.h') diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h index 5c6e0b0a308..049b919b4a4 100644 --- a/source/blender/python/BPY_extern.h +++ b/source/blender/python/BPY_extern.h @@ -82,23 +82,23 @@ bool BPY_execute_text(struct bContext *C, bool BPY_execute_string_as_number(struct bContext *C, const char *imports[], const char *expr, - const bool verbose, + const char *report_prefix, double *r_value); bool BPY_execute_string_as_intptr(struct bContext *C, const char *imports[], const char *expr, - const bool verbose, + const char *report_prefix, intptr_t *r_value); bool BPY_execute_string_as_string_and_size(struct bContext *C, const char *imports[], const char *expr, - const bool verbose, + const char *report_prefix, char **r_value, size_t *r_value_size); bool BPY_execute_string_as_string(struct bContext *C, const char *imports[], const char *expr, - const bool verbose, + const char *report_prefix, char **r_value); bool BPY_execute_string_ex(struct bContext *C, -- cgit v1.2.3