-
Notifications
You must be signed in to change notification settings - Fork 202
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
Test pixelMove UFE support. #2412
Conversation
@@ -298,6 +298,16 @@ def mayaMajorMinorVersions(): | |||
""" | |||
return (mayaMajorVersion(), mayaMinorVersion()) | |||
|
|||
def ufeSupportFixLevel(): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Return the newly-implemented UFE fix level, to determine if the UFE pixelMove support is present in Maya or not. fixLevel is implemented in Maya, in the ufeSupport.utils module. If the fixLevel function does not exist, returns 0.
|
||
import ufe | ||
|
||
@unittest.skipUnless(mayaUtils.ufeSupportFixLevel() > 0, "Requires pixelMove UFE support.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UFE support for pixelMove is implemented at fix level 1, so don't run if fix level is below that.
cmds.file(new=True, force=True) | ||
cmds.select(clear=True) | ||
|
||
def testPixelMove(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Test UFE pixelMove support by comparing with a Maya object. Move for Maya object and move for non-Maya object (i.e. USD) must match.
@@ -43,6 +43,7 @@ if(CMAKE_UFE_V2_FEATURES_AVAILABLE) | |||
) | |||
|
|||
list(APPEND INTERACTIVE_TEST_SCRIPT_FILES | |||
testPixelMoveCmd.py |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pixelMove requires a view and a camera, so must be an interactive test.
Only failure is master OSX Python 3 only, with clang compiler crash while compiling mayaShaderTranslation.cpp, appears to be a random failure. |
'''Pixel move command must move non-Maya UFE objects.''' | ||
|
||
# pixelMove has different behavior for orthographic and perspective | ||
# views. Only perspective views are affected by the selected objects' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also test doing pixel move while looking through an ortho camera?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ortho camera pixel move is unaffected by the selection, and therefore did not require UFE-related changes. Testing pixel move with ortho camera is essentially testing Maya behavior, which plugins should simply rely on and expect (hope?) is tested in Maya.
This change tests the new UFE support in the pixelMove command. This addresses
#2234