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

EMSUSD-1657 light linking undo and redo #4067

Merged
merged 1 commit into from
Jan 10, 2025

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Added methods on the Host class to create the data used by the UI.
  • Host create USD collection and string list by default.
  • Use the Host to create the data in the UI classes.
  • UsdCollectionData uses Host to create its string lists.
  • Make the expression widget update itself on USD data changed notification even when there is no expression attribute.
  • Rename the light linking custom control to be collection custom control.
  • Move the Maya host class to its own file.
  • Implement Maya-specific collection data with all needed setters.
  • Add a _UsdUndoBlockContext class to capture all USD changes into undo items and later transfer them to a Maya command.
  • Add a _UsdUndoBlockCommand that transfer the captured undo items into itself for future undo and redo.
  • Add a _UndoItemHolder class to hold the undo items to be transferred between the Python undo context and the Maya command.
  • Add multiple command sub-classes so that the undo UI shows a nice and comprehensible undo name.

In theory, we could have just used the existing UsdUndoBlock and that was in the initial prototype, but this makes all entries in the undo UI all be "UsdUndoBlock" which is incomprehensible for the user and does not state what would be undone or redone. Using one command per action allows the user to know what is in the undo stack.

@pierrebai-adsk pierrebai-adsk self-assigned this Jan 9, 2025
@pierrebai-adsk pierrebai-adsk changed the title EMSUSD-1657 Adding Maya collection data EMSUSD-1657 light linking undo and redo Jan 9, 2025
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-1657/light-linking-undo-per-cmd branch from ba1c110 to 1a976f0 Compare January 9, 2025 17:56
@pierrebai-adsk pierrebai-adsk requested a review from barbalt January 9, 2025 17:57
@barbalt barbalt requested a review from haberlu January 9, 2025 19:25
@pierrebai-adsk
Copy link
Collaborator Author

Note: the renamed files are purely Maya-only code, not shared code.

- Added methods on the Host class to create the data used by the UI.
- Host create USD collection and string list by default.
- Use the Host to create the data in the UI classes.
- UsdCollectionData uses Host to create its string lists.
- Make the expression widget update itself on USD data changed
  notification even when there is no expression attribute.
- Rename the light linking custom control to be collection custom
  control.
- Move the Maya host class to its own file.
- Implement Maya-specific collection data with all needed setters.
- Add a _UsdUndoBlockContext class to capture all USD changes into
  undo items and later transfer them to a Maya command.
- Add a _UsdUndoBlockCommand that tarnsfer the captured undo items
  into itself for future undo and redo.
- Add a _UndoItemHolder class to hold the undo items to be transferred
  between the Python undo context and the Maya command.
- Add multiple command sub-classes so that the undo UI shows a nice and
  comprehensible undo name.

In theory, we could have just used the existing UsdUndoBlock and that
was in the initial prototype, but this makes all entries in the undo UI
all be "UsdUndoBlock" which is incomprehensible for the user and does
not state what would be undone or redone. Using one command per action
allows the user to know what is in the undo stack.
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-1657/light-linking-undo-per-cmd branch from 1a976f0 to 931f4da Compare January 10, 2025 13:48
@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jan 10, 2025
@seando-adsk seando-adsk added adsk Related to Autodesk plugin shared_components Shared Components (Max / Maya) labels Jan 10, 2025
@seando-adsk seando-adsk merged commit 1e26e8b into dev Jan 10, 2025
11 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-1657/light-linking-undo-per-cmd branch January 10, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin 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.

3 participants