PDA

View Full Version : Connecting LScripts to Expressions



ernpchan
10-28-2014, 01:03 PM
Per the documentation:


Expressions UDFs are stored
in the LightWave->LScripts directory within their own directory called
“expressions”. A default library of functions can be maintained within
this directory called “library.ls”. This library of functions is automatically
loaded into the Expressions engine when LightWave is initialised, and
its defined functions are consequently available to any LightWave
expression or Expressions UDFs that references them.

The "expressions" folder doesn't natively exist in ...\support\plugins\scripts\LScript so I assume I have to make it manually?


By way of example, assume the following files exist in the required
directory:
LightWave->LScripts->expressions->library.ls
LightWave->LScripts->expressions->channelValue.ls

The existing LScript folder isn't plural, so I'm hoping that doesn't matter.

I made the example library.ls and channelValue.ls files and put them in the 'expressions' folder. When I try to attach the expression clamp(channelValue(“Light.Intensity”,
Time),0.0,1.0) to the intensity envelope of my "Light" I get an unresolved function reference error that it can't find channelValue. So unclear as to what I'm doing wrong.

Also if I make a bunch of UDFs as lscripts, should I expect them to show up someplace in the Graph Editor?