From 7ff1750218bf3c2ef4c57f9ea4a12b738f4b7264 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 3 Sep 2018 12:38:19 +1000 Subject: PyAPI: add optional imports to expression eval API Avoids having to use `__import__` to access modules. --- source/blender/editors/util/numinput.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/util/numinput.c') 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; } -- cgit v1.2.3