From be7192c0bd161a3b4a3ef28eca60fcc12730d986 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Fri, 7 Dec 2007 10:50:02 +0000 Subject: == NLA - Scale Related Fixes == * Old files now get initialised with the correct scale. The wrong calculation was being used * Added a new tool to Alt-S menu: "Apply Scale" This tool causes all the keyframes in the active strip to be moved to their NLA-scaled times, the scale to be set to 1.0, and the frame ranges recalculated accordingly (to remove any nasty weird errors) * Scale field now draws red when the action-range is < 1, and the tooltip in this case instructs the user how to fix this (by using "Apply Scale"). --- source/blender/blenloader/intern/readfile.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'source/blender/blenloader/intern') diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index f6b0c4cb4dc..68bf1d1815c 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -7211,8 +7211,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main) if (length == 0.0f) length= 1.0f; actlength = strip->actend-strip->actstart; - // right calculation? - strip->scale = actlength / (length * repeat); + strip->scale = length / (repeat * actlength); if (strip->scale == 0.0f) strip->scale= 1.0f; } } -- cgit v1.2.3