PDA

View Full Version : Channel Filter script differs from architecture



Katherine001
09-10-2009, 03:15 PM
I cut the channel filter script from the Lscript Reference manual and attempted to run it in Layout. (It's from page 180.) The error message I got was "script type channel differs from architecture." What's going on here?

My ultimate goal is to write a script which alters channels in Morph mixer.

Thanks for your help.

walfridson
09-10-2009, 03:37 PM
Post it here.
Also, check out the lscripts that comes with lightwave. In Lscript editor.exe you have templates for each script type.

Katherine001
09-10-2009, 07:49 PM
@warnings
@script channel
@version 2.0
create: channel
{
light = Light();
c = light.firstChannel();
while(c)
{
last if c.name == "Position.X";
c = light.nextChannel();
}
// keep abreast of changes in this channel...
c.event("lightEvent");
}
process: ca, frame, time
{
ca.set(0.0);
}
lightEvent: channel,
// Channel Object Agent event
// event code
{
// something happened to Light's
//"Position.X" channel
info(event);
}

Castius
09-10-2009, 11:05 PM
Looks like "event" was missing from line 20
lightEvent: channel,



@warnings
@script channel
@version 2.0
create: channel
{
light = Light();
c = light.firstChannel();
while(c)
{
last if c.name == "Position.X";
c = light.nextChannel();
}
// keep abreast of changes in this channel...
c.event("lightEvent");
}
process: ca, frame, time
{
ca.set(0.0);
}
lightEvent: channel, event
// Channel Object Agent event
// event code
{
// something happened to Light's
//"Position.X" channel
info(event);
}

hruffin3
09-11-2009, 10:06 AM
thats the same thing that happened to me! thankyou - so cool to look and see it wasn't just me scratching my head - there is more problems elsewhere - but i couldn't figure this one out alone ....

Katherine001
09-11-2009, 10:10 AM
Thanks for you help.
I still get that error "script type 'channel' differs from architecture" in line 5.

Castius
09-11-2009, 10:29 AM
What version of LW are you running?

Katherine001
09-14-2009, 11:45 AM
9.3.1(Win64)

Katherine001
09-14-2009, 12:03 PM
And 9.6 (Win 64). Same problem.

hruffin3
09-15-2009, 09:53 AM
got it!!!! the channel filter script DOES NOT match the architecture because it does fit the architecture for a channel modifier! so you gotta run the script from inside the graph editors modifiers tab - evidently when you go to run it from the utilities tab of the main interface it bombs - but i think it does get loaded into the Graph Editors channel modifiers - then you have to select the channel in the channel bin to apply it to and then the script runs without crashing !!!! same with Custom Objects scripts- you go to Object properties Custom tab and run the lscript loading script ( its there in the drop down list) which lets you browse to a script to load for that object .... this will work for you - i kicked it around again and the script had loaded itself three times but i thought it was crashing ... GOT IT????

Castius
09-15-2009, 11:41 AM
Ahh i see.
If you add a Lscript through the add plugin command. It will only show up in the area that it will work.