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:
Diffstat (limited to 'source/blender/python/intern/bpy_interface.c')
-rw-r--r--source/blender/python/intern/bpy_interface.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index d20f2a23664..d0e321ade06 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -330,6 +330,8 @@ int BPY_run_python_script( bContext *C, const char *fn, struct Text *text, struc
return 0;
}
+ bpy_set_immediate_register(1);
+
bpy_context_set(C, &gilstate);
if (text) {
@@ -395,6 +397,8 @@ int BPY_run_python_script( bContext *C, const char *fn, struct Text *text, struc
bpy_context_clear(C, &gilstate);
+ bpy_set_immediate_register(0);
+
return py_result ? 1:0;
}