[Closed] how to put library material to scene material
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?
thanks,
oviam
Maybe take a look at MaterialStuffer?
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…
thanks,
oviam
try this http://plugins.angstraum.at/materialreplacer/
i also had this probelm…
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
(
try
(
if ( testObjectMat.material.name == TestLibMat.name ) then
testObjectMat.material=TestLinMat
)
catch()
)
)
[size=2]good Luck[/size]
[size=2][/size]
[size=2]Keith Morrison[/size]
[size=2]focus360.com
[/size]
thanks guys ,i added some conditional also like checking the material whether it’s been assigned to the objects and all …
oviam