diff options
author | Campbell Barton <ideasman42@gmail.com> | 2015-12-31 13:15:29 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2015-12-31 13:20:41 +0300 |
commit | 0ffc603553bb6a5dd3ce96e88bc9be34356fc0cf (patch) | |
tree | 1415890bf433ac933fee88fb80e37c322e26e281 /source/blender/editors/interface/interface.c | |
parent | 16e1bbf1dbbefde14533b0de5b68ae3ac269e05c (diff) |
Cleanup: Py API naming
Use BPY_execute_* prefix for all Python execution commands
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r-- | source/blender/editors/interface/interface.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c index 79a7f4fc57a..95187bbd005 100644 --- a/source/blender/editors/interface/interface.c +++ b/source/blender/editors/interface/interface.c @@ -2272,7 +2272,7 @@ static bool ui_set_but_string_eval_num_unit(bContext *C, uiBut *but, const char bUnit_ReplaceString(str_unit_convert, sizeof(str_unit_convert), but->drawstr, ui_get_but_scale_unit(but, 1.0), but->block->unit->system, RNA_SUBTYPE_UNIT_VALUE(unit_type)); - return (BPY_button_exec(C, str_unit_convert, value, true) != -1); + return BPY_execute_string_as_number(C, str_unit_convert, value, true); } #endif /* WITH_PYTHON */ @@ -2287,7 +2287,7 @@ bool ui_but_string_set_eval_num(bContext *C, uiBut *but, const char *str, double if (str[0] != '\0') { bool is_unit_but = (ui_but_is_float(but) && ui_but_is_unit(but)); /* only enable verbose if we won't run again with units */ - if (BPY_button_exec(C, str, value, is_unit_but == false) != -1) { + if (BPY_execute_string_as_number(C, str, value, is_unit_but == false)) { /* if the value parsed ok without unit conversion this button may still need a unit multiplier */ if (is_unit_but) { char str_new[128]; |