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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user