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-127119 - Save USD root file relative to scene file #2854

Merged
merged 1 commit into from
Jan 30, 2023
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
3 changes: 2 additions & 1 deletion plugin/adsk/scripts/mayaUSDRegisterStrings.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,5 @@ def mayaUSDRegisterStrings():
register("kDiscardStageEditsReloadMsg", "Are you sure you want to reload ^1s as the stage source?\n\nAll edits on your layers (except the session layer) in ^2s will be discarded.")
register("kLoadUSDFile", "Load USD File")
register("kFileOptions", "File Options")
register("kMakePathRelativeToSceneFile", "Make Path Relative to Scene File Directory")
register("kMakePathRelativeToSceneFile", "Make Path Relative to Scene File")
register("kMakePathRelativeToSceneFileAnn", "If enabled, path will be relative to your Maya scene file. If this option is disabled, there is no Maya scene file and the path will be absolute. Save your Maya scene file to disk to make this option available.")
3 changes: 2 additions & 1 deletion plugin/adsk/scripts/mayaUsd_USDRootFileRelative.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,13 @@ def uiCreate(cls, parentLayout):

kFileOptionsStr = getMayaUsdString("kFileOptions")
kMakePathRelativeStr = getMayaUsdString("kMakePathRelativeToSceneFile")
kMakePathRelativeAnnStr = getMayaUsdString("kMakePathRelativeToSceneFileAnn")

optBoxMarginWidth = mel.eval('global int $gOptionBoxTemplateDescriptionMarginWidth; $gOptionBoxTemplateDescriptionMarginWidth += 0')
cmds.setParent(topForm)
cmds.frameLayout(label=kFileOptionsStr, collapsable=False)
widgetColumn = cmds.columnLayout()
cmds.checkBox(cls.kMakePathRelativeCheckBox, label=kMakePathRelativeStr)
cmds.checkBox(cls.kMakePathRelativeCheckBox, label=kMakePathRelativeStr, ann=kMakePathRelativeAnnStr)

@classmethod
def uiInit(cls, parentLayout, filterType):
Expand Down