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>2018-09-03 05:38:19 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-09-03 05:43:43 +0300
commit7ff1750218bf3c2ef4c57f9ea4a12b738f4b7264 (patch)
tree613c4796c351d6de824bc69716963e21e3817190 /source/blender/editors/util/numinput.c
parent4bb8dba340e0ac570f4a4eb628d0be09c92713b7 (diff)
PyAPI: add optional imports to expression eval API
Avoids having to use `__import__` to access modules.
Diffstat (limited to 'source/blender/editors/util/numinput.c')
-rw-r--r--source/blender/editors/util/numinput.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index a139f0e3c87..f25bc6350c1 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -498,7 +498,7 @@ bool handleNumInput(bContext *C, NumInput *n, const wmEvent *event)
n->unit_sys, n->unit_type[idx]);
/* Note: with angles, we always get values as radians here... */
- if (BPY_execute_string_as_number(C, str_unit_convert, false, &val)) {
+ if (BPY_execute_string_as_number(C, NULL, str_unit_convert, false, &val)) {
n->val[idx] = (float)val;
n->val_flag[idx] &= ~NUM_INVALID;
}