[Bf-blender-cvs] [00b691d] alembic_basic_io: Drivers added to a cachefile are now evaluated during scene update.
Kévin Dietrich
noreply at git.blender.org
Thu Jun 30 03:12:21 CEST 2016
Commit: 00b691d36711ff6827c0ca90faeec160131961e1
Author: Kévin Dietrich
Date: Thu Jun 30 03:07:28 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB00b691d36711ff6827c0ca90faeec160131961e1
Drivers added to a cachefile are now evaluated during scene update.
===================================================================
M source/blender/blenkernel/BKE_cachefile.h
M source/blender/blenkernel/intern/cachefile.c
M source/blender/blenkernel/intern/scene.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_cachefile.h b/source/blender/blenkernel/BKE_cachefile.h
index c4c131f..4d553a5 100644
--- a/source/blender/blenkernel/BKE_cachefile.h
+++ b/source/blender/blenkernel/BKE_cachefile.h
@@ -36,6 +36,7 @@ extern "C" {
struct CacheFile;
struct Main;
+struct Scene;
void *BKE_cachefile_add(struct Main *bmain, const char *name);
@@ -45,7 +46,7 @@ struct CacheFile *BKE_cachefile_copy(struct Main *bmain, struct CacheFile *cache
void BKE_cachefile_load(struct CacheFile *cache_file, const char *relabase);
-void BKE_cachefile_update_frame(struct Main *bmain, float ctime, const float fps);
+void BKE_cachefile_update_frame(struct Main *bmain, struct Scene *scene, float ctime, const float fps);
bool BKE_cachefile_filepath_get(struct CacheFile *cache_file, float frame,
char *r_filename);
diff --git a/source/blender/blenkernel/intern/cachefile.c b/source/blender/blenkernel/intern/cachefile.c
index 78a4f64..d5d4eb7 100644
--- a/source/blender/blenkernel/intern/cachefile.c
+++ b/source/blender/blenkernel/intern/cachefile.c
@@ -27,6 +27,7 @@
* \ingroup bke
*/
+#include "DNA_anim_types.h"
#include "DNA_cachefile_types.h"
#include "DNA_scene_types.h"
@@ -115,12 +116,15 @@ void BKE_cachefile_load(CacheFile *cache_file, const char *relabase)
#endif
}
-void BKE_cachefile_update_frame(Main *bmain, const float ctime, const float fps)
+void BKE_cachefile_update_frame(Main *bmain, Scene *scene, const float ctime, const float fps)
{
CacheFile *cache_file;
char filename[FILE_MAX];
for (cache_file = bmain->cachefiles.first; cache_file; cache_file = cache_file->id.next) {
+ /* Execute drivers only, as animation has already been done. */
+ BKE_animsys_evaluate_animdata(scene, &cache_file->id, cache_file->adt, ctime, ADT_RECALC_DRIVERS);
+
if (!cache_file->is_sequence) {
continue;
}
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 5b1d56f..17f5812 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -1906,7 +1906,7 @@ void BKE_scene_update_for_newframe_ex(EvaluationContext *eval_ctx, Main *bmain,
BKE_mask_evaluate_all_masks(bmain, ctime, true);
/* Update animated cache files for modifiers. */
- BKE_cachefile_update_frame(bmain, ctime, (((double)sce->r.frs_sec) / (double)sce->r.frs_sec_base));
+ BKE_cachefile_update_frame(bmain, sce, ctime, (((double)sce->r.frs_sec) / (double)sce->r.frs_sec_base));
#ifdef POSE_ANIMATION_WORKAROUND
scene_armature_depsgraph_workaround(bmain);
More information about the Bf-blender-cvs
mailing list