CAT-Toggle Setup AnimationMode [maxscript]

I could not find how to Enable/Disable Setup Animation mode toggle using max script.

Is this the solution:

<CATParent>.CATMode Integer default: 0 – integer

I select CatParent and use:

$.CATMode 1

and result is:
– Type error: Call needs function or class, got: 0

any help please?


It’s a property (not a method or function) so probably

$.CATMode = 1

would do it.

-Johan

Thanks Johan
I used that. it returns 1(or 0) but in the panel it will not change CAT mode. :?:

Edit:
It actually changes, but we can see results when we switch off and then come back to motion panel.
thanks again :slight_smile:

The hack I use to go around this issue is switching the “LayerEnabled” off and on again (or the opposite) through scripting.


catRig = $ctrl_cat – this is your cat control
catRig.catmode = 0 – 0 or 1

curLayerState = catRig.layers.controller[1].controller.LayerEnabled
catRig.layers.controller[1].controller.LayerEnabled = not curLayerState
catRig.layers.controller[1].controller.LayerEnabled = curLayerState


I hope it works for you.

Cheers,
Seigi

Very good! this way you suggested works even for those cases that motion do not play as it should :slight_smile:
thank you very much Seigi.