[Bf-blender-cvs] [42798a5ca16] master: Fix T67516 VSE: Animation evaluated incorrectly when scene strip present

Sybren A. Stüvel noreply at git.blender.org
Tue Aug 13 16:56:53 CEST 2019


Commit: 42798a5ca16154c9ecaf5a2359bd0b4fbe9dec94
Author: Sybren A. Stüvel
Date:   Thu Aug 1 14:10:04 2019 +0200
Branches: master
https://developer.blender.org/rB42798a5ca16154c9ecaf5a2359bd0b4fbe9dec94

Fix T67516 VSE: Animation evaluated incorrectly when scene strip present

The calls to `BKE_animsys_evaluate_all_animation()` and
`BKE_mask_evaluate_all_masks()` used the wrong timecode to evaluate the
animation system. This happened:

- Sequencer in scene A was rendered at frame X.
- Scene strip for scene B which should be evaluated at frame Y.
- BKE_animsys_evaluate_all_animation() was called with frame Y, which
  also re-evaluated the animation data in scene A.
- Other sequencer strips with animated values were then evaluated for
  frame Y and not frame X.

Since the depsgraph for rendering the scene strip is already OK and does
its job, it's no longer necessary to re-evaluate all the animation in
this way.

Removed `BKE_mask_evaluate_all_masks()` because it's no longer used.

Reviewers: sergey, brecht, iss

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

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

M	source/blender/blenkernel/BKE_mask.h
M	source/blender/blenkernel/intern/mask.c
M	source/blender/render/intern/source/pipeline.c

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

diff --git a/source/blender/blenkernel/BKE_mask.h b/source/blender/blenkernel/BKE_mask.h
index bfdeadc7f60..f87c73e35a2 100644
--- a/source/blender/blenkernel/BKE_mask.h
+++ b/source/blender/blenkernel/BKE_mask.h
@@ -171,7 +171,6 @@ void BKE_mask_coord_to_image(struct Image *image,
 
 /* parenting */
 
-void BKE_mask_evaluate_all_masks(struct Main *bmain, float ctime, const bool do_newframe);
 void BKE_mask_evaluate(struct Mask *mask, const float ctime, const bool do_newframe);
 void BKE_mask_layer_evaluate(struct MaskLayer *masklay, const float ctime, const bool do_newframe);
 void BKE_mask_parent_init(struct MaskParent *parent);
diff --git a/source/blender/blenkernel/intern/mask.c b/source/blender/blenkernel/intern/mask.c
index bb93d068bef..8f8150b6a64 100644
--- a/source/blender/blenkernel/intern/mask.c
+++ b/source/blender/blenkernel/intern/mask.c
@@ -1469,15 +1469,6 @@ void BKE_mask_evaluate(Mask *mask, const float ctime, const bool do_newframe)
   }
 }
 
-void BKE_mask_evaluate_all_masks(Main *bmain, float ctime, const bool do_newframe)
-{
-  Mask *mask;
-
-  for (mask = bmain->masks.first; mask; mask = mask->id.next) {
-    BKE_mask_evaluate(mask, ctime, do_newframe);
-  }
-}
-
 void BKE_mask_parent_init(MaskParent *parent)
 {
   parent->id_type = ID_MC;
diff --git a/source/blender/render/intern/source/pipeline.c b/source/blender/render/intern/source/pipeline.c
index d620cd38b76..6284fa2d119 100644
--- a/source/blender/render/intern/source/pipeline.c
+++ b/source/blender/render/intern/source/pipeline.c
@@ -1680,7 +1680,6 @@ static void do_render_all_options(Render *re)
 {
   Object *camera;
   bool render_seq = false;
-  int cfra = re->r.cfra;
 
   re->current_scene_update(re->suh, re->scene);
 
@@ -1692,16 +1691,6 @@ static void do_render_all_options(Render *re)
   BKE_image_all_free_anim_ibufs(re->main, re->r.cfra);
   BKE_sequencer_all_free_anim_ibufs(re->scene, re->r.cfra);
 
-  /* Update for sequencer and compositing animation.
-   * TODO: ideally we would create a depsgraph with a copy of the scene
-   * like the render engine, but sequencer and compositing do not (yet?)
-   * work with copy-on-write. */
-  BKE_animsys_evaluate_all_animation(re->main, NULL, re->scene, (float)cfra);
-
-  /* Update for masks
-   * (these do not use animsys but own lighter weight structure to define animation). */
-  BKE_mask_evaluate_all_masks(re->main, (float)cfra, true);
-
   if (RE_engine_render(re, 1)) {
     /* in this case external render overrides all */
   }



More information about the Bf-blender-cvs mailing list