diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-09-03 05:48:30 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-09-03 05:48:51 +0300 |
commit | 88a893a83876bd983291881dbea8855600610e2b (patch) | |
tree | d47af71eb1069f6e3e870f54ca5312af2536deb5 /source/blender/python/intern/bpy_interface.c | |
parent | 0c389862c4fff3fb9eca9027e300774ce1c3eb7e (diff) | |
parent | 7ff1750218bf3c2ef4c57f9ea4a12b738f4b7264 (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r-- | source/blender/python/intern/bpy_interface.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c index 5a908f866a0..1276721e32f 100644 --- a/source/blender/python/intern/bpy_interface.c +++ b/source/blender/python/intern/bpy_interface.c @@ -591,7 +591,9 @@ void BPY_DECREF_RNA_INVALIDATE(void *pyob_ptr) /** * \return success */ -bool BPY_execute_string_as_number(bContext *C, const char *expr, const bool verbose, double *r_value) +bool BPY_execute_string_as_number( + bContext *C, const char *imports[], + const char *expr, const bool verbose, double *r_value) { PyGILState_STATE gilstate; bool ok = true; @@ -607,7 +609,7 @@ bool BPY_execute_string_as_number(bContext *C, const char *expr, const bool verb bpy_context_set(C, &gilstate); - ok = PyC_RunString_AsNumber(expr, "<blender button>", r_value); + ok = PyC_RunString_AsNumber(imports, expr, "<expr as number>", r_value); if (ok == false) { if (verbose) { @@ -626,7 +628,9 @@ bool BPY_execute_string_as_number(bContext *C, const char *expr, const bool verb /** * \return success */ -bool BPY_execute_string_as_string(bContext *C, const char *expr, const bool verbose, char **r_value) +bool BPY_execute_string_as_string( + bContext *C, const char *imports[], + const char *expr, const bool verbose, char **r_value) { BLI_assert(r_value && expr); PyGILState_STATE gilstate; @@ -639,7 +643,7 @@ bool BPY_execute_string_as_string(bContext *C, const char *expr, const bool verb bpy_context_set(C, &gilstate); - ok = PyC_RunString_AsString(expr, "<blender button>", r_value); + ok = PyC_RunString_AsString(imports, expr, "<expr as str>", r_value); if (ok == false) { if (verbose) { @@ -660,7 +664,9 @@ bool BPY_execute_string_as_string(bContext *C, const char *expr, const bool verb * * \return success */ -bool BPY_execute_string_as_intptr(bContext *C, const char *expr, const bool verbose, intptr_t *r_value) +bool BPY_execute_string_as_intptr( + bContext *C, const char *imports[], + const char *expr, const bool verbose, intptr_t *r_value) { BLI_assert(r_value && expr); PyGILState_STATE gilstate; @@ -673,7 +679,7 @@ bool BPY_execute_string_as_intptr(bContext *C, const char *expr, const bool verb bpy_context_set(C, &gilstate); - ok = PyC_RunString_AsIntPtr(expr, "<blender button>", r_value); + ok = PyC_RunString_AsIntPtr(imports, expr, "<expr as intptr>", r_value); if (ok == false) { if (verbose) { |