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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-27 20:45:00 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-01-27 20:45:00 +0400
commit6cadd2bee34fb276805086a7d82e2f0f7be7138d (patch)
tree2e6c58daaa386af7fa47a4293eba8f994a9d6704 /source/blender/blenkernel/intern/object.c
parent431619e45b75bbe4c9476dd944168fb8bea2e3ca (diff)
Fix drivers and shape keys not handling subframes / frame mapping properly.
Change Scene.frame_set so that it ensures subframe in range [0,1[ as Blender expects, otherwise some things like physics point cache lookups don't get evaluated properly.
Diffstat (limited to 'source/blender/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index b5e82586f5a..aac1d9f1f7b 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1808,7 +1808,7 @@ static void ob_parcurve(Scene *scene, Object *ob, Object *par, float mat[4][4])
CLAMP(ctime, 0.0f, 1.0f);
}
else {
- ctime = scene->r.cfra;
+ ctime = BKE_scene_frame_get(scene);
if (IS_EQF(cu->pathlen, 0.0f) == 0)
ctime /= cu->pathlen;
@@ -2187,7 +2187,7 @@ void BKE_object_where_is_calc_mat4(Scene *scene, Object *ob, float obmat[4][4])
void BKE_object_where_is_calc(struct Scene *scene, Object *ob)
{
- BKE_object_where_is_calc_time(scene, ob, (float)scene->r.cfra);
+ BKE_object_where_is_calc_time(scene, ob, BKE_scene_frame_get(scene));
}
void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
@@ -2226,7 +2226,7 @@ void BKE_object_where_is_calc_simul(Scene *scene, Object *ob)
bConstraintOb *cob;
cob = BKE_constraints_make_evalob(scene, ob, NULL, CONSTRAINT_OBTYPE_OBJECT);
- BKE_solve_constraints(&ob->constraints, cob, (float)scene->r.cfra);
+ BKE_solve_constraints(&ob->constraints, cob, BKE_scene_frame_get(scene));
BKE_constraints_clear_evalob(cob);
}
}
@@ -2670,7 +2670,7 @@ void BKE_object_handle_update(Scene *scene, Object *ob)
if (ob->recalc & OB_RECALC_DATA) {
ID *data_id = (ID *)ob->data;
AnimData *adt = BKE_animdata_from_id(data_id);
- float ctime = (float)scene->r.cfra; /* XXX this is bad... */
+ float ctime = BKE_scene_frame_get(scene);
if (G.debug & G_DEBUG)
printf("recalcdata %s\n", ob->id.name + 2);