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/python/intern/bpy_utils_units.c
parent4bb8dba340e0ac570f4a4eb628d0be09c92713b7 (diff)
PyAPI: add optional imports to expression eval API
Avoids having to use `__import__` to access modules.
Diffstat (limited to 'source/blender/python/intern/bpy_utils_units.c')
-rw-r--r--source/blender/python/intern/bpy_utils_units.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/blender/python/intern/bpy_utils_units.c b/source/blender/python/intern/bpy_utils_units.c
index 0ef689d1a5a..cbd8b67d1ce 100644
--- a/source/blender/python/intern/bpy_utils_units.c
+++ b/source/blender/python/intern/bpy_utils_units.c
@@ -204,7 +204,7 @@ static PyObject *bpyunits_to_value(PyObject *UNUSED(self), PyObject *args, PyObj
bUnit_ReplaceString(str, (int)str_len, uref, scale, usys, ucat);
- if (!PyC_RunString_AsNumber(str, "<bpy_units_api>", &result)) {
+ if (!PyC_RunString_AsNumber(NULL, str, "<bpy_units_api>", &result)) {
if (PyErr_Occurred()) {
PyErr_Print();
PyErr_Clear();