C++ SDK (Possibly CatAPI) Animation Controller Access Question

C++ SDK (Possibly CatAPI) Animation Controller Access Question

Anonymous
Not applicable
769 Views
4 Replies
Message 1 of 5

C++ SDK (Possibly CatAPI) Animation Controller Access Question

Anonymous
Not applicable

I would like to access the CAT animation layer transformation/rotation key controllers the way I can using MAXSCRIPT. For example:

$.transform.controller.LayerTrans.controller.CATMotion_Layer1.controller.Rotation.controller.Z_Rotation.controller.keys[1].value = xx.xx

I've traveled down some C++ API (and CatAPI) rabbit holes but can't seem to get anywhere near what I need to expose. Doing it with script or a hybrid is not what my client wants and would not work with the rest of the plugin I'm developing. Anyone have any examples or directions that would help me achieve this?

Thanks!

 

 

0 Likes
Accepted solutions (1)
770 Views
4 Replies
Replies (4)
Message 2 of 5

denisT.MaxDoctor
Advisor
Advisor

Why do you think the CAT API is available at all? As far as I know, we only have a couple of published to MXS CAT interfaces ...

I don't really like CAT, but I'm curious to know if I missed anything about accessing CAT.

 

0 Likes
Message 3 of 5

Anonymous
Not applicable

Ok then! I guess that answers that.

So I suppose the reference in the 3ds Max Developer Help isn't supposed to be used?

thedruidpriest_0-1609296248572.png

thedruidpriest_1-1609296701768.png

 

I tend to read and follow alot... that's why I get into these quagmires from time-to-time.

 

0 Likes
Message 4 of 5

denisT.MaxDoctor
Advisor
Advisor
Accepted solution

@Anonymous wrote:

I would like to access the CAT animation layer transformation/rotation key controllers the way I can using MAXSCRIPT. For example:

$.transform.controller.LayerTrans.controller.CATMotion_Layer1.controller.Rotation.controller.Z_Rotation.controller.keys[1].value = xx.xx

CAT controllers are made as simple Animatable... so you get access to all their subAnims (including names for double-check).  To get controller you should use GetReference.

So the plan looks as (pseudo code):

tmnode > GetTMController()
LayerTrans = tm > SubAnim(0)

LayerTrans .controller = (ReferenceTarget*)LayerTrans 
CATMotion_Layer1 = LayerTrans .controller > SubAnim(0)

CATMotion_Layer1.controller = (ReferenceTarget*)CATMotion_Layer1
after that all is simple.. because it's simple PRS

 

as you can see you don't need CAT API here

if you want to be sure that you work with CAT controls, you can check sub anim names

 

0 Likes
Message 5 of 5

Anonymous
Not applicable

Thank you for that. I can see a path I haven't gone down before. Will work with this and see what happens.

0 Likes