-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Maya Tool - 2D Center tool should allow relative X/Y offsets while centering #135
Comments
Ideas for ImplementationThe existing center 2D tool uses connections with a mmReprojection node. Unfortunately this approach means the user cannot change the 2D pan position - it is locked.
2 seems complicated to me. I prefer 1 because it's more flexible. My idea is to use Maya on-frame-changed callbacks and store "what needs to be centered on" in an Object Set. When the user plays the timeline, the callback is run each frame. The callback must find the Object Set and Camera, then query the world-space position on the current frame. Once we have the world-space positions, we can convert these to screen-space using the The difficulty for this approach/tool is the mapping between Object Set and Camera, and ensuring the callbacks do not slow down Maya or cause unexpected problems. Another big unanswered question is how to perform the "relative" offsets, what are we relative to? Usage StepsThis is how I think the usage steps should be:
2D Rotation and 2D Scale (future)A future improvement we could think about is stabilizing and calculating a relative 2D rotation and 2D scale. For example, we select 3 vertices on the face of a character, left ear, right ear and nose, when moving from frame to frame, the 2D rotation and 2D scale is stabilised. |
Hi David, When I looked into this feature I figured that a good simple solution this would be to add another attribute that is modifiable like an |
Hello @ktonegawa, Yes, that is the simplest implementation and it would achieve the original requirement. Using extra What do you think? As a user do you think you'd only want/need the extra David |
Hi David, For a time sake, I would assume taking first a small step of just adding those extra attributes, regardless of it being a bit of a hassle to adjust, can be done. And then maybe, from what you're describing, since I have personally never implemented mouse movement events to an action (I have seen examples of such), but I would hope that by assigning a very specific set of hotkeys, would allow for a user to mouse drag within viewport to allow for the increment/decrement of these newly created But as a user, just having that attribute that allows for any kind of offset would be beneficial for now. Do you believe what i just described would have significant performance issues...? |
Hello Kazuma, Yes, I agree you're idea is good. Sometimes I am too ambitious.
There will be no performance problems with your implementation, it is simple and effective. Have fun, and let me know if you have any questions or problems - I'm happy to help. David |
@david-cattermole has merged pull request #209 to |
Yes, @ktonegawa, exactly. I think we can consider this issue finished. It will be released in v0.3.13. |
Feature
When using the 2D centering tool the center of the viewport is locked to the transform.
It is helpful to be able to offset the center of the viewport while still keeping the centered transform's relative motion stable.
The current tool's documentation is here:
https://david-cattermole.github.io/mayaMatchMoveSolver/tools_generaltools.html#center-2d-on-selection
Expected behavior:
We would like to center on a transform node (for example a head control), and then move the center of the screen to the ear, then press the play button to see the relative offset between the current viewport center and the head control center is maintained.
Actual behavior:
Right now, we cannot offset the center of the viewport when a transform is offset.
Steps to Reproduce
Software Versions
mmSolver version: all future versions
Maya version: All supported Maya versions.
Operating System (OS): All supported operating systems.
The text was updated successfully, but these errors were encountered: