displaced
08-01-2007, 01:30 PM
Hi ive got this script which works its why through multisubs. but it has a slight problem when a multisub doesnt have sequential IDs i.e. if the numbers run 1,3,4,6,7,8,10 as the missing ID's are coming back undefined, then it spits an error out because undeffined doesnt have numsubs.
fn getSubAnims theParent = (
for i = 1 to theParent.numsubs do ( --for each sub-anim
append theMats theParent[i] --add to the array and then call recursively
try(getSubAnims theParent[i].object)catch(getSubAnims theParent[i])
)--end i loop
)--end fn
i have tried putting this into the code above
if theParent == "undefined"then print "error"else
but doesnt seem to stop it.
any ideas ?
fn getSubAnims theParent = (
for i = 1 to theParent.numsubs do ( --for each sub-anim
append theMats theParent[i] --add to the array and then call recursively
try(getSubAnims theParent[i].object)catch(getSubAnims theParent[i])
)--end i loop
)--end fn
i have tried putting this into the code above
if theParent == "undefined"then print "error"else
but doesnt seem to stop it.
any ideas ?
