PDA

View Full Version : Material Editor Reset button


slice
10-29-2004, 10:19 AM
Has anyone ever come across a way of resetting all the editor slots in the material editor back to a default? currently i have to copy a default across to all the editor slots,

Iain McFadzen
10-29-2004, 11:09 AM
There's a Blur script kicking around somewhere that does this, though there may well be others too. It worked in Max5, was a little buggy (though still usable) in Max6, but I've no idea whether or not it works in 7. It was called ClearMedit or some such.

Rens
10-29-2004, 11:56 AM
Or you could just execute the following script:

for idx = 1 to meditMaterials.count do
(
setMeditMaterial idx (standardMaterial())
if idx > 9 then
(
meditMaterials[idx].name = idx as string+" - Default"
)
else
(
meditMaterials[idx].name = "0"+idx as string+" - Default"
)
)

It works here on max 6. Maybe there's a better solution, but this is what I could come up with just now. :)

- R

Buddski
10-29-2004, 01:55 PM
or try this from squid over at www.3d-palace.com (http://www.3d-palace.com)
code:

for m = 1 to 24 do
(
meditmaterials[m] = standard()
)

turn it into a button and you'll wander how you ever lived without it!

you can check the thread here:
http://www.3d-palace.com/forums/viewtopic.php?t=3492&postdays=0&postorder=asc&start=0

Buddski
10-29-2004, 01:56 PM
...I forgot to mention it works with max 7 as well!:bounce:

Rens
10-29-2004, 02:35 PM
or try this from squid over at www.3d-palace.com (http://www.3d-palace.com)
code:

for m = 1 to 24 do
(
meditmaterials[m] = standard()
)

turn it into a button and you'll wander how you ever lived without it!

you can check the thread here:
http://www.3d-palace.com/forums/viewtopic.php?t=3492&postdays=0&postorder=asc&start=0 Actually, my script does the same but also renames the materials to their default names. When you only use standard() all the materials will be named "StandardMaterial".

Anyway, here is the macroscript. Just save it in the max scripts dir, restart, and the script should be there in the category "Material Editor".

macroscript ResetME category:"Material Editor"
tooltip:"Reset material editor"
(
for idx = 1 to meditMaterials.count do
(
setMeditMaterial idx (standardMaterial())
if idx > 9 then
(
meditMaterials[idx].name = idx as string+" - Default"
)
else
(
meditMaterials[idx].name = "0"+idx as string+" - Default"
)
)
)

- R

slice
11-01-2004, 05:07 AM
thanks guys. will test these out!

CGTalk Moderation
01-19-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.