Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/intern/blendfile.c
| Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | |||||
| #include "BKE_lib_override.h" | #include "BKE_lib_override.h" | ||||
| #include "BKE_main.h" | #include "BKE_main.h" | ||||
| #include "BKE_preferences.h" | #include "BKE_preferences.h" | ||||
| #include "BKE_report.h" | #include "BKE_report.h" | ||||
| #include "BKE_scene.h" | #include "BKE_scene.h" | ||||
| #include "BKE_screen.h" | #include "BKE_screen.h" | ||||
| #include "BKE_studiolight.h" | #include "BKE_studiolight.h" | ||||
| #include "BKE_undo_system.h" | #include "BKE_undo_system.h" | ||||
| #include "BKE_video_edit.h" | |||||
| #include "BKE_workspace.h" | #include "BKE_workspace.h" | ||||
| #include "BLO_readfile.h" | #include "BLO_readfile.h" | ||||
| #include "BLO_writefile.h" | #include "BLO_writefile.h" | ||||
| #include "RNA_access.h" | #include "RNA_access.h" | ||||
| #include "RE_pipeline.h" | #include "RE_pipeline.h" | ||||
| ▲ Show 20 Lines • Show All 262 Lines • ▼ Show 20 Lines | if (!bmain->scenes.first) { | ||||
| BKE_scene_add(bmain, "Empty"); | BKE_scene_add(bmain, "Empty"); | ||||
| } | } | ||||
| CTX_data_scene_set(C, bmain->scenes.first); | CTX_data_scene_set(C, bmain->scenes.first); | ||||
| win->scene = CTX_data_scene(C); | win->scene = CTX_data_scene(C); | ||||
| curscene = CTX_data_scene(C); | curscene = CTX_data_scene(C); | ||||
| } | } | ||||
| /** Make sure there always is a video edit. */ | |||||
| if (CTX_data_video_edit(C) == NULL) { | |||||
| wmWindowManager *wm = bmain->wm.first; | |||||
| if (!bmain->video_edits.first) { | |||||
| BKE_video_edit_add(bmain, "Edit"); | |||||
| } | |||||
| CTX_data_video_edit_set(C, bmain->video_edits.first); | |||||
| if (wm) { | |||||
| LISTBASE_FOREACH (wmWindow *, win, &wm->windows) { | |||||
| win->video_edit = CTX_data_video_edit(C); | |||||
| } | |||||
| } | |||||
| } | |||||
| BLI_assert(curscene == CTX_data_scene(C)); | BLI_assert(curscene == CTX_data_scene(C)); | ||||
| /* special cases, override loaded flags: */ | /* special cases, override loaded flags: */ | ||||
| if (G.f != bfd->globalf) { | if (G.f != bfd->globalf) { | ||||
| const int flags_keep = G_FLAG_ALL_RUNTIME; | const int flags_keep = G_FLAG_ALL_RUNTIME; | ||||
| bfd->globalf &= G_FLAG_ALL_READFILE; | bfd->globalf &= G_FLAG_ALL_READFILE; | ||||
| bfd->globalf = (bfd->globalf & ~flags_keep) | (G.f & flags_keep); | bfd->globalf = (bfd->globalf & ~flags_keep) | (G.f & flags_keep); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 642 Lines • Show Last 20 Lines | |||||