Well, we did some more looking at this and came up with a very partial solution that was enough to meet our needs. Our needs are a bit different than is probably usual for people who want to make their own manipulators, but I thought I'd post a description of what we discovered, in case it comes in handy for someone else down the line- as far as I can tell there's really nothing on the web about this.
This part of the API is not very well documented, and some of what I'm saying is guesswork on my part, so it should be taken with a grain of salt. It's very possible that I've fundamentally misunderstood something about how this is all supposed to work. But, it does seem like the base rotateManip is just broken. The examples included with Maya don't work properly, and using the manip in the simplest way that it seems to have been intended to be used (hooking it straight up to the plugs on an object) produces incorrect behavior. In our case we only needed to get the thing working in world-space mode- I'm not sure if what we did could be modified to work correctly in object-space mode, and we've put enough time into this that I'm not going to spend more trying to figure that out. One thing we noticed is that the first drag on the manip after initialization does produce correct results, at least in that scenario. The problem seems to be that the manipulator is accumulating the rotations produced by all of the drags so far, and doing it wrong- it looks to me as if it might be as simple as having the matrix multiplication order backwards, though again I didn't spend a lot of time investigating this, since the fact that it doesn't work is really all that's relevant. Anyway, the upshot of this is that if you use a conversion call back function and get the rotation each time, store it, re-initialize the manip, and accumulate the rotations yourself then the whole thing works (including the outer yellow ring.) Yes, it's a bit hacky, but it seems to work fine. Again, this does rely on being in world-space mode- you might be able to apply this to object-space mode, but I think the re-initialization might be a little hairy. Anyway, incomplete as this is, I hope it helps someone at some point ;). Best T -- view archives: http://groups.google.com/group/python_inside_maya change your subscription settings: http://groups.google.com/group/python_inside_maya/subscribe
