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>2013-06-10 03:31:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-06-10 03:31:53 +0400
commite7a487d1e9e79176a0ca99cda3882aac4ea16a99 (patch)
tree2d624a11f3954033cfe7c2f4c51142701a8d586b /source/blender/python
parente70476db4b63f1720f24ff93aa15441de7740fd6 (diff)
code cleanup: group python reset functions in BPY_python_reset()
Diffstat (limited to 'source/blender/python')
-rw-r--r--source/blender/python/BPY_extern.h1
-rw-r--r--source/blender/python/intern/bpy_interface.c7
2 files changed, 8 insertions, 0 deletions
diff --git a/source/blender/python/BPY_extern.h b/source/blender/python/BPY_extern.h
index 0f5be095e0f..e61b4847e2c 100644
--- a/source/blender/python/BPY_extern.h
+++ b/source/blender/python/BPY_extern.h
@@ -63,6 +63,7 @@ int BPY_is_pyconstraint(struct Text *text);
void BPY_python_start(int argc, const char **argv);
void BPY_python_end(void);
+void BPY_python_reset(struct bContext *C);
/* 2.5 UI Scripts */
int BPY_filepath_exec(struct bContext *C, const char *filepath, struct ReportList *reports);
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index f71ea02a510..75827ce8bbf 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -396,6 +396,13 @@ void BPY_python_end(void)
}
+void BPY_python_reset(bContext *C)
+{
+ BPY_driver_reset();
+ BPY_app_handlers_reset(false);
+ BPY_modules_load_user(C);
+}
+
static void python_script_error_jump_text(struct Text *text)
{
int lineno;