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.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/python/intern/bpy_interface.c b/source/blender/python/intern/bpy_interface.c
index f91ba4d362c..1a308414bc3 100644
--- a/source/blender/python/intern/bpy_interface.c
+++ b/source/blender/python/intern/bpy_interface.c
@@ -155,7 +155,7 @@ void bpy_context_clear(bContext *UNUSED(C), const PyGILState_STATE *gilstate)
}
else if (py_call_level == 0) {
/* XXX: Calling classes currently won't store the context :\,
- * can't set NULL because of this. but this is very flakey still. */
+ * can't set NULL because of this. but this is very flaky still. */
#if 0
BPY_context_set(NULL);
#endif
@@ -502,7 +502,10 @@ void BPY_python_start(bContext *C, int argc, const char **argv)
}
#endif
- /* bpy.* and lets us import it */
+ /* Run first, initializes RNA types. */
+ BPY_rna_init();
+
+ /* Defines `bpy.*` and lets us import it. */
BPy_init_modules(C);
pyrna_alloc_types();
@@ -541,6 +544,8 @@ void BPY_python_end(void)
/* free other python data. */
pyrna_free_types();
+ BPY_rna_exit();
+
/* clear all python data from structs */
bpy_intern_string_exit();
@@ -650,7 +655,7 @@ void BPY_modules_load_user(bContext *C)
bpy_context_set(C, &gilstate);
for (text = bmain->texts.first; text; text = text->id.next) {
- if (text->flags & TXT_ISSCRIPT && BLI_path_extension_check(text->id.name + 2, ".py")) {
+ if (text->flags & TXT_ISSCRIPT) {
if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC)) {
if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) {
G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL;