-
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
Initial cache to USD test. #2081
Conversation
@@ -9,6 +9,13 @@ list(APPEND scripts_src | |||
mayaUsdMayaReferenceUtils.py | |||
) | |||
|
|||
list(APPEND maya_lib_scripts_src |
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.
USD cache creation options moved out of UI code to separate Python module, under mayaUsd.lib
# Animation is always on for cache to USD. | ||
return turnOnAnimation(cmds.translator('USD Export', query=True, do=True)) | ||
|
||
def getCacheCreationOptions(exportOptions, cacheFile, cachePrimName, |
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.
Utilities to centralize cache option creation in Python.
variantName = None | ||
variantSetName = None | ||
|
||
userArgs = cacheToUsd.getCacheCreationOptions( |
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.
Use new utility functions.
@@ -58,19 +57,6 @@ def setUp(self): | |||
self.proxyShapePathStr = mayaUsd_createStageWithNewLayer.createStageWithNewLayer() | |||
self.stage = mayaUsd.lib.GetPrim(self.proxyShapePathStr).GetStage() | |||
|
|||
@staticmethod |
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.
Factored out to mayaUtils.py for re-use.
@@ -239,6 +239,23 @@ def createProxyFromFile(filePath): | |||
|
|||
return shapeNode,shapeStage | |||
|
|||
def createSingleSphereMayaScene(directory=None): |
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.
Moved here and adapted from testAddMayaReference.py
fixturesUtils.readOnlySetUpClass(__file__, loadPlugin=False) | ||
if not cls.pluginsLoaded: | ||
cls.pluginsLoaded = mayaUtils.isMayaUsdPluginLoaded() | ||
fixturesUtils.setUpClass(__file__) |
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.
No need to create a Maya file in a temporary directory, using the fixture utils sets up a temporary directory for the test, and clears it out before running. Just use setUpClass() instead of readOnlySetUpClass(). Also (have seen this in a few places) why pass in loadPlugin=False to the fixturesUtils, then load the plugin separately? Just use the fixturesUtils service.
@@ -67,6 +67,18 @@ def createUfeSceneItem(dagPath, sdfPath=None): | |||
ufeItem = ufe.Hierarchy.createItem(ufePath) | |||
return ufeItem | |||
|
|||
def createItem(ufePathOrPathString): |
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.
Utilities to simplify UFE scene item and hierarchy interface creation. Should have done this a while ago... Should be deployed to other tests as we maintain them.
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.
Given that I never remember the incantations, it will help me!
Build failure is on a single configuration, which simply did not start: |
Cache to USD unit test. Only testing sibling prim with payload for now. No discard edits test yet.