/* get materials v n/a Author: Georgy Chakarov Version: 3dsmax 9 or later for 3dsmax 2010 or later takes the materials of selected object and copy them in sample slots my site: http://georgychakarov.hit.bg/ */ /****************************************************************************************************************************/ /* FUNCTIONS /****************************************************************************************************************************/ macroScript GetMaterials category:"Georgy Chakarov" buttontext:"get material/s" tooltip:"get materials in sample slots" icon:#("gch_icons",6) ( if ($ as string) != "$selection" then ( if superclassof $ as string == "shape" or superclassof $ as string == "GeometryClass" then ( meditmaterials[1] = $.material ) ) else ( j = 1 for i = 1 to $.count do ( if superclassof selection[i] as string == "shape" or superclassof selection[i] as string == "GeometryClass" then ( we_have_that = 0 if j > 24 then ( messagebox "more then 24 sorry" exit ) for k = 1 to j do ( if selection[i].material as string == meditmaterials[k] as string then ( we_have_that = 1 --messagebox "we have" ) ) if we_have_that == 0 then ( meditmaterials[j] = selection[i].material j = j + 1 ) ) ) ) )