0
-- this function selects polygons assigned to mat and assigns a matid of count
-- mat is the mat to select the polys by and count is the mat id to assign to the polys
function assignMatId mat count = (
-- set the mat into meditMaterials in the second slot
meditMaterials[2] = mat
-- set the second slot to the active one
medit.SetActiveMtlSlot 2 true
-- select the polys assigned to mat
objarr = for obj in objects where obj.material == meditMaterials[medit.getActiveMtlSlot()] collect o
--assign selected polys a matid of count
--.. still writing this code
)
Это функция, которую я пытаюсь написать. Однако в настоящее время я застрял в выборе полисов, назначенных на мат. Так что мой вопрос:Выберите Polys по материалу maxscript
Как бы я выбрал выбранный материал (activeSlot в meditMaterials), выберите все полисы с этим назначенным им материалом. Может быть несколько объектов, которым назначен материал, поэтому ему нужно также выбрать другие редактируемые поли объекты.
Любые мысли о том, с чего начать?