So i’m trying to figure out a pipeline problem, and I want to know if I’m over-thinking it or going down the wrong path entirely.
We have a bunch of animation max files that have multiple anims in each file. stuff like loops and multiple layered animations. This creates a problem when i do a batch export in that my exporter is a pretty ‘dumb’ process. it just opens the file and exports nodes based on a modifier.
What i want to do is attach info for each animation set into the file. for example, if i had a looping animation with an intro (0f-7f) a loop (8f-24f) and outro (25f-30f) I would want to attach 3 data sets. When my batch exporter opens this file, it would search for this data, and export an animation for each set found.
I’ve found a way to store the data inside a Custom Attribute. I’ve actually found out that you can add a custom attribute to another CA, nesting them inside one another, which is great, as now i can have access to it all like so:
$Rig.AnimPropsCA.AnimSet01.fileName
$Rig.AnimPropsCA.AnimSet01.filePath
$Rig.AnimPropsCA.AnimSet02.fileName
$Rig.AnimPropsCA.AnimSet03.FileName
etc...
the only problem I can see with this is that in order to loop through them I would have to build the above code as a string then execute it to get access to the nested CAs, instead of being able to loop like so:
local setCount = $rig.AnimProps.NumOfDataSets
for i = 1 to setCount do
(
local fileName = $rig.animProps[i].fName
local filePath = $rig.animProps[i].fPath
local animRange = $rig.animProps[i].AnimRange1
animationRange = interval animrange
export (filePath + FileName) #noPrompt
)
does anyone know if there a way to do that? and if so, how?
thanks!
-ian