PDA

View Full Version : How to add an Expression via Lscript?



NanoGator
07-19-2004, 11:56 AM
Hi All,

I hope my question isn't too newbie ish, but I just can't figure this out. I'm trying to create an LScript-based macro that'll automatically rig a few characters for us. One of the things I'd like to do is establish expressions on a channel of an object. (Oh why oh why doesn't Lscript commander do this for me?)

Any suggestions?

#lwrs_web
07-19-2004, 01:58 PM
http://interialabs.de/lw/lscript/junk/_ExpWiz.ls

A tip:
Spaces and special characters are _EVIL_

NanoGator
07-20-2004, 10:46 AM
Beautiful! Thank you!

NanoGator
07-20-2004, 07:21 PM
I wrote my own function here to do this, thought I'd share it:




NGCreateExpression: ExpressionName, ExpressionEquation
{
qq="\""; // -- " -- Double Quote
CommandExec = ("GE_CreateExpression "+ qq + ExpressionName + qq + " " + qq + ExpressionEquation+qq); // This generates the Command for Lightwave to execute. The 'qq' variable is a double quote.
CommandInput(CommandExec); // This actually executes the completed command.
}



This, in theory, supports spaces and quite possibly special characters. However, I don't intend to run amok with either. ;)

NanoGator
07-20-2004, 07:22 PM
Oh, on second thought, I doubt this does much at all with special characters as I haven't written anything to filter them out.

But, you get the idea...