Selecting Node + Children in Script
I am having problems understanding some (seemingly) simple MAXScript techniques. I'm still fairly new to MAXScript.
If I type into the listener:
select $/...*
The node and all of its children are selected. However, inside my scripts, I am selecting not with the $.
This works to select the object:
select myStruct.target
But the following is NOT working and is causing the script to fail to run at all:
select myStruct.target/...*
I'm obviously missing something.
I tried the following but it simply selects everything in the scene:
select myStruct.target
select $/...*
Thanks in advance for all input.
Comments
each rule has exception
Yes, you are fully right to avoid execute(), i run from it as from plague, but each rule has exception. You can wrote recursive funcion to collect the hierarchy calling children array, but it will works more slow in complex hierarchy than execute.
my recent MAXScripts RSS (archive here)
Thank you... that is the same
Thank you Anubis... that is the same solution Steve Curley gave over in the Autodesk Area MAXScript forums. It surprised me since I have always learned to avoid using the execute() equivalent in other languages. I expected there to be a better solution...
Thanks, though.
_______________________
Shawn Olson
Developer of Wall Worm
Pathname Literals not work
Pathname Literals not work with ref. vars, i.e.
(hope this help)
my recent MAXScripts RSS (archive here)