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:
authorMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
committerMiika Hamalainen <blender@miikah.org>2011-11-07 20:36:49 +0400
commitedec46b0a6aac18f406991b9e16228d4bd848c61 (patch)
tree1240768d737c63705fdb38c9832d926ed0bcda94 /source/blender/blenkernel/intern/pointcache.c
parent2ed6f077b3952123d56916980d18a379ecb3e5ac (diff)
parent4d7a9e5c055fd3903162b61fdd40fb77b2b96793 (diff)
Merge with trunk r41625
Diffstat (limited to 'source/blender/blenkernel/intern/pointcache.c')
-rw-r--r--source/blender/blenkernel/intern/pointcache.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/source/blender/blenkernel/intern/pointcache.c b/source/blender/blenkernel/intern/pointcache.c
index cd71f43221b..b6dd916b420 100644
--- a/source/blender/blenkernel/intern/pointcache.c
+++ b/source/blender/blenkernel/intern/pointcache.c
@@ -185,8 +185,8 @@ static void ptcache_softbody_interpolate(int index, void *soft_v, void **data, f
if(cfra1 == cfra2)
return;
- VECCOPY(keys[1].co, bp->pos);
- VECCOPY(keys[1].vel, bp->vec);
+ copy_v3_v3(keys[1].co, bp->pos);
+ copy_v3_v3(keys[1].vel, bp->vec);
if(old_data) {
memcpy(keys[2].co, old_data, 3 * sizeof(float));
@@ -204,8 +204,8 @@ static void ptcache_softbody_interpolate(int index, void *soft_v, void **data, f
mul_v3_fl(keys->vel, 1.0f / dfra);
- VECCOPY(bp->pos, keys->co);
- VECCOPY(bp->vec, keys->vel);
+ copy_v3_v3(bp->pos, keys->co);
+ copy_v3_v3(bp->vec, keys->vel);
}
static int ptcache_softbody_totpoint(void *soft_v, int UNUSED(cfra))
{
@@ -485,8 +485,8 @@ static void ptcache_cloth_interpolate(int index, void *cloth_v, void **data, flo
if(cfra1 == cfra2)
return;
- VECCOPY(keys[1].co, vert->x);
- VECCOPY(keys[1].vel, vert->v);
+ copy_v3_v3(keys[1].co, vert->x);
+ copy_v3_v3(keys[1].vel, vert->v);
if(old_data) {
memcpy(keys[2].co, old_data, 3 * sizeof(float));
@@ -504,8 +504,8 @@ static void ptcache_cloth_interpolate(int index, void *cloth_v, void **data, flo
mul_v3_fl(keys->vel, 1.0f / dfra);
- VECCOPY(vert->x, keys->co);
- VECCOPY(vert->v, keys->vel);
+ copy_v3_v3(vert->x, keys->co);
+ copy_v3_v3(vert->v, keys->vel);
/* should vert->xconst be interpolated somehow too? - jahka */
}
@@ -2265,7 +2265,7 @@ int BKE_ptcache_id_exist(PTCacheID *pid, int cfra)
}
void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startframe, int *endframe, float *timescale)
{
- Object *ob;
+ /* Object *ob; */ /* UNUSED */
PointCache *cache;
/* float offset; unused for now */
float time, nexttime;
@@ -2282,13 +2282,13 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
* is probably to interpolate results from two frames for that ..
*/
- ob= pid->ob;
+ /* ob= pid->ob; */ /* UNUSED */
cache= pid->cache;
if(timescale) {
- time= bsystem_time(scene, ob, cfra, 0.0f);
- nexttime= bsystem_time(scene, ob, cfra+1.0f, 0.0f);
-
+ time= BKE_curframe(scene);
+ nexttime= BKE_frame_to_ctime(scene, CFRA+1);
+
*timescale= MAX2(nexttime - time, 0.0f);
}
@@ -2302,7 +2302,7 @@ void BKE_ptcache_id_time(PTCacheID *pid, Scene *scene, float cfra, int *startfra
* system timing. */
#if 0
if ((ob->partype & PARSLOW)==0) {
- offset= give_timeoffset(ob);
+ offset= ob->sf;
*startframe += (int)(offset+0.5f);
*endframe += (int)(offset+0.5f);
@@ -3028,7 +3028,7 @@ void BKE_ptcache_toggle_disk_cache(PTCacheID *pid)
BKE_ptcache_update_info(pid);
}
-void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
+void BKE_ptcache_disk_cache_rename(PTCacheID *pid, const char *name_src, const char *name_dst)
{
char old_name[80];
int len; /* store the length of the string */
@@ -3045,7 +3045,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
BLI_strncpy(old_name, pid->cache->name, sizeof(old_name));
/* get "from" filename */
- BLI_strncpy(pid->cache->name, from, sizeof(pid->cache->name));
+ BLI_strncpy(pid->cache->name, name_src, sizeof(pid->cache->name));
len = ptcache_filename(pid, old_filename, 0, 0, 0); /* no path */
@@ -3059,7 +3059,7 @@ void BKE_ptcache_disk_cache_rename(PTCacheID *pid, char *from, char *to)
BLI_snprintf(ext, sizeof(ext), "_%02u"PTCACHE_EXT, pid->stack_index);
/* put new name into cache */
- BLI_strncpy(pid->cache->name, to, sizeof(pid->cache->name));
+ BLI_strncpy(pid->cache->name, name_dst, sizeof(pid->cache->name));
while ((de = readdir(dir)) != NULL) {
if (strstr(de->d_name, ext)) { /* do we have the right extension?*/