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:
authorJoshua Leung <aligorith@gmail.com>2014-03-08 08:57:31 +0400
committerJoshua Leung <aligorith@gmail.com>2014-03-08 08:57:31 +0400
commit7461fead506ebac8bf730148e1ace66db116d18a (patch)
treebfeeb00fece4e1db111f5ff97f467df5a090f881 /source/blender/blenkernel/intern/fmodifier.c
parent9e881d0d5b1d4de8189036e2b14344eb2c1afde6 (diff)
Fix T39035: Cycles F-Modifier truncates end/beginning frame values for repetition
When the keyframes at either end of the source curve don't lie on exact frame boundaries, this casued problems with the Cycles F-Modifier, as part of the cycle would get chopped off. This was caused by float -> integer truncation that was occurring, since one variable was of the wrong type. The problem here wasn't discovered until now (thanks to gcc's invalid-type warnings on printf's) as in standard usage, we can safely assume that all keyframes are strictly on frame boundaries.
Diffstat (limited to 'source/blender/blenkernel/intern/fmodifier.c')
-rw-r--r--source/blender/blenkernel/intern/fmodifier.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/fmodifier.c b/source/blender/blenkernel/intern/fmodifier.c
index bcbc5571077..56b087e7eb6 100644
--- a/source/blender/blenkernel/intern/fmodifier.c
+++ b/source/blender/blenkernel/intern/fmodifier.c
@@ -605,7 +605,8 @@ static float fcm_cycles_time(FModifierStackStorage *storage, FCurve *fcu, FModif
FMod_Cycles *data = (FMod_Cycles *)fcm->data;
float prevkey[2], lastkey[2], cycyofs = 0.0f;
short side = 0, mode = 0;
- int cycles = 0, ofs = 0;
+ int cycles = 0;
+ float ofs = 0;
/* check if modifier is first in stack, otherwise disable ourself... */
/* FIXME... */