Revision: 21587
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=21587
Author:   ben2610
Date:     2009-07-14 23:00:15 +0200 (Tue, 14 Jul 2009)

Log Message:
-----------
iTaSC: handle negative frame number. Shift time line by 2^31 (in ms) internally 
to make all frame look positive. Only drawback is that rest pose takes a whole 
8K buffer by itself, to be fixed later.

Modified Paths:
--------------
    branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp

Modified: branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp
===================================================================
--- branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp      
2009-07-14 20:49:45 UTC (rev 21586)
+++ branches/itasc/source/blender/ikplugin/intern/itasc_plugin.cpp      
2009-07-14 21:00:15 UTC (rev 21587)
@@ -885,12 +885,12 @@
        for (i=0; i<ikscene->numchan; i++) {
                ikscene->channels[i].pchan->flag |= POSE_DONE;
        }
-       double timestamp = ctime * frtime;
+       double timestamp = ctime * frtime + 2147483.648;
        double timestep = frtime;
        bool reiterate = false;
        if (ikscene->cache) {
                iTaSC::CacheTS sts, cts, dts;
-               sts = cts = (iTaSC::CacheTS)(timestamp*1000.0);
+               sts = cts = (iTaSC::CacheTS)(timestamp*1000.0+0.5);
                if (ikscene->cache->getPreviousCacheItem(ikscene->armature, 0, 
&cts) == NULL || cts == 0) {
                        // the cache is empty before this time, reiterate
                        reiterate = true;


_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to