Commit: ebf10b72b05f2a274299f1822d2f4514e6b14624
Author: Bastien Montagne
Date:   Fri Aug 21 17:28:50 2020 +0200
Branches: blender-v2.90-release
https://developer.blender.org/rBebf10b72b05f2a274299f1822d2f4514e6b14624

Fix critical bug in foreach ID looper of Scene data-block.

Since stone age of lib_query, the code would iterate over the current
list of active sequences (from a meta strip e.g.), and not over the
whole list of those.

This is a critical issue as it means in some cases (editing a meta strip
typically), some ID pointers would be missed/ignored by this foreach
looper, which is now at the center of most of our ID management code.

This caused a bug here at the studio, leading to loss of all sound IDs
used by sound strips when editing and undoing inside a meta strip, since
ID refcounting would not happen properly on strips using sounds outside
the meta-strip context during file reading of the undo steps.

To be backported to 2.83.

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

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

M       source/blender/blenkernel/intern/scene.c

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

diff --git a/source/blender/blenkernel/intern/scene.c 
b/source/blender/blenkernel/intern/scene.c
index 5ae2f4b9005..141737b46ee 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -469,7 +469,7 @@ static void scene_foreach_id(ID *id, LibraryForeachIDData 
*data)
   }
   if (scene->ed) {
     Sequence *seq;
-    SEQP_BEGIN (scene->ed, seq) {
+    SEQ_BEGIN (scene->ed, seq) {
       BKE_LIB_FOREACHID_PROCESS(data, seq->scene, IDWALK_CB_NEVER_SELF);
       BKE_LIB_FOREACHID_PROCESS(data, seq->scene_camera, IDWALK_CB_NOP);
       BKE_LIB_FOREACHID_PROCESS(data, seq->clip, IDWALK_CB_USER);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to