Custom context while not having to reimplement manipulators from the ground up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am working on a custom context that has a mode similar to the face/vertex selection, if the user hovers the mouse over the shape it will highlight specific groups of faces (depending on where the mouse is on the shape), the issue is that once those faces are selected, I'd like to use the maya built-in manipulators (or reimplement my own) to interact with those faces.
Here is my thought process so far:
- If I'd like to use the built-in ones such as the translate manipulator:
As soon as I enter another maya manipulator, maya will exit my custom context and I'll lose my custom hover view. (Makes sense as the translate manip is another context)
-If I use MFnFreePointTriadManip in conjunction with MPxManipContainer
I can't use MPxToolCommand to get a delta from the mouse events, doPress and doRelease and invoke a move command that works relative to each object affected by the manipulator. So I can't use if for multiple objects (among other limiations)
This is due to MPxSelectionContext mouse events not firing up when a manipulator is being used and MPxManipContainer doPress and doRelease don't get passed any M3dView object.
Only solution I can think of so far:
I am assuming the only way would be to implement the move manipulator from the ground up by using a MPxManipulatorNode but it feels like a lot of work when I just need to extend the drawing functionality while using the vanilla manipulators.
- Is there another way to draw to the viewport from the API that lets me interact with the built-in manipulators?
- Did I miss something on my research?
Some crazy ideas without success:
I was thinking I could somehow use MPxSelectionContext::addManipulator to add a vanilla manipulator but I haven't found a way to do that dirty trick.
As a side note, I've been having to use MPxContext::doPtrMoved since MPxSelectionContext::doPtrMoved won't get called but I haven't found any difference from using MPxContext