PDA

View Full Version : create key at frame set by var



t4d
04-27-2004, 07:59 AM
I want to create a script that creates a key for all selected objects at the frame set in a text input

I've tried

c4 = ctlstring("Current Frame",var3);
/
var3 = getvalue(c4);
/
CreateKey(var3);

it doesn't like the var3 it needs a number .. i think
I worked out Lightwave time is frame divided by 30.000003 but how can i get this info into the Create key command ?
so it can be changed to what ever keyframe your at ?

pretty much what the standard key framer we have now
love to see the code in ls format ?


The idea for the plugin is if your at frame 59 You select all the object you want

then the plugin goes into negitive frames ( say frame -20 ) where the pose for the objects/bones are stored and then creates keyframes where you just were ( frame 59 ) and then goes back to frame 59

Thanks for any help ;)

#lwrs_web
04-27-2004, 03:39 PM
divide frame by Scene().fps

t4d
04-27-2004, 07:33 PM
so is it something like this

c4 = ctlstring("Current Frame",var3);
/
var3 = getvalue(c4);
/
var4 = var3 / Scene().fps

CreateKey(var4);

try it soon ... :)