PDA

View Full Version : Select Children


BloodQuest
01-27-2006, 11:53 AM
I'm trying to fix the selectchildren.ls script so that it will select the children of all selected objects, though I'm not having much luck.

For one thing there's this:

(curItem) = curScene.getSelect();

Why is curItem in brackets? Looking at the docs, the format ought to be without. Obviously, I'm missing something ... brains, perhaps?

Also can't figure out why this

for(blah...)
{
if((itemType = hierarchyList[y].genus) == BONE)
AddToSelection(hierarchyList[y].id);
}

doesn't work properly - only child bones of the last of the selected objects is left selected after it runs through the loop.

I'd be glad of any suggestions!

Simon

Dodgy
01-27-2006, 12:59 PM
I have no idea why the first bit is in brackets.

As for the other part, try picking two bones in two different objects in layout. It can't be done unfortunately...

GregMalick
01-27-2006, 02:38 PM
The first part shouldn't have to be in "parentheses".
() is used when a functions returns more than one value...

i.e.

(x,y)=returnTwoValues();
It's extraneous to use it when only one value is returned, :D

Dodgy is right about the bone thing.
Try using the Scene Editor and you'll see it.
The selection should work for other types of children though.

BloodQuest
02-07-2006, 08:28 AM
Thanks (belatedly) for the help!

Does anyone know if LScript is being revamped for LW9?

Simon

Dodgy
02-07-2006, 10:00 AM
The SDK is being heavily rewritten I think, but whether that'll carry over to lscript....