Notifications
Clear all

[Closed] Get the type of an object

Hi,

I would like to get the type of an object. When my script scans a node (Object) I would like to know whether it is box or sphere or a plane…

Is there an easy way to get that information?

Gg3d

3 Replies

Use the classof function.

eg.


for obj in objects do
(
	format "%
" (classof obj)
)

But as soon as you collapse the primative to an editable mesh/poly it will no longer be recognised as a sphere, box, plane, whatever.

Thank you, it does just what I expect.

gg3d

remember that you can write classof($.baseObject) or classof$.modifiers[1]) to get the types of different levels.
You don’t always want the top type.
/Andreas