[Bf-blender-cvs] [690a5f0e500] blender2.8: Depsgraph: Remove workaround for scene free

Sergey Sharybin noreply at git.blender.org
Fri May 11 14:28:53 CEST 2018


Commit: 690a5f0e500b8c72e7ed7ba0d7c6068fe80c6991
Author: Sergey Sharybin
Date:   Fri May 11 14:28:03 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB690a5f0e500b8c72e7ed7ba0d7c6068fe80c6991

Depsgraph: Remove workaround for scene free

No functional changes commit ;)

===================================================================

M	source/blender/blenkernel/intern/library_remap.c
M	source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

===================================================================

diff --git a/source/blender/blenkernel/intern/library_remap.c b/source/blender/blenkernel/intern/library_remap.c
index c5d6df382a7..983f6781572 100644
--- a/source/blender/blenkernel/intern/library_remap.c
+++ b/source/blender/blenkernel/intern/library_remap.c
@@ -780,7 +780,7 @@ void BKE_libblock_free_datablock(ID *id, const int UNUSED(flag))
 	const short type = GS(id->name);
 	switch (type) {
 		case ID_SCE:
-			BKE_scene_free((Scene *)id);
+			BKE_scene_free_ex((Scene *)id, false);
 			break;
 		case ID_LI:
 			BKE_library_free((Library *)id);
diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index f36f2ecdb46..7fd59f6408c 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -819,20 +819,6 @@ void deg_free_copy_on_write_datablock(ID *id_cow)
 			ob_cow->data = NULL;
 			break;
 		}
-		case ID_SCE:
-		{
-			/* Special case for scene: we use explicit function call which
-			 * ensures no access to other datablocks is done.
-			 */
-			/* Not sure why this is needed? If id_cow scene has been correctly created outside of Main database,
-			 * then freeing it with regular BKE_id_free should properly *not* do any
-			 * children datablock user refcount manipulation... --mont29 */
-			Scene *scene = (Scene *)id_cow;
-			BKE_scene_free_ex(scene, false);
-			BKE_libblock_free_data(id_cow, false);
-			id_cow->name[0] = '\0';
-			return;
-		}
 		default:
 			break;
 	}



More information about the Bf-blender-cvs mailing list