Fix T62076: Delete Active Scene Freezes Blender.
Not sure where that piece of code originates from, but trying to remap usages of deleted scene to newly active scene in *whole* bmain is really, really not the thing to do! Just use generic ID deletion code here, no reason it could not handle the task properly. ;)
This commit is contained in:
parent
d0df7fb3b9
commit
c7cf8282a6
Notes:
blender-bot
2023-02-14 03:31:57 +01:00
Referenced by issue #62076, Delete Active Scene Freezes Blender
|
@ -107,12 +107,7 @@ bool ED_scene_delete(bContext *C, Main *bmain, wmWindow *win, Scene *scene)
|
|||
|
||||
WM_window_set_active_scene(bmain, C, win, scene_new);
|
||||
|
||||
BKE_libblock_remap(bmain, scene, scene_new, ID_REMAP_SKIP_INDIRECT_USAGE | ID_REMAP_SKIP_NEVER_NULL_USAGE);
|
||||
|
||||
id_us_clear_real(&scene->id);
|
||||
if (scene->id.us == 0) {
|
||||
BKE_id_free(bmain, scene);
|
||||
}
|
||||
BKE_id_delete(bmain, scene);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue