Results 1 to 4 of 4

Thread: Lscript Add Channel

  1. #1

    Lscript Add Channel

    Hi. I have a couple of Lscript questions that I am struggling with:


    How can I add a new channel, such as "Intensity" to an object or light? Does it have anything to do with Envelope() or AddEnvelope()?


    Is there a way to directly access an object channel by name, instead of cycling through each channel with firstChannel() and nextChannel()?


    If I add a new object with:

    AddPointLight("NewLight");

    How can I make this the "currently selected object" or "object of interest" within lscript so I can then dig into the channels? Sorry, I'm fuzzy on how to select and work with objects in lscript.


    I wish I could find these answers in the Lscript Guide or Reference! If there are any good lscript resources or tutorials with examples I would love to know about them!


    Thanks!

  2. #2
    Should take a look at the lscript master - Mike Greens springy script
    http://www.mikegreen.name/Lscripts.html

    It makes use of a custom envelope.
    http://walen.se my plugins

  3. #3
    Registered User adamredwoods's Avatar
    Join Date
    Jul 2006
    Location
    San Francisco, CA
    Posts
    2,030
    Quote Originally Posted by dev2000 View Post
    If I add a new object with:

    AddPointLight("NewLight");

    How can I make this the "currently selected object" or "object of interest" within lscript so I can then dig into the channels? Sorry, I'm fuzzy on how to select and work with objects in lscript.
    You need to issue the command "SelectItem (item.id)"
    The newest added object id is usually the first on the stack so you can use " item = Light(); ". (i think...)
    // To draw is to think and discover.

  4. #4
    Registered User adamredwoods's Avatar
    Join Date
    Jul 2006
    Location
    San Francisco, CA
    Posts
    2,030
    Quote Originally Posted by dev2000 View Post
    Hi. I have a couple of Lscript questions that I am struggling with:


    How can I add a new channel, such as "Intensity" to an object or light? Does it have anything to do with Envelope() or AddEnvelope()?
    Yes. If you want it avaiable after the script ends, make sure to use "persist(true)" method.


    Is there a way to directly access an object channel by name, instead of cycling through each channel with firstChannel() and nextChannel()?
    No.
    There may be helper lscript functions, or create your own.
    // To draw is to think and discover.

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •