Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/intern/bpy_interface.c
| Show First 20 Lines • Show All 644 Lines • ▼ Show 20 Lines | void BPY_modules_load_user(bContext *C) | ||||
| * on file load */ | * on file load */ | ||||
| if (py_call_level) { | if (py_call_level) { | ||||
| BPY_context_update(C); | BPY_context_update(C); | ||||
| } | } | ||||
| bpy_context_set(C, &gilstate); | bpy_context_set(C, &gilstate); | ||||
| for (text = bmain->texts.first; text; text = text->id.next) { | 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)) { | ||||
| if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) { | if (!(G.f & G_FLAG_SCRIPT_AUTOEXEC_FAIL_QUIET)) { | ||||
| G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL; | G.f |= G_FLAG_SCRIPT_AUTOEXEC_FAIL; | ||||
| BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Text '%s'", text->id.name + 2); | BLI_snprintf(G.autoexec_fail, sizeof(G.autoexec_fail), "Text '%s'", text->id.name + 2); | ||||
| printf("scripts disabled for \"%s\", skipping '%s'\n", | printf("scripts disabled for \"%s\", skipping '%s'\n", | ||||
| BKE_main_blendfile_path(bmain), | BKE_main_blendfile_path(bmain), | ||||
| text->id.name + 2); | text->id.name + 2); | ||||
| ▲ Show 20 Lines • Show All 252 Lines • Show Last 20 Lines | |||||