how to put library material to scene material

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Search this Thread Display Modes
Old 07 July 2004   #1
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
 
Old 07 July 2004   #2
Maybe take a look at MaterialStuffer?

http://www.neilblevins.com/blurscripts/blurscripts.htm
 
Old 07 July 2004   #3
Unhappy how to put library material to scene material?

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
 
Old 07 July 2004   #4
try this http://plugins.angstraum.at/materialreplacer/


i also had this probelm...
 
Old 07 July 2004   #5
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()
)
)


good Luck

Keith Morrison
focus360.com
 
Old 07 July 2004   #6
Thumbs up library materials to scene materials

thanks guys ,i added some conditional also like checking the material whether it's been assigned to the objects and all ....

oviam
 
Old 01 January 2006   #7
Thread automatically closed

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.
__________________
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 07:20 PM.


Powered by vBulletin
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.