View Full Version : Scripting composite material

02 February 2004, 08:08 PM

I'm trying to write a script that will collect the composite materials in the scene. However, I'm pretty new to maxscript and I'm stuck here: how do you tell the script to test if the material is a composite or another?

Here's the little code I have so far:

array_test = for a in sceneMaterials where (a == materialcomposite) collect a

Obviously the a == materialcomposite part doesn't work, because an empy collection is returned.


02 February 2004, 09:38 PM
All righty, I found the answer by looking at other scripts:

array_test = for a in sceneMaterials where (classof a == compositematerial) collect a

Thanks anyway!

CGTalk Moderation
01 January 2006, 09:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.