Getting local position of CAT rig object ($.pos)

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
I'm a bit new to Max and Maxscript, and am more used to Maya, so I hope I get the terminology right. I have received a rig created with the CAT system, and am trying to script some functions to help in animation. Right now, I want to create a "tween" function - to create an interpolated pose between two neighbouring (stepped-tangent) keyframes.
My problem boils down, I believe, to this: with most objects (a newly created cube, for instance), calling
>> $.position in coordsys parent
gives you the local position of $. However, with CAT objects, call $.pos returns an error message:
>> Unknown property: "position" in $...
I notice, however, that I can get the world space position of CAT objects (and others) by calling
>> $.transform.position
So I can get it to work - but only in world space. My current approach is roughly like the below script, which moves an object to a position between previous and next positions. This, of course, runs into problems if the object is parented to something else - the in between position is in terms of absolute world position.
previousKeyTime = trackbar.getPreviousKeyTime() nextKeyTime = trackbar.getNextKeyTime() previousPosition = at time previousKeyTime $.transform.position nextPosition = at time nextKeyTime $.transform.position deltaPosition = (nextPosition - previousPosition ) move $ (deltaPosition * 0.5)
I must admit I am royally confused my Max's animation controller system. I've gone over the helpdocs (Node Common Properties, Operators, and Methods, Animation Controllers again and again, but still can't figure it out - CAT seems to operate by its own rules. If anyone can suggest a good resource to learn how this all works, I'd be very thankful.