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:
authorMatt Ebb <matt@mke3.net>2010-06-27 09:39:55 +0400
committerMatt Ebb <matt@mke3.net>2010-06-27 09:39:55 +0400
commit03fa4bb9992293b51eb7c24f2c1f810df634e632 (patch)
tree7dacebe843bf9c041b3ebb220665f428d58e2804 /source/blender/modifiers/intern/MOD_build.c
parentea4e5a08cdb782d314cee48dde5dff9331054fe3 (diff)
Partial cleanup of timing system, with some guidance from Joshua:
* Fractional frames support has been changed to use a new var, scene->r.subframe. This is a 0.0-1.0 float representing a subframe interval, used in generating a final float frame number to evaluate animation system etc. * Changed frame_to_float() and some instances of bsystem_time() into a convenience function: float BKE_curframe(scene) which retrieves the floating point current frame, after subframe and frame length corrections. * Removed blur_offs and field_offs globals. These are now stored in render, used to generate a scene->r.subframe before render database processing.
Diffstat (limited to 'source/blender/modifiers/intern/MOD_build.c')
-rw-r--r--source/blender/modifiers/intern/MOD_build.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/modifiers/intern/MOD_build.c b/source/blender/modifiers/intern/MOD_build.c
index 05ef85b818a..47693ba337e 100644
--- a/source/blender/modifiers/intern/MOD_build.c
+++ b/source/blender/modifiers/intern/MOD_build.c
@@ -41,6 +41,7 @@
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BKE_particle.h"
+#include "BKE_scene.h"
static void initData(ModifierData *md)
@@ -106,7 +107,7 @@ static DerivedMesh *applyModifier(ModifierData *md, Object *ob,
frac = bsystem_time(md->scene, ob, md->scene->r.cfra,
bmd->start - 1.0f) / bmd->length;
} else {
- frac = md->scene->r.cfra - bmd->start / bmd->length;
+ frac = BKE_curframe(md->scene) - bmd->start / bmd->length;
}
CLAMP(frac, 0.0, 1.0);