code cleanup: remove redundant calls to CTX_data_main()

This commit is contained in:
2012-08-05 14:11:51 +00:00
parent 9ddbd8329e
commit 0a35e050f3
4 changed files with 7 additions and 6 deletions

View File

@@ -639,7 +639,7 @@ void BPY_modules_load_user(bContext *C)
bpy_context_set(C, &gilstate);
for (text = CTX_data_main(C)->text.first; text; text = text->id.next) {
for (text = bmain->text.first; text; text = text->id.next) {
if (text->flags & TXT_ISSCRIPT && BLI_testextensie(text->id.name + 2, ".py")) {
if (!(G.f & G_SCRIPT_AUTOEXEC)) {
printf("scripts disabled for \"%s\", skipping '%s'\n", bmain->name, text->id.name + 2);