Updating scene materials from library
hello everybody
I need a script which updates my scene materials from a library as pre-render script.
I do not knowing anything about scripting, so you pro's are my last chance. :)
your help is much appreciated and would save me a lot time. I have about 40 scenes to update.
thanks for your effort.
best regards
themaxxer
Comments
THANK YOU VERY MUCH
THANK YOU VERY MUCH anubis!!!
you've saved me a lot of time.
great, I love scripting, but I can't do anything myself. :)
have a nice time, guys, and thanks.
best regards
themaxxer
Update Scene Materials
I think i see what you need. The bad news is that no bulit-in function for quick updating scene mat's. The good news is that i have something for you:
http://project3d.narod.ru/mxs/UpdateSceneMaterials.rar
A time ago i wrote a quick fix for Max 2011 issue with Compact Material Editor where Put Material To Scene was disabled. Soon after that SP1 was out and this was fixed, but the script is still useful for automation.
It's a macro script and put all mat's form the current mat-lib to the scene OR if you hold Shift key while invoke the macros will put only the Active ME material to the scene.
If you still prefer to update your mat's using pre-render script, try this (*note - not tested):
my recent MAXScripts RSS (archive here)
haha 4 lines of code :D omg,
haha 4 lines of code :D omg, is this yoda talking to me?
Never get low & slow & out of ideas
:)
haha, nice :)
my recent MAXScripts RSS (archive here)
thanks br0t it's a great
thanks br0t
it's a great script, but I ask myself if there's no easier way to load and update the materials.
something like: loadmateriallibrary "X:\\Dummy\\Custom Maps\\dummy.mat"
and then the command for updating?
I don't know how, but I have the idea! :)
I am working with max 2010 and the update scene materials works as excepted.
thanks for helping.
bets regards
themaxxer
Hey, I think I may help you.
Hey,
I think I may help you. Ive run into a similar problem in a project and wrote a script to handle it. Its called "sceneMats_IO" and you find it on my website. You need to have one max file ("master scene" if you want so) containing all your objects with correct materials applied. The script can save those material into a library file, as well as a text file containing object-material relations.
If you then have your other 40 max files, and the objects do have the same names as in your master file (important!), you can just hit the "import" button and the materials will be updated. It is not written as a pre-render script but may be helpful anyway, even if you have to use it 40 times.
This is all based on simply comparing object names and applying materials from the library based on that. So if you have 100 objects that are all called "Box" you will run into problems (the script will not fail, but some objects will not be textured), all objects should have a unique name.
Cheers
Never get low & slow & out of ideas