View Full Version : Channels, envelopes, and missing functions!

09-10-2003, 11:54 AM
Hi guys,
I'm getting very confused (and frustrated!) about the whole channel/envelope thing. What I'm trying to do is get my LScript to open up the Graph Editor when a button is pressed and get it to show a particular channel in the graph window.

Envelopes are great, they have an Edit() function that does exactly what I'm after. Unfortunately, unless I create the envelope myself I can't see anyway of getting at it if I'm given a Channel Object Agent (which AFAIK doesn't have the Edit() function).

So I turned to looking up the command reference in the SDK. It talks about the following commands:

Which would appear to do exactly what I want. But when I put them inside my generic LScript, the parser complains it's never heard of them!!

But get this, I tried entering them directly into the LSCommander by hand, and they seem to work fine!! So then I tried putting:

CommandInput("GE_OpenWindow 1");
and that just crashed Layout!!

So I'm feeling more than a little confused and desperate at the moment. It seems that no sooner do I find a way to do what I want, LScript turns round and kicks me in the face:)

Any help on this would be appreciated. Thanks :D


09-10-2003, 02:41 PM
Okay, somewhat sheepishly, I found that the crash I was talking about was caused by something I was doing wrong. I managed to get it working in the end by using

CommandInput("GE_OpenWindow 1");
CommandInput("GE_SetEnvID "+chan.id+" 0");

Although I had to do it from a non-modal panel, as otherwise you can't edit the envelope.

I still don't understand why LScript doesn't allow you to get hold of an envelope object agent when given a channel object agent. As I've just had a quick look at the SDK, and as far as I can tell it's not a problem.