Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-14 15:32:41 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2018-09-14 18:42:58 +0300
commita415d521dbe217b1a670f6d2f3ddcade5029db79 (patch)
treebf93d9c4aadb6e60b056d0622c2d3b2d02500bb4 /source/blender/blenkernel/intern/anim.c
parent898c780633ad8d288b76305d6a6bc3caa1ad4050 (diff)
Fix object motion paths not updating correct after filtering optimization.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r--source/blender/blenkernel/intern/anim.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 68f691e4b1c..02f871e6ccf 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -401,7 +401,11 @@ static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
* - recalc: whether we need to
*/
/* TODO: include reports pointer? */
- void animviz_calc_motionpaths(Depsgraph *depsgraph, Main *bmain, Scene *scene, ListBase *targets)
+void animviz_calc_motionpaths(Depsgraph *depsgraph,
+ Main *bmain,
+ Scene *scene,
+ ListBase *targets,
+ bool restore)
{
MPathTarget *mpt;
int sfra, efra;
@@ -476,12 +480,13 @@ static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
}
/* reset original environment */
- /* NOTE: We shouldn't need to reevaluate the main scene,
- * as the depsgraph passed in calculates the results on a
- * a copy-on-write copy of the data. That said, we have to
- * restore the current frame settings
- */
+ /* NOTE: We don't always need to reevaluate the main scene, as the depsgraph
+ * may be a temporary one that works on a subset of the data. We always have
+ * to resoture the current frame though. */
CFRA = cfra;
+ if (restore) {
+ motionpaths_calc_update_scene(bmain, depsgraph);
+ }
/* clear recalc flags from targets */
for (mpt = targets->first; mpt; mpt = mpt->next) {