Merge branch 'blender-v5.0-release'

This commit is contained in:
Falk David
2025-10-10 14:16:13 +02:00
3 changed files with 26 additions and 1 deletions

View File

@@ -129,7 +129,7 @@ void ANIM_draw_scene_strip_range(const bContext *C, View2D *v2d)
return;
}
const Strip *scene_strip = blender::ed::vse::get_scene_strip_for_time_sync(sequencer_scene);
if (!scene_strip) {
if (!scene_strip || !scene_strip->scene) {
return;
}
GPU_blend(GPU_BLEND_ALPHA);

View File

@@ -94,6 +94,14 @@ bool ED_scene_delete(bContext *C, Main *bmain, Scene *scene)
wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
WM_jobs_kill_all_from_owner(wm, scene);
/* Cancel animation playback. */
if (bScreen *screen = ED_screen_animation_playing(CTX_wm_manager(C))) {
ScreenAnimData *sad = static_cast<ScreenAnimData *>(screen->animtimer->customdata);
if (sad->scene == scene) {
ED_screen_animation_play(C, 0, 0);
}
}
if (scene->id.prev) {
scene_new = static_cast<Scene *>(scene->id.prev);
}

View File

@@ -205,6 +205,23 @@ static void rna_Main_scenes_remove(
/* Don't rely on `CTX_wm_window(C)` as it may have been cleared,
* yet windows may still be open that reference this scene. */
wmWindowManager *wm = static_cast<wmWindowManager *>(bmain->wm.first);
/* Cancel animation playback. */
if (bScreen *screen = ED_screen_animation_playing(wm)) {
ScreenAnimData *sad = static_cast<ScreenAnimData *>(screen->animtimer->customdata);
if (sad->scene == scene) {
# ifdef WITH_PYTHON
BPy_BEGIN_ALLOW_THREADS;
# endif
ED_screen_animation_play(C, 0, 0);
# ifdef WITH_PYTHON
BPy_END_ALLOW_THREADS;
# endif
}
}
LISTBASE_FOREACH (wmWindow *, win, &wm->windows) {
if (WM_window_get_active_scene(win) == scene) {
# ifdef WITH_PYTHON