Get name from current CAT Animation Layer via MaxScript to parse it for exporting an animation

Hi there,

I try to parse the Name of my CAT Animation Layer to set the timeline and name for a fbx export to unity.

my CAT Layer name is: "0_24-Walk"
i want to set the timeline for export to the numbers and take "Walk" as part of the fbx filename.

with 'CATParent.SelectedLayer' I can get the number of the current selected CAT Animation Layer.. for example "2" if i have the second layer selected..

but I need the name of the layer to parse it..
the script help says something like:
The CAT Layer interface is an Interface: LayerInfoFPInterface
and this has a property .LayerName
I think that is what I need but I don't know how to use it..

how do I get the name of my current selected CAT Layer?
can anyone help me or did this before?

Thank you for the hints and help!

Comments

Comment viewing options

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

if anybody has the same

if anybody has the same problem:

cur_chr = the selected CATParent Object

pickedCATLayer = cur_chr.SelectedLayer;
pickedLayerName = cur_chr.layers.controller[pickedCATLayer].name;

and with filterString you can separate the layername:

exportStrings = filterString pickedLayerName "_-"

so "0-24_Walk" will be splitted in #("0","24","Walk")
and you can use this to set the export parameters.

thanks Gregor Weiß and David Shelton for mailsupport :)

Interactive, real-time, apps, games, character, animation, visualization, TV commercials, marketing and print material. Visit www.pipedream-media.com

Comment viewing options

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