ScriptSpot

Forum topic · General Scripting

active material in browser

By zahid hasan · 2011-02-22

Description

hello,
everybody. i was making a simple material script. it need to open the mat library browser and work with the selected material.

is there any way to get the selected mat from material browser as in activematerialslot() in matedit window? there is a materialbutton to pick material .but i cant find any other way. could you guys help? thanks

Comments (2)

shortly - no

Anubis · 2011-02-22

You can get the active slot in medit:

mtl = meditMaterials[activeMeditSlot]

but no way to do the same with mat libraries.
You can grab from there by index:

mtl = currentMaterialLibrary[1]

shortly-thanks

zahid hasan · 2011-02-23

thanks for confirming.
btw, your layer cleaner script is big time saver for me. :-)