do any1 know what do i have to do ?

Hi every one im new here and im a beginner in 3d studio max , so Im asking for your understanding!:) i've copy this script from this video http://vimeo.com/21174115
1frameStart = (animationRange.start as integer / ticksPerFrame)
2frameEnd = 10
3frameEnd = "D:\back up\PHOTOSHOP SC5\export_to_flash"
4fileBase = "PathFinderTest_"
5
6max select all
7 abc = selectior as array
8 clearSelection()
9for f = frameStart to frameEnd do
10(
11 sliderTime = f
12 select abc
13 maxOps.cloneNodes abc offset:[150,0,0] expandHierarchy: true cloneType:#copy actualNodeList:()
14 convertTo result SplineShape |
15 firstObj = result[1]
16 if (result.count > 1) then -- if there are multiple shapes theywill be merged into one
17 (
18 numOfltems = result.count
19 for i = 2 to numOfltems do
20 (
21 addandweld firstObj result [i] -1
22 )
23 )
24 else -- if there is a single shape it will be converted to editable spline
25 (
26 convertTo firstObj SplineShape
27
28 )
29 -- =========================== --
30 if f < 10 then -- export file name padding test
31 (
32 exportDir = fPath+fileBase+"000"+f as string +".ai"
33 resetXForm firstObj
34 convertToSplineShape firstObj
35 select firstObj
36 exportFile exportDir selectedOnly:true
37 )
38 else
39 (
40 exportDir = fPath+fileBase+"00"+f as string +".ai"
41 resetXForm firstObj
42 convertToSplineShape firstObj
43 select firstObj
44 exportFile exportDir selectedOnly:true
45 )
46 select firstObj
47 max delete
48 clearSelection()
49
50 )

but when im using it i have an error messege in listener window
0
10
"D:\back up\PHOTOSHOP SC5\export_to_flash"
"PathFinderTest_"
OK
-- Error occurred in anonymous codeblock; filename: C:\Users\xaralabakos\Documents\3dsMaxDesign\scenes\exportto_AI.ms; position: 210; line: 7
-- Unable to convert: undefined to type: Array
OK
-- Error occurred in anonymous codeblock; filename: C:\Users\xaralabakos\Documents\3dsMaxDesign\scenes\exportto_AI.ms; position: 445; line: 14
-- Syntax error: at bad, expected
-- In line: convertTo result SplineShape |
do anyone know what i have to do ? please healp !! !!

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
martinmb's picture

made a few tweeks

-------------------------------------------
-- Exports spline anim frames to illustrator files
-- by Dmitry Prushak - from http://vimeo.com/21174115
-- maybe 'newNodes:&result' was off screen in the vid
-- padding, folder and selection edits by Heb
-------------------------------------------

SetSelectFilter 3
max select all
abc = selection as array
clearSelection()

if abc[1] != undefined then (

--filepath = "D:\\System\\Desktop\\spline"
--fileName = "vimeoExportSpline_"

filepath = getSavePath caption:"Set Export Folder" initialDir:(GetDir #export)
fileName = abc[1].name + "_"

frameStart = (rendStart as integer)/TicksPerFrame
frameEnd = (rendEnd as integer)/TicksPerFrame

rn = "" -- string from range num for padding
fc = (frameEnd as string).count
for e=1 to fc do (append rn ((fc-e)as string))

-- loop through frames and export
for f = frameStart to frameEnd do (

sliderTime = f
select abc

maxOps.cloneNodes abc offset:[150,0,0] expandHierarchy:true cloneType:#copy newNodes:&result
convertTo result SplineShape

firstObj = result[1]
if (result.count > 1) then ( -- multiple shapes will be merged into one
for i = 2 to result.count do(
addandweld firstObj result[i] -1
)
)else( -- a single shape it will be converted to editable spline
convertTo firstObj SplineShape
)

-- padding
rc = rn[(f as string).count] as integer
padding = "0"
for p=1 to rc do (append padding "0")

resetXForm firstObj
convertToSplineShape firstObj
select firstObj

exportDir = filepath + "\\" + fileName + padding + (f as string) + ".ai"
exportFile exportDir selectedOnly:true

select firstObj
max delete
clearSelection()

)

sliderTime = frameStart
SetSelectFilter 1

) else(
displayTempPrompt ("Make Some Shapes!") 10000
)
--END

attached .ms as the formatting gets lost

AttachmentSize
vimeoexportspline.ms 1.73 KB
vimeoexportspline-heb.ms 2.05 KB
martinmb's picture

Was'ere some type 0's

-------------------------------------------
-- exports spline anim frames to illustrator files
-- by Dmitry Prushak - from http://vimeo.com/21174115
-- maybe 'newNodes:&result' was off screen in the vid
-------------------------------------------

frameStart = (animationRange.start as integer / ticksPerFrame)
frameEnd = 20
fpath = "D:/System/Desktop/spline/"
fileBase = "PathFinderTest_"

max select all
abc = selection as array
clearSelection()

for f = frameStart to frameEnd do (
sliderTime = f
select abc

maxOps.cloneNodes abc offset:[150,0,0] expandHierarchy:true cloneType:#copy actualNodeList:#() newNodes:&result
convertTo result SplineShape

firstObj = result[1]

if (result.count > 1) then ( -- if there are multiple shapes theywill be merged into one
numOfItems = result.count
for i = 2 to numOfItems do(
addandweld firstObj result[i] -1
)
)else( -- if there is a single shape it will be converted to editable spline
convertTo firstObj SplineShape
)

if f < 10 then ( -- export file name padding test
exportDir = fPath+fileBase+"000"+f as string +".ai"
resetXForm firstObj
convertToSplineShape firstObj
select firstObj
exportFile exportDir selectedOnly:true
)else(
exportDir = fPath+fileBase+"00"+f as string +".ai"
resetXForm firstObj
convertToSplineShape firstObj
select firstObj
exportFile exportDir selectedOnly:true
)

select firstObj
max delete
clearSelection()

)
-------------------------------------------

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.