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 Tools Search this Thread Display Modes
  07 July 2004
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?

  07 July 2004
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...

  07 July 2004
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 ( == ) then


good Luck

Keith Morrison
  07 July 2004
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 ....

  01 January 2006
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
Society of Digital Artists

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

All times are GMT. The time now is 06:33 PM.

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