From 1d6869075fcc760af71dca8c9e57ecef76b66227 Mon Sep 17 00:00:00 2001 From: dooglus Date: Tue, 2 Oct 2007 13:30:12 +0000 Subject: [PATCH] Commented the "Adjust for time" code in valuenode_animated.cpp while trying to understand what it's doing. git-svn-id: http://svn.voria.com/code@811 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/synfig/valuenode_animated.cpp | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/synfig-core/trunk/src/synfig/valuenode_animated.cpp b/synfig-core/trunk/src/synfig/valuenode_animated.cpp index 1c37cbe..733729f 100644 --- a/synfig-core/trunk/src/synfig/valuenode_animated.cpp +++ b/synfig-core/trunk/src/synfig/valuenode_animated.cpp @@ -457,13 +457,27 @@ public: if(iter_get_after==INTERPOLATION_HALT) curve.second.t1()*=0; + // if this isn't the first curve else if(iter_get_after != INTERPOLATION_LINEAR && !curve_list.empty()) - curve.second.t1()*=(curve.second.get_dt()*(timeadjust+1))/(curve.second.get_dt()*timeadjust+curve_list.back().second.get_dt()); + // adjust it for the curve that came before it + curve.second.t1() *= + // (time span of this curve) * 1.5 + // ----------------------------------------------------------------- + // ((time span of this curve) * 0.5) + (time span of previous curve) + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust + curve_list.back().second.get_dt()); if(next_get_before==INTERPOLATION_HALT) curve.second.t2()*=0; + // if this isn't the last curve else if(next_get_before != INTERPOLATION_LINEAR && after_next!=waypoint_list_.end()) - curve.second.t2()*=(curve.second.get_dt()*(timeadjust+1))/(curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time())); + // adjust it for the curve that came after it + curve.second.t2() *= + // (time span of this curve) * 1.5 + // ------------------------------------------------------------- + // ((time span of this curve) * 0.5) + (time span of next curve) + (curve.second.get_dt()*(timeadjust+1)) / + (curve.second.get_dt()*timeadjust+(after_next->get_time()-next->get_time())); } // not CONSTANT } -- 2.7.4