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:
authorJoshua Leung <aligorith@gmail.com>2018-08-23 05:06:11 +0300
committerJoshua Leung <aligorith@gmail.com>2018-08-23 08:07:38 +0300
commite01a9c5eeeaa61a63103c4eb63af2b752306871c (patch)
treec4393b3c2a19b51e1d134270adb089025e660d8d /source/blender/blenkernel/intern/anim.c
parent2f2ab13b5f46b26dcffb889ac4294a52c6c79085 (diff)
Motion Path Calculations: Don't pass scene into motionpaths_calc_bake_targets()
It's not needed, and actually precludes us from considering parallel evaluation in future.
Diffstat (limited to 'source/blender/blenkernel/intern/anim.c')
-rw-r--r--source/blender/blenkernel/intern/anim.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/anim.c b/source/blender/blenkernel/intern/anim.c
index 7df889d22b2..6168ce97f86 100644
--- a/source/blender/blenkernel/intern/anim.c
+++ b/source/blender/blenkernel/intern/anim.c
@@ -340,7 +340,7 @@ static void motionpaths_calc_update_scene(Main *bmain,
/* ........ */
/* perform baking for the targets on the current frame */
-static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
+static void motionpaths_calc_bake_targets(ListBase *targets, int cframe)
{
MPathTarget *mpt;
@@ -352,12 +352,12 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
/* current frame must be within the range the cache works for
* - is inclusive of the first frame, but not the last otherwise we get buffer overruns
*/
- if ((CFRA < mpath->start_frame) || (CFRA >= mpath->end_frame)) {
+ if ((cframe < mpath->start_frame) || (cframe >= mpath->end_frame)) {
continue;
}
/* get the relevant cache vert to write to */
- mpv = mpath->points + (CFRA - mpath->start_frame);
+ mpv = mpath->points + (cframe - mpath->start_frame);
Object *ob_eval = mpt->ob_eval;
@@ -386,7 +386,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
copy_v3_v3(mpv->co, ob_eval->obmat[3]);
}
- float mframe = (float)(CFRA);
+ float mframe = (float)(cframe);
/* Tag if it's a keyframe */
if (BLI_dlrbTree_search_exact(&mpt->keys, compare_ak_cfraPtr, &mframe)) {
@@ -471,7 +471,7 @@ static void motionpaths_calc_bake_targets(Scene *scene, ListBase *targets)
motionpaths_calc_update_scene(bmain, depsgraph);
/* perform baking for targets */
- motionpaths_calc_bake_targets(scene, targets);
+ motionpaths_calc_bake_targets(targets, CFRA);
}
/* reset original environment */