Skip to content
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-123903 reset all merge and duplicate options #2439

Merged
merged 2 commits into from
Jun 27, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 6 additions & 17 deletions lib/mayaUsd/resources/scripts/mayaUsdDuplicateAsMayaDataOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
import maya.mel as mel

from mayaUsdLibRegisterStrings import getMayaUsdLibString
from mayaUsdMergeToUSDOptions import getDefaultMergeToUSDOptionsDict
import mayaUsdOptions

from functools import partial
Expand Down Expand Up @@ -135,7 +136,7 @@ def _resetDuplicateAsMayaDataOptions(subLayout, data=None):
"""
Resets the duplicate-as-Maya-data options in the dialog.
"""
optionsText = mayaUsdOptions.convertOptionsDictToText(_getDefaultDuplicateAsMayaDataOptionsDict())
optionsText = mayaUsdOptions.convertOptionsDictToText(getDefaultDuplicateAsMayaDataOptionsDict())
_fillDuplicateAsMayaDataOptionsDialog(subLayout, optionsText, "fill")


Expand Down Expand Up @@ -179,7 +180,7 @@ def getDuplicateAsMayaDataOptionsText():
"""
return mayaUsdOptions.getOptionsText(
_getDuplicateAsMayaDataOptionsVarName(),
_getDefaultDuplicateAsMayaDataOptionsDict())
getDefaultDuplicateAsMayaDataOptionsDict())


def setDuplicateAsMayaDataOptionsText(optionsText):
Expand All @@ -191,21 +192,9 @@ def setDuplicateAsMayaDataOptionsText(optionsText):
mayaUsdOptions.setOptionsText(_getDuplicateAsMayaDataOptionsVarName(), optionsText)


def _getDefaultDuplicateAsMayaDataOptionsDict():
def getDefaultDuplicateAsMayaDataOptionsDict():
"""
Retrieves the default duplicate-as-Maya-data options.
"""
return {
"exportColorSets": "1",
"exportUVs": "1",
"exportSkels": "none",
"exportSkin": "none",
"exportBlendShapes": "0",
"exportDisplayColor": "1",
"shadingMode": "none",
"animation": "1",
"exportVisibility": "1",
"exportInstances": "1",
"mergeTransformAndShape": "1",
"stripNamespaces": "0",
}
# For now, the duplicate and merge options defaults are the same.
return getDefaultMergeToUSDOptionsDict()
19 changes: 13 additions & 6 deletions lib/mayaUsd/resources/scripts/mayaUsdMergeToUSDOptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def _resetMergeToUSDOptions(target, subLayout, data=None):
"""
Resets the merge-to-USD options in the dialog.
"""
optionsText = mayaUsdOptions.convertOptionsDictToText(_getDefaultMergeToUSDOptionsDict())
optionsText = mayaUsdOptions.convertOptionsDictToText(getDefaultMergeToUSDOptionsDict())
_fillMergeToUSDOptionsDialog(target, subLayout, optionsText, "fill")


Expand Down Expand Up @@ -249,7 +249,7 @@ def getMergeToUSDOptionsText():
"""
return mayaUsdOptions.getOptionsText(
_getMergeToUSDOptionsVarName(),
_getDefaultMergeToUSDOptionsDict())
getDefaultMergeToUSDOptionsDict())


def setMergeToUSDOptionsText(optionsText):
Expand All @@ -261,21 +261,28 @@ def setMergeToUSDOptionsText(optionsText):
mayaUsdOptions.setOptionsText(_getMergeToUSDOptionsVarName(), optionsText)


def _getDefaultMergeToUSDOptionsDict():
def getDefaultMergeToUSDOptionsDict():
"""
Retrieves the default merge-to-USD options.
"""
return {
"exportColorSets": "1",
"exportUVs": "1",
"exportSkels": "none",
"exportSkin": "none",
"exportBlendShapes": "0",
"exportDisplayColor": "1",
"shadingMode": "none",
"exportColorSets": "1",
"defaultMeshScheme": "catmullClark",
"animation": "1",
"exportVisibility": "1",
"eulerFilter": "0",
"staticSingleSample": "0",
"startTime": "0",
"endTime": "200",
"frameStride": "1",
"frameSample": "",
"shadingMode": "none",
"exportInstances": "1",
"exportVisibility": "1",
"mergeTransformAndShape": "1",
"stripNamespaces": "0",
}