This script is useful only for script writers.
This is just simple function to get selected materials / textures / controllers from active view in SME.
Function returns materials :) - not names of materials.
function SMEGetSelMats = (
viewNode = sme.GetView (sme.activeView)
smeSelMats = #()
for n = 1 to trackViewNodes[#sme][(sme.activeView)].numSubs do (
m = trackViewNodes[#sme][(sme.activeView)][n].reference
b = viewNode.GetNodeByRef m
if b.selected do append smeSelMats m
)
return smeSelMats
)
-- do something here
print (SMEGetSelMats())
I've got message - it doesn't work with 2012. If anybody has 2012, please test and let me know
Enjoy
Pixamoon
3dwannab · 2016-09-29
lightcube · 2015-09-03