PDA

View Full Version : "Objectset" for Materials?


Sowiedu
04-20-2012, 07:26 PM
Hi,

Is there any built-in set for materials? just like "objects", "lights", etc for nomral scene objects.

The reason I'm asking is, that I'm writing a script to adjust some material values and it's looping through all OBJECTS and getting their material. Now if I have a Multi/Sub-Material which is on more than one object in the scene, its ajusts the values of each submaterial so many times, cause it does that for every object in the scene which has this material.

So it would be nice to have a object set with all materials of the scene in it...


EDIT: nevermind, got it.... sceneMaterials

gazybara
04-20-2012, 11:28 PM
Maybe this can help
for m in sceneMaterials do
(
case (classof m) of (
(Multimaterial): --your code
(Standardmaterial): --your code
(Arch___Design__mi): --your code
(VRayMtl): --your code
)
)

CGTalk Moderation
04-20-2012, 11:28 PM
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.