-
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
MAYA-121625: cache to USD: take out 'Parent Scope' from options #2122
MAYA-121625: cache to USD: take out 'Parent Scope' from options #2122
Conversation
* Used patter for sub-option to remove the Parent Scope field from the Cache To Usd.
@@ -181,7 +184,7 @@ def fileOptionsTabPage(tabLayout): | |||
# USD file option controls will be parented under this layout. | |||
# resultCallback not called on "post", is therefore an empty string. | |||
fileOptionsScroll = cmds.columnLayout('fileOptionsScroll') | |||
mel.eval('mayaUsdTranslatorExport("fileOptionsScroll", "post=all;!animation-data", "' + getCacheExportOptions() + '", "")') | |||
mel.eval('mayaUsdTranslatorExport("fileOptionsScroll", "post={exportOpts}", "{cacheOpts}", "")'.format(exportOpts=kTranslatorExportOptions, cacheOpts=getCacheExportOptions())) |
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.
Used constant so we have same string for both post and query.
@@ -34,6 +34,9 @@ | |||
# Cache options in string format, for MEL mayaUsdTranslatorExport() consumption. | |||
_cacheExportOptions = None | |||
|
|||
# The options string that we pass to mayaUsdTranslatorExport. | |||
kTranslatorExportOptions = 'all;!output-parentscope;!animation-data' |
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.
Created constant for this string (used in 2 places) and added new string "output-parentscope"
@@ -241,7 +244,7 @@ def cacheCommitUi(parent, selectedFile): | |||
|
|||
# The following call will set _cacheExportOptions. Initial settings not | |||
# accessed on "query", is therefore an empty string. | |||
mel.eval('mayaUsdTranslatorExport("fileOptionsScroll", "query", "", "mayaUsdCacheMayaReference_setCacheOptions")') | |||
mel.eval('mayaUsdTranslatorExport("fileOptionsScroll", "query={exportOpts}", "", "mayaUsdCacheMayaReference_setCacheOptions")'.format(exportOpts=kTranslatorExportOptions)) |
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.
Need the same option string for the query so you don't get back those options (like parent scope).
register("kExportParentScopeAnn", "Name of the USD scope that is the parent of the exported data."); | ||
register("kExportParentScopeLbl", "Create USD Parent Scope:"); | ||
register("kExportParentScopePht", "USD Prim Name"); |
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.
Fixed typo in name
if (stringArrayContains("output-parentscope", $sectionNames)) { | ||
separator -style "none"; | ||
|
||
textFieldGrp -l `getMayaUsdString("kExportParentScopLbl")` -placeholderText `getMayaUsdString("kExportParentScopPht")` | ||
-annotation `getMayaUsdString("kExportParentScopAnn")` parentScopeField; | ||
textFieldGrp -l `getMayaUsdString("kExportParentScopeLbl")` -placeholderText `getMayaUsdString("kExportParentScopePht")` | ||
-annotation `getMayaUsdString("kExportParentScopeAnn")` parentScopeField; | ||
} |
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.
Added ability to not add this parent scope field.
MAYA-121625: cache to USD: take out 'Parent Scope' from options