Skip to content

EMSUSD-4036 Implement refresh locked layers - #4702

Merged
seando-adsk merged 3 commits into
devfrom
barbalt/dev/EMSUSD-4036-dt-refresh-lock-layer
Aug 21, 2026
Merged

EMSUSD-4036 Implement refresh locked layers#4702
seando-adsk merged 3 commits into
devfrom
barbalt/dev/EMSUSD-4036-dt-refresh-lock-layer

Conversation

@barbalt

@barbalt barbalt commented Aug 17, 2026

Copy link
Copy Markdown
Collaborator

Refresh the debug tools view to show proper locked layers when they are done from the layer editor in maya usd.

@barbalt
barbalt requested a lite review from Copilot August 17, 2026 20:31
@barbalt barbalt self-assigned this Aug 17, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Implements a new MayaUsd notice for layer lock state transitions and wires it into the USD Composition Editor host so the UI can refresh when layers are locked/unlocked without requiring authored USD changes.

Changes:

  • Added UsdMayaLayerLockChangedNotice (payload: the affected SdfLayer) and instantiated its TfType.
  • Emitted the new notice from MayaUsd::lockLayer() only on actual lock-state transitions.
  • Registered a TfNotice listener in the Composition Editor host to emit the UI refresh signal, with explicit revocation on plugin finalize to avoid unload callbacks.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
lib/usd/ui/debugTools/CompositionEditorCmd.cpp Adds a TfNotice listener on the Composition Editor host to refresh UI on layer lock changes, and revokes it during finalize.
lib/mayaUsd/utils/layerLocking.cpp Detects real lock-state transitions and sends a layer-lock-changed notice when the registry-derived state changes.
lib/mayaUsd/listeners/notice.h Declares UsdMayaLayerLockChangedNotice carrying the affected SdfLayerRefPtr.
lib/mayaUsd/listeners/notice.cpp Instantiates TfType and implements the new notice’s constructor/accessor.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +108 to +112
// Derive the lock state of a layer from the lock registries.
LayerLockType currentLockType(const PXR_NS::SdfLayerRefPtr& layer)
{
if (isLayerSystemLocked(layer)) {
return LayerLock_SystemLocked;
@barbalt barbalt assigned barbalt and unassigned barbalt Aug 17, 2026
@barbalt
barbalt requested a review from pierrebai-adsk August 18, 2026 13:43
};

/// Notice sent when the lock state of a layer changed during a Maya session.
class UsdMayaLayerLockChangedNotice : public TfNotice

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you look if USD already sends a notice? I suppose it does not.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I searched for it, but couldn't find it

@barbalt barbalt added the ready-for-merge Development process is finished, PR is ready for merge label Aug 19, 2026
@seando-adsk seando-adsk added the shared_components Shared Components (Max / Maya) label Aug 21, 2026
@seando-adsk
seando-adsk merged commit 2b49d25 into dev Aug 21, 2026
13 checks passed
@seando-adsk
seando-adsk deleted the barbalt/dev/EMSUSD-4036-dt-refresh-lock-layer branch August 21, 2026 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ready-for-merge Development process is finished, PR is ready for merge shared_components Shared Components (Max / Maya)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants