Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2019-03-03 23:59:28 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-03-03 23:59:28 +0300
commitc7cf8282a6ab9b9a627645564d19a8080edd2d09 (patch)
treefe3cd6204e38303b027f39fe092761e392948d81 /source/blender/editors/scene
parentd0df7fb3b94ea85dd783f372c3f926d250944305 (diff)
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. ;)
Diffstat (limited to 'source/blender/editors/scene')
-rw-r--r--source/blender/editors/scene/scene_edit.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/source/blender/editors/scene/scene_edit.c b/source/blender/editors/scene/scene_edit.c
index b226af46757..8983438f0a3 100644
--- a/source/blender/editors/scene/scene_edit.c
+++ b/source/blender/editors/scene/scene_edit.c
@@ -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;
}