Commit: c44e06b72ce8dbd49a66e875b96cee39c5f5febb
Author: Kévin Dietrich
Date:   Fri Jul 8 11:19:19 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rBc44e06b72ce8dbd49a66e875b96cee39c5f5febb

Lookup velocity using the right times.

===================================================================

M       source/blender/makesrna/intern/rna_modifier.c

===================================================================

diff --git a/source/blender/makesrna/intern/rna_modifier.c 
b/source/blender/makesrna/intern/rna_modifier.c
index b58df9f..68a67fd 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -283,6 +283,7 @@ EnumPropertyItem rna_enum_axis_flag_xyz_items[] = {
 #include "DNA_curve_types.h"
 #include "DNA_smoke_types.h"
 
+#include "BKE_cachefile.h"
 #include "BKE_context.h"
 #include "BKE_depsgraph.h"
 #include "BKE_library.h"
@@ -1134,7 +1135,7 @@ static void 
rna_MeshSequenceCacheModifier_velocity_get(PointerRNA *ptr, float *v
        MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)ptr->data;
 
        Scene *scene = mcmd->modifier.scene;
-       const float time = CFRA / FPS;
+       const float time = BKE_cachefile_time_offset(mcmd->cache_file, CFRA, 
FPS);
 
        ABC_get_velocity_cache(mcmd->cache_file->handle, mcmd->abc_object_path, 
values, time);
 #else
@@ -1148,11 +1149,10 @@ static int 
rna_MeshSequenceCacheModifier_has_velocity_get(PointerRNA *ptr)
        MeshSeqCacheModifierData *mcmd = (MeshSeqCacheModifierData *)ptr->data;
 
        Scene *scene = mcmd->modifier.scene;
-       const float time = CFRA / FPS;
+       const float time = BKE_cachefile_time_offset(mcmd->cache_file, CFRA, 
FPS);
 
        return ABC_has_velocity_cache(mcmd->cache_file->handle, 
mcmd->abc_object_path, time);
 #else
-
        return false;
        UNUSED_VARS(ptr);
 #endif

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

Reply via email to