Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk 3ds® Max® / MaxScript / Determine Material Type of Objects
  RSS 2.0 ATOM  

Determine Material Type of Objects
Rate this thread
 
37606
 
Permlink of this thread  
avatar
  • IonDave
  • Posted: 09 December 2009 01:15 PM
  • Location: Lacey, WA
  • Total Posts: 40
  • Joined: 17 March 2009 07:43 PM

How can I determine if an object has a Multi/Sub-Object material applied to it?



~Dave

http://www.max-realms.com - 3ds Max models, tutorials and forums

Max3-2010

Replies: 0
avatar
  • Anubis
  • Posted: 09 December 2009 02:11 PM

classOf obj.material


Max 9 through 2009, XP-Pro x64 SP2
ASUS EAH3450 Series (Driver 8.470).
Core 2 Duo E8400 3GHz, 4Gb Ram, DX9.0c.

Replies: 0
avatar
  • IonDave
  • Posted: 09 December 2009 06:34 PM

Thanks, works great.

Here’s the code if anyone else needs it in a small utility:

rollout testMaterial "Test Material" width:268 height:138
(
 button btn1 
"Test Material" pos:[54,42] width:157 height:42
 on btn1 pressed  
do
(
 
for obj in selection do

  
MessageBox ((classof obj.material) as string)
 )
)
createDialog testMaterial


~Dave

http://www.max-realms.com - 3ds Max models, tutorials and forums

Max3-2010

Replies: 0