Skip to content

Maya scene file removed after cancelling USD save during Incremental Save #4369

@jufrantz

Description

@jufrantz

Describe the bug

The current Maya scene file is deleted from disk after cancelling the USD files save during Incremental Save.

Steps to reproduce

  1. Open an existing Maya scene that contains a proxyShape created from an existing USD file.
  2. Verify the scene file exists on disk:
    fileLocation = maya.cmds.file(q=True, location=True)
    print(f"# File exists: {maya.cmds.file(fileLocation, q=True, exists=True)}")
    # File exists: True
  3. Modify a file-backed USD layer (e.g., the root layer) so the stage becomes dirty.
  4. Ensure the save dialogs will appear:
    maya.cmds.optionVar(iv=("mayaUsd_SerializedUsdEditsLocationPrompt", 1))
    maya.cmds.optionVar(iv=("mayaUsd_ConfirmExistingFileSave", 1))
  5. Trigger an incremental save via File > Increment and Save, or File > Save Scene with Incremental Save enabled.
  6. In Save USD Options, choose Save the Maya scene file and USD files and click Save.
  7. When the confirmation dialog appears, click Cancel.
  8. Verify the scene file again, it has been removed:
    fileLocation = maya.cmds.file(q=True, location=True)
    print(f"# File exists: {maya.cmds.file(fileLocation, q=True, exists=True)}")
    # File exists: False

Expected behavior

Clicking Cancel should abort the save and leave the original Maya scene file intact.

Environment

  • Rocky Linux 8.10
  • Maya 2026.2
  • Maya USD dev @ 386b4fd
  • Pixar USD v24.11

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions