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>2011-11-06 10:08:18 +0400
committerJoshua Leung <aligorith@gmail.com>2011-11-06 10:08:18 +0400
commit723484ec066d3e2d2b0943dc9dca156d63c07c39 (patch)
treeb7a6c13a32422df9acec10231a82a084c3d0c55a /source/blender/blenkernel/intern/key.c
parent440c1c2c1745b6d4acd13f405643100cb913fb3b (diff)
Removed old "bsystem_time()" function, which by now is just a
duplicate of BKE_curframe() which just takes two extra args. For the few calls in the physics engine where CFRA+1 instead of CFRA was being used, I've added a new BKE_nextframe() call, which will calculate for CFRA+1 instead of CFRA in much the same way that bsystem_time() would end up doing things (which means including subframe steps).
Diffstat (limited to 'source/blender/blenkernel/intern/key.c')
-rw-r--r--source/blender/blenkernel/intern/key.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/key.c b/source/blender/blenkernel/intern/key.c
index 6d095117136..c389800b0d1 100644
--- a/source/blender/blenkernel/intern/key.c
+++ b/source/blender/blenkernel/intern/key.c
@@ -59,6 +59,7 @@
#include "BKE_main.h"
#include "BKE_object.h"
#include "BKE_deform.h"
+#include "BKE_scene.h"
#include "RNA_access.h"
@@ -1072,7 +1073,7 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
for(a=0; a<tot; a+=step, cfra+= delta) {
- ctime= bsystem_time(scene, NULL, cfra, 0.0); // xxx ugly cruft!
+ ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
@@ -1106,7 +1107,7 @@ static void do_mesh_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
}
else {
- ctime= bsystem_time(scene, ob, (float)scene->r.cfra, 0.0f); // xxx old cruft
+ ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
@@ -1204,7 +1205,7 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
while (a < estep) {
if (remain <= 0) {
cfra+= delta;
- ctime= bsystem_time(scene, NULL, cfra, 0.0f); // XXX old cruft
+ ctime= BKE_curframe(scene);
ctime /= 100.0f;
CLAMP(ctime, 0.0f, 1.0f); // XXX for compat, we use this, but this clamping was confusing
@@ -1231,7 +1232,7 @@ static void do_curve_key(Scene *scene, Object *ob, Key *key, char *out, const in
}
else {
- ctime= bsystem_time(scene, NULL, (float)scene->r.cfra, 0.0);
+ ctime= BKE_curframe(scene);
if(key->type==KEY_RELATIVE) {
do_rel_cu_key(cu, cu->key, actkb, ctime, out, tot);
@@ -1267,7 +1268,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
for(a=0; a<tot; a++, cfra+= delta) {
- ctime= bsystem_time(scene, NULL, cfra, 0.0); // XXX old cruft
+ ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
ctime /= 100.0;
@@ -1298,7 +1299,7 @@ static void do_latt_key(Scene *scene, Object *ob, Key *key, char *out, const int
}
}
else {
- ctime= bsystem_time(scene, NULL, (float)scene->r.cfra, 0.0);
+ ctime= BKE_curframe(scene);
#if 0 // XXX old animation system
if(calc_ipo_spec(key->ipo, KEY_SPEED, &ctime)==0) {
@@ -1462,7 +1463,7 @@ KeyBlock *add_keyblock(Key *key, const char *name)
kb->pos= curpos + 0.1f;
else {
#if 0 // XXX old animation system
- curpos= bsystem_time(scene, 0, (float)CFRA, 0.0);
+ curpos= BKE_curframe(scene);
if(calc_ipo_spec(key->ipo, KEY_SPEED, &curpos)==0) {
curpos /= 100.0;
}