Autodesk / Autodesk/maya-usd

SessionLayer hijacks xform edits from active layer

Open
#4,353 1 comment 0 reactions 1 assignee Claimed by @santosg87 View on GitHub
bug
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

**Describe the bug**
When connecting Maya controller transform to drive a USD prim using MayaUSD, edits made to the Prim
are written to the USD SessionLayer, even though the "Assembly Layer" is set as the active edit target.
This results in unexpected authoring of data in the SessionLayer.

**Steps to reproduce**
See attached [attachment.zip](https://github.com/user-attachments/files/22958158/attachment.zip) which reproduces the issue. Or step by step:
1. Load the MayaUSD plugin
2. Open a USD file with a layer and prims (attached `assembly.usd`).
3. Create a Maya controller (e.g., a locator) and connect its transform attributes to a USD prim.
4. Explicitly set the Assembly Layer as the active edit target in both Maya and USD.
5. Move the controller in Maya.
6. Bug: **The SessionLayer will have xformOp edits, even due it's not the active edit layer**.

**Expected behavior**
Edits to the controller's transforms should be written to the active-edit layer (Assembly Layer).

**Attachments**
- Reproduction script (this file)
- USD file used in the script: assembly.usda

**Specs:**
- OS & version: Linux-5.14.0-570.25.1.el9_6.x86_64-x86_64-with-glibc2.34
- Maya version: Autodesk MAYA 2025.3.0-7.0.PFIX
- mayaUsd plugin version: 0.30.0 & 0.33.0
- mayaUsd build date: Thu 07/03/2025, 202507030550
- mayaUsd CutIdentifier: 202507022244_1cbb7f7
- mayaUsd gitCommit: 1cbb7f786e5cdccef07234176a89a9f97004cca9
- mayaUsd Build Numner: 154

**Impact**
This bug can lead to confusion and potential data loss, as edits are not authored in the intended layer.
It disrupts expected USD authoring workflows in Maya.

**Workaround/Attempts**
- Using [Edit Routing documentation](https://github.com/Autodesk/maya-usd/blob/e5811448ce8564a8a49eea46176b261a1f3adb48/doc/EditRouting.md) did not work either (`mayaUsd.lib.registerEditRouter('attributes', routeToAssemblyLayer)`)

None known at this time.

**Extra Context::**
- I cannot reproduce this issue in `mayapy`, so it might be a clue worth exploring.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.