Page MenuHome
Paste P344

T47814 Fix
ActivePublic

Authored by Campbell Barton (campbellbarton) on Mar 29 2016, 6:06 PM.
diff --git a/source/blender/blenkernel/intern/sequencer.c b/source/blender/blenkernel/intern/sequencer.c
index f479a03..c5d1501 100644
--- a/source/blender/blenkernel/intern/sequencer.c
+++ b/source/blender/blenkernel/intern/sequencer.c
@@ -3403,16 +3403,16 @@ static ImBuf *do_render_strip_uncached(const SeqRenderData *context, Sequence *s
if (seq->scene && (context->scene != seq->scene)) {
#ifdef USE_SCENE_RECURSIVE_HACK
/* weak recusrive check, same as T32017 */
- if (seq->scene->id.tag & LIB_TAG_DOIT) {
+ if (seq->scene->tag_recurse & SCE_TAG_RECURSE_SEQUENCER) {
break;
}
- seq->scene->id.tag |= LIB_TAG_DOIT;
+ seq->scene->tag_recurse |= SCE_TAG_RECURSE_SEQUENCER;
#endif
ibuf = do_render_strip_seqbase(context, seq, nr, use_preprocess);
#ifdef USE_SCENE_RECURSIVE_HACK
- seq->scene->id.tag &= ~LIB_TAG_DOIT;
+ seq->scene->tag_recurse &= ~SCE_TAG_RECURSE_SEQUENCER;
#endif
}
}
@@ -3800,8 +3800,10 @@ ImBuf *BKE_sequencer_give_ibuf(const SeqRenderData *context, float cfra, int cha
seqbasep = ed->seqbasep;
}
-#ifdef USE_SCENE_RECURSIVE_HACK
- BKE_main_id_tag_idcode(context->bmain, ID_SCE, LIB_TAG_DOIT, false);
+#if defined(USE_SCENE_RECURSIVE_HACK) && defined(DEBUG)
+ for (Scene *scene = context->bmain->scene.first; scene; scene = scene->id.next) {
+ BLI_assert((scene->tag_recurse & SCE_TAG_RECURSE_SEQUENCER) == 0);
+ }
#endif
return seq_render_strip_stack(context, seqbasep, cfra, chanshown);
@@ -3815,6 +3817,12 @@ ImBuf *BKE_sequencer_give_ibuf_seqbase(const SeqRenderData *context, float cfra,
ImBuf *BKE_sequencer_give_ibuf_direct(const SeqRenderData *context, float cfra, Sequence *seq)
{
+#if defined(USE_SCENE_RECURSIVE_HACK) && defined(DEBUG)
+ for (Scene *scene = context->bmain->scene.first; scene; scene = scene->id.next) {
+ BLI_assert((scene->tag_recurse & SCE_TAG_RECURSE_SEQUENCER) == 0);
+ }
+#endif
+
return seq_render_strip(context, seq, cfra);
}
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index a526717..59303f8 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5814,6 +5814,7 @@ static void direct_link_scene(FileData *fd, Scene *sce)
sce->fps_info = NULL;
sce->customdata_mask_modal = 0;
sce->lay_updated = 0;
+ sce->tag_recurse = 0;
BKE_sound_create_scene(sce);
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index fd37bde..46e7499 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -1485,9 +1485,10 @@ typedef struct Scene {
unsigned int lay_updated; /* runtime flag, has layer ever been updated since load? */
short flag; /* various settings */
-
+
+ char tag_recurse; /* prevent eternal scene recursion, runtime flag */
+
char use_nodes;
- char pad[1];
struct bNodeTree *nodetree;
@@ -1562,6 +1563,11 @@ typedef struct Scene {
/* timeline/keyframe jumping - only selected items (on by default) */
#define SCE_KEYS_NO_SELONLY (1<<2)
+/* flag_runtime (keep clean, zero on load) */
+enum {
+ SCE_TAG_RECURSE_SEQUENCER = (1 << 0),
+};
+
/* mode (int now) */
#define R_OSA 0x0001
#define R_SHADOW 0x0002

Event Timeline