ScriptSpot home

Forum topic · General Scripting

Select object by name

By andrej · 2013-01-26

Description

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 (3)
gyhser

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!

Panayot Karabakalov

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 ;)

Branko Živković

Yes. Just use getNodeByName function

b1 = getNodeByName "Box001"