Results 1 to 3 of 3

Thread: Add child null to item

  1. #1
    Super Member nickdigital's Avatar
    Join Date
    Nov 2006
    Location
    Burbank, California USA
    Posts
    4,576

    Add child null to item

    I'm having a brain freeze. Why isn't this working?

    Code:
    selectedItem = Scene().getSelect();
    AddNull("Null");
    ParentItem(selectedItem);
    My opinions and comments do not represent those of my employer.
    Profile piece
    2010 Reel
    'The X's' Reel

  2. #2
    Code Muppet evenflcw's Avatar
    Join Date
    Feb 2003
    Location
    Stockholm, Sweden
    Posts
    2,642
    Because getSelect() returns an array (multiple values), but ParentItem() expects a single value.

    So use firstSelect() instead, or subscript selectedItem[1], or selectedItem[selectedItem.count()] depending on what you want.

    (I'm never sure about the order of LWs arrays, ie which is first and last selected item; Probably first in array is last selected, in somewhat typical LW backward fashion. lastSelect() would have made more sense to implement than firstSelect() imho.)
    Last edited by evenflcw; 11-02-2011 at 06:32 PM.

  3. #3
    Super Member nickdigital's Avatar
    Join Date
    Nov 2006
    Location
    Burbank, California USA
    Posts
    4,576
    Ah thx!
    My opinions and comments do not represent those of my employer.
    Profile piece
    2010 Reel
    'The X's' Reel

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
  •