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-129538 move commands out of context op implementation #3179

Merged
merged 6 commits into from
Jul 4, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

Move the commands that implement the menu items in their own file as reusable UFE commands.

  • Fix undo of add reference and payload that were adding a delete to the prim lists instead of reverting the addition.
  • Wrap all move commands in Python
  • Add unit test for all commands that were moved into their own file.
  • Chang all commands to use UsdUndoableItem and UsdUndoBlock to ensure perfect undo.

Move the commands that implement the menu items in their own file as reusable
UFE commands.

- Fix undo of add reference and payload that were adding a delete to the prim
  lists instead of reverting the addition.
- Wrap all move commands in Python
- Add unit test for all commands that were moved into their own file.
- Chang all commands to use UsdUndoableItem and UsdUndoBlock to ensure perfect
  undo.
Base automatically changed from bailp/MAYA-129538/clear-payload to dev June 22, 2023 15:09
Copy link
Collaborator

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

Overall great work. This will make moving ContextOps to UsdUfe easier. Just a few minor changes requested.

lib/mayaUsd/python/wrapCommands.cpp Outdated Show resolved Hide resolved
lib/mayaUsd/ufe/UsdUndoPayloadCommand.h Outdated Show resolved Hide resolved
lib/mayaUsd/ufe/UsdUndoPayloadCommand.h Outdated Show resolved Hide resolved
lib/usdUfe/python/wrapCommands.cpp Outdated Show resolved Hide resolved
lib/usdUfe/ufe/UsdUndoSelectAfterCommand.h Show resolved Hide resolved
lib/usdUfe/ufe/UsdUndoAddNewPrimCommand.h Show resolved Hide resolved
test/lib/ufe/testReferenceCommands.py Outdated Show resolved Hide resolved
Comment on lines 202 to 203
//! \brief Create a working Material and select it:
class InsertChildAndSelectCommand : public Ufe::CompositeUndoableCommand
Copy link
Collaborator

Choose a reason for hiding this comment

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

Any reason this command wasn't moved to a separate file?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It seemed a very specific combination of two commands for the context menu. I could move it.

Copy link
Collaborator

Choose a reason for hiding this comment

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

The explanation makes sense. If its not reusable then leave it in ContextOps

- Fix copyright years,
- Fix header inclusion guards to not use pragma once.
- Move implementation of a function to its own file.
- Put the common text filtering test helper in the usdUtils file.
- Modify tests to use the common function.
@pierrebai-adsk pierrebai-adsk added adsk Related to Autodesk plugin ufe Related to UFE component in Maya ufe-usd Related to UFE-USD plugin in Maya-Usd labels Jun 26, 2023
@pierrebai-adsk pierrebai-adsk dismissed seando-adsk’s stale review June 26, 2023 13:31

Sean is in vacation and I addressed all his comments

In UFE v2, the insert-child command is declared in the hiearchy.h header.
@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jun 28, 2023
Copy link
Collaborator

@seando-adsk seando-adsk left a comment

Choose a reason for hiding this comment

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

Great thanks.

@seando-adsk seando-adsk removed adsk Related to Autodesk plugin ufe Related to UFE component in Maya labels Jul 4, 2023
@seando-adsk seando-adsk merged commit 7d37846 into dev Jul 4, 2023
@seando-adsk seando-adsk deleted the bailp/MAYA-129538/move-context-commands-to-usdufe branch July 4, 2023 15:40
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 ufe-usd Related to UFE-USD plugin in Maya-Usd
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants