Держи
-- ===============================================
-- Раставл ет кадры сиквенции по Faces обьекта
-- ===============================================
--
-- 1. Rename val - fNameSeq to sequence file
-- 2. Select Oject
-- 3. Run
fNameSeq = "c:\\Maps\\Birds_.jpg" -- Path & Name sequence: Bird_0001.jpg
-- =======================================================================
fNameSeqPath = getFilenamePath fNameSeq + getFilenameFile fNameSeq
fNameSeqType = getFilenameType fNameSeq
p = convertToPoly($selection[1])
num_faces = p.GetNumFaces()
mm = Multimaterial numsubs:num_faces
for i = 1 to num_faces do (
p.EditablePoly.SetSelection #Face #{i}
p.EditablePoly.setMaterialIndex (i) 1
mm.mapEnabled
= on
mm.materialIDList = i
mm.names = ""
fIndex = (i as string)
fIndex = substring "000" (fIndex.count) -1 + fIndex
texName = fNameSeqPath + fIndex + fNameSeqType
format "%\t%\t%\n" "texName" texName (doesFileExist texName)
if doesFileExist texName then
mm = Standard Name"Frame #" + (i as string)) diffuseMapBitmaptexture fileName:texName) faceMap:true showInViewport:true
)
p.material = mm
-- =====================================================
-- Denis (c) 2003
-- =====================================================