[Bf-blender-cvs] [619ce8392b2] master: Depsgraph: wrong copy-on-write update after depsgraph rebuild

Jacques Lucke noreply at git.blender.org
Tue Oct 18 15:52:07 CEST 2022


Commit: 619ce8392b2122e326dcfad4fe195de8f01cedca
Author: Jacques Lucke
Date:   Tue Oct 18 15:48:50 2022 +0200
Branches: master
https://developer.blender.org/rB619ce8392b2122e326dcfad4fe195de8f01cedca

Depsgraph: wrong copy-on-write update after depsgraph rebuild

Differential Revision: https://developer.blender.org/D16268

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

M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc

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

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index f95c0700a47..6cb0b985d3d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -453,6 +453,11 @@ static int foreach_id_cow_detect_need_for_update_callback(LibraryIDLinkCallbackD
   if (id == nullptr) {
     return IDWALK_RET_NOP;
   }
+  if (!ID_TYPE_IS_COW(GS(id->name))) {
+    /* No need to go further if thte id never had a cow copy in the depsgraph. This function is
+     * only concerned with keeping the mapping between original and cow ids intact. */
+    return IDWALK_RET_NOP;
+  }
 
   DepsgraphNodeBuilder *builder = static_cast<DepsgraphNodeBuilder *>(cb_data->user_data);
   ID *id_cow_self = cb_data->id_self;



More information about the Bf-blender-cvs mailing list