View Full Version : how to put library material to scene material
07-08-2004, 09:05 PM
i am trying to put all the library materials to scene materials( like what "put material to scene" button in "material editor" does) but i am not able to find the function for that...
for example i have the material name called "mymat01" in the library,the same material exist in the scene,i have to replace that material to library material..
instead of clicking "put material to scene" button what function makes the same?
07-08-2004, 09:51 PM
Maybe take a look at MaterialStuffer?
07-09-2004, 10:03 AM
yeah EricChadwick i have already checked that script but it has only an option to replace material from library to scene selection (not scene material)
for that i need to select the objects to replace the material which is not working properly with my script, i want to directly put it in to scene material like what "put material to scene" button does... so is there any other way to do this? pls help me out...
07-10-2004, 05:48 PM
try this http://plugins.angstraum.at/materialreplacer/
i also had this probelm...
07-12-2004, 09:48 PM
You have to go to each scene object and test it to see if it gets a new material... a nested loop is the slowest, but easiest method to do this... provided your scene is a reasonable size this should work fine
for testObjectMat in objects do -- loop through all scene objects
for TestLibMat in CurrentMaterialLibrary do -- test each object against each Material in Mat Lib
if ( testObjectMat.material.name == TestLibMat.name ) then
07-14-2004, 04:55 PM
thanks guys ,i added some conditional also like checking the material whether it's been assigned to the objects and all ....
01-18-2006, 05:00 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.
vBulletin v3.0.5, Copyright ©2000-2015, Jelsoft Enterprises Ltd.