Select object by name

In scene present $box01, in maxscript I have string a="box01" .
Can I select object $box01 in scene use string like
"select a as object" ????

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
gyhser's picture

Big Thanks

This is just what I needed for a script I'm working on that handles UDK Collision, thank you! And yes

b1 = getNodeByName "Box001"
select b1

is certainly the fastest way to do it.

Cheers!

Anubis's picture

If your variable "a" refer to

If your variable "a" refer to the object itself:

a = $Box01
select a

But if "a" is just the name as string then:

a = "Box01"
select (getNodeByName a)

And there no "as object" conversion ;)

my recent MAXScripts RSS (archive here)

barigazy's picture

Yes. Just use getNodeByName

Yes. Just use getNodeByName function

b1 = getNodeByName "Box001"

bga

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.