-
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
Use MFnMatrixData when storing/retriving MMatrix from data block #765
Conversation
test/lib/testMayaUsdProxyAccessor.py
Outdated
def testMatrixOp_Caching(self): | ||
""" | ||
Validate that accessor works correctly with matrix ops | ||
Cached playback is disabled in this test. |
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.
Copy-paste damage in comment (cached playback is enabled in this test).
I just compiled this against latest dev branch and it looks good! After running the following code, I was able to get the UFE object to follow the locator : Example file : ` cmds.loadPlugin("mayaUsdPlugin") selUfeObject = pa.getUfeSelection() # select /pCube1 in my simple box example nodeDagPath = cmds.ls('PolyCube_custom_xformOp_matrix4d_usdShape',l=True)[0] cmds.spaceLocator() cmds.connectAttr('{}.worldMatrix[0]'.format(srcNodeDagPath), '{}.{}'.format(nodeDagPath,matrixPlug)) # Connect src to drive matrix op |
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.
Basic usability testing looks good.
Unit tests also pass here (build/test/lib) :
100% tests passed, 0 tests failed out of 79
Label Time Summary:
interactive = 35.77 secproc (3 tests)
pxrUsdMayaGL = 35.77 secproc (3 tests)
translators = 140.75 secproc (47 tests)
ufe = 56.44 secproc (20 tests)
usdPreviewSurface = 5.05 sec*proc (2 tests)
Total Test time (real) = 257.35 sec
Matrix is stored as shared data, we have to use an appropriate function interface to allocate and maintain the lifetime of matrix objects when stored in the data block.
Added regression test to validate the fix and prevent regressions. Normally it would require a test only for the converter, but data block is not something we have easy access to from python.