[Bf-blender-cvs] [9edc64e255b] blender2.8: Tag scene & objects for COW update after physics settings changed via RNA

Sybren A. Stüvel noreply at git.blender.org
Thu May 17 15:49:04 CEST 2018


Commit: 9edc64e255bd8208461794d8f444a8dc61a680a5
Author: Sybren A. Stüvel
Date:   Thu May 17 15:48:23 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB9edc64e255bd8208461794d8f444a8dc61a680a5

Tag scene & objects for COW update after physics settings changed via RNA

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

M	source/blender/blenkernel/intern/pointcache.c
M	source/blender/makesrna/intern/rna_scene.c

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

diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index 3ab17b083db..12b197070a2 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -72,6 +72,8 @@
 
 #include "BIK_api.h"
 
+#include "DEG_depsgraph.h"
+
 #ifdef WITH_BULLET
 #  include "RBI_api.h"
 #endif
@@ -3373,6 +3375,7 @@ int  BKE_ptcache_object_reset(Scene *scene, Object *ob, int mode)
 	if (ob->type == OB_ARMATURE)
 		BIK_clear_cache(ob->pose);
 
+	DEG_id_tag_update(&ob->id, DEG_TAG_COPY_ON_WRITE);
 	return reset;
 }
 
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 36410a4211f..fc4b1a49963 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -80,6 +80,8 @@
 
 #include "BLI_threads.h"
 
+#include "DEG_depsgraph.h"
+
 #ifdef WITH_OPENEXR
 const EnumPropertyItem rna_enum_exr_codec_items[] = {
 	{R_IMF_EXR_CODEC_NONE, "NONE", 0, "None", ""},
@@ -1546,6 +1548,8 @@ static void rna_Physics_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
 		BKE_ptcache_object_reset(scene, ob, PTCACHE_RESET_DEPSGRAPH);
 	}
 	FOREACH_SCENE_OBJECT_END;
+
+	DEG_id_tag_update(&scene->id, DEG_TAG_COPY_ON_WRITE);
 }
 
 static void rna_Scene_editmesh_select_mode_set(PointerRNA *ptr, const int *value)



More information about the Bf-blender-cvs mailing list