How check material object

Hi

The question is very simple:

How do I understand the material applied to an object?

I have a box with any type material (standard, Mentalray etc.) in viewport. Now I want analyze the box and find what type of material is applied. How to do this?
I have not found anything on MaxScript help...

Thanks in advance

Comments

Comment viewing options

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

If the result is Undefined,

If the result is Undefined, maybe the object has not material or is unselected.

my recent MAXScripts RSS (archive here)

Michele71's picture

Yes Anubis: With

Yes Anubis:

With $Box01.material I have type of material and number of slot :)
With ClassOf $Box01.material only type of material.

A big Thanks Anubis!!

P.S. Before writing this post for help, I tried "$.material" but the result is "Undefined"...Why???

Anubis's picture

Is this - "$Box01.material"

Is this - "$Box01.material" or maybe this - "ClassOf $Box01.material" ?

my recent MAXScripts RSS (archive here)

Comment viewing options

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