[Bf-blender-cvs] [6d6db87] alembic: Make use of the subframe value in Scene when reading from cache archives.
Lukas Tönne
noreply at git.blender.org
Sat May 30 16:04:05 CEST 2015
Commit: 6d6db87ae7e0e0a75f592e531fc9d8410760fd45
Author: Lukas Tönne
Date: Sat May 30 13:28:21 2015 +0200
Branches: alembic
https://developer.blender.org/rB6d6db87ae7e0e0a75f592e531fc9d8410760fd45
Make use of the subframe value in Scene when reading from cache archives.
Subframes are necessary when interpolating values.
===================================================================
M source/blender/blenkernel/intern/object_dupli.c
M source/blender/makesrna/intern/rna_main_api.c
M source/blender/makesrna/intern/rna_object.c
===================================================================
diff --git a/source/blender/blenkernel/intern/object_dupli.c b/source/blender/blenkernel/intern/object_dupli.c
index da24550..d022937 100644
--- a/source/blender/blenkernel/intern/object_dupli.c
+++ b/source/blender/blenkernel/intern/object_dupli.c
@@ -1234,7 +1234,7 @@ static const DupliGenerator *get_dupli_generator(const DupliContext *ctx)
ListBase *object_duplilist_ex(EvaluationContext *eval_ctx, Scene *scene, Object *ob, bool update)
{
if (update) {
- BKE_object_dupli_cache_update(scene, ob, eval_ctx, (float)scene->r.cfra);
+ BKE_object_dupli_cache_update(scene, ob, eval_ctx, (float)scene->r.cfra + scene->r.subframe);
}
if (ob->dup_cache && (ob->dup_cache->result != CACHE_READ_SAMPLE_INVALID)) {
diff --git a/source/blender/makesrna/intern/rna_main_api.c b/source/blender/makesrna/intern/rna_main_api.c
index a89373c..b9b3bb5 100644
--- a/source/blender/makesrna/intern/rna_main_api.c
+++ b/source/blender/makesrna/intern/rna_main_api.c
@@ -337,7 +337,7 @@ Mesh *rna_Main_meshes_new_from_dupli(
}
if (is_cached) {
- float frame = (float)scene->r.cfra;
+ float frame = (float)scene->r.cfra + scene->r.subframe;
bool use_render = (settings == 2);
if (!ELEM(settings, 1, 2))
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index a02839a..edffcf0 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -1530,7 +1530,7 @@ Strands *rna_DupliObject_strands_new(DupliObject *dob, ReportList *UNUSED(report
bool is_cached = parent->cache_library && (parent->cache_library->source_mode == CACHE_LIBRARY_SOURCE_CACHE || parent->cache_library->display_mode == CACHE_LIBRARY_DISPLAY_RESULT);
if (is_cached) {
- float frame = (float)scene->r.cfra;
+ float frame = (float)scene->r.cfra + scene->r.subframe;
bool use_render = (settings == 2);
if (!ELEM(settings, 1, 2))
@@ -1582,7 +1582,7 @@ StrandsChildren *rna_DupliObject_strands_children_new(DupliObject *dob, ReportLi
bool is_cached = parent->cache_library && (parent->cache_library->source_mode == CACHE_LIBRARY_SOURCE_CACHE || parent->cache_library->display_mode == CACHE_LIBRARY_DISPLAY_RESULT);
if (is_cached) {
- float frame = (float)scene->r.cfra;
+ float frame = (float)scene->r.cfra + scene->r.subframe;
bool use_render = (settings == 2);
if (!ELEM(settings, 1, 2))
More information about the Bf-blender-cvs
mailing list