Skip to content
Snippets Groups Projects
Commit c85a58ab authored by Sergey Sharybin's avatar Sergey Sharybin
Browse files

Blender 2.75: Fix compilation error caused by the addons fix

It was relying on a new function introduced by in 958c2087.
parent 6920d4c0
No related branches found
No related tags found
No related merge requests found
......@@ -86,6 +86,7 @@ void BPY_driver_reset(void);
float BPY_driver_exec(struct ChannelDriver *driver, const float evaltime);
int BPY_button_exec(struct bContext *C, const char *expr, double *value, const bool verbose);
int BPY_string_exec_ex(struct bContext *C, const char *expr, bool use_eval);
int BPY_string_exec(struct bContext *C, const char *expr);
void BPY_DECREF(void *pyob_ptr); /* Py_DECREF() */
......
......@@ -607,7 +607,7 @@ int BPY_button_exec(bContext *C, const char *expr, double *value, const bool ver
return error_ret;
}
int BPY_string_exec(bContext *C, const char *expr)
int BPY_string_exec_ex(bContext *C, const char *expr, bool use_eval)
{
PyGILState_STATE gilstate;
PyObject *main_mod = NULL;
......@@ -630,7 +630,7 @@ int BPY_string_exec(bContext *C, const char *expr)
bmain_back = bpy_import_main_get();
bpy_import_main_set(CTX_data_main(C));
retval = PyRun_String(expr, Py_eval_input, py_dict, py_dict);
retval = PyRun_String(expr, use_eval ? Py_eval_input : Py_file_input, py_dict, py_dict);
bpy_import_main_set(bmain_back);
......@@ -650,6 +650,10 @@ int BPY_string_exec(bContext *C, const char *expr)
return error_ret;
}
int BPY_string_exec(bContext *C, const char *expr)
{
return BPY_string_exec_ex(C, expr, true);
}
void BPY_modules_load_user(bContext *C)
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment