PDA

View Full Version : Create Key script



dwburman
01-23-2011, 03:46 PM
Hi,

Using Lscript Commander, I can use


CreateKey <time>

and press the Execute button (In LScript Commander) to add keyframes to the timeline as layout is playing the scene.

I want to do this so I can tap out timing markers. I would really like to save this as an LScript and map it to a keyboard shortcut.

I selected "Convert to LScript" from the Session menu and that gives me:


@warnings

generic
{

CreateKey( ",time." );
}

When I save it as a .ls, install it, and try to run it, I get an error: "Line 6, invalid argument 1 type to CreateKey()"

I'm probably missing something simple, but I'm really not very familiar with scripting.

Thanks.

Dodgy
01-23-2011, 04:27 PM
You need to get the current time from lightwave and feed it into the CreateKey function.

@warnings

generic
{
mytime=Scene().currenttime;
CreateKey(mytime);

}

dwburman
01-25-2011, 07:27 PM
Thanks, Dodgy!