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-65 use wait cursor for payload commands #3513

Merged
merged 2 commits into from
Dec 14, 2023

Conversation

pierrebai-adsk
Copy link
Collaborator

  • Add a USD UFE long-duration command to wrap other commands that may take a long time to run.
  • Add two DCC-specific functions to start and stop the wait cursor.
  • Add start/stop helper functions.
  • Add a wait cursor class to automatically start and top the wait cursor.
  • Wrap the load and unload payload commands in a long-duration command.
  • Adjust existing commands that used a wait cursor to use the global helper class instead.

@pierrebai-adsk pierrebai-adsk added adsk Related to Autodesk plugin enhancement New feature or request labels Dec 12, 2023
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-65/load-payload-wait-cursor branch from 5e5ebd4 to 7ec51b6 Compare December 12, 2023 15:31
@pierrebai-adsk pierrebai-adsk force-pushed the bailp/EMSUSD-65/load-payload-wait-cursor branch from 7ec51b6 to 4fcef83 Compare December 12, 2023 16:36
- Add a USD UFE long-duration command to wrap other commands that may take a long time to run.
- Add two DCC-specific functions to start and stop the wait cursor.
- Add start/stop helper functions.
- Add a wait cursor class to automatically start and top the wait cursor.
- Wrap the load and unload payload commands in a long-duration command.
- Adjust existing commands that used a wait cursor to use the global helper class instead.
@@ -107,6 +108,10 @@ MCallbackId gExitingCbId = 0;
// Subject singleton for observation of all USD stages.
MayaUsd::ufe::MayaStagesSubject::RefPtr g_StagesSubject;

void mayaStartWaitCursor() { MGlobal::executeCommand("waitCursor -state 1"); }
Copy link
Collaborator

@AramAzhari-adsk AramAzhari-adsk Dec 13, 2023

Choose a reason for hiding this comment

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

This seems like something that should be in usdUfe/Utils and not Global, as this isn't manipulating or using anything Ufe and I think it is going to be useful for the rest of MayaUsd.

Copy link
Collaborator Author

@pierrebai-adsk pierrebai-adsk Dec 13, 2023

Choose a reason for hiding this comment

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

Other code can use the usdUfe API, not this implementation. Particularly since the code in usdUfe manages the recursivity count and provide a utility WaitCursor class.

Copy link
Collaborator

Choose a reason for hiding this comment

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

mayaUsd has access to usdUfe but probably not the other way around.

I also noticed that you've removed the struct in MayaUsdContextOps.

Copy link
Collaborator

@seando-adsk seando-adsk Dec 13, 2023

Choose a reason for hiding this comment

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

This particular code cannot be in UsdUfe since it uses Maya. UsdUfe does not (and cannot) depend on Maya. The way that Pierre wrapped it behind dccFunctions is the correct thing to do.

@pierrebai-adsk pierrebai-adsk changed the title EMSUSD-65 use wait cursor for pyload commands EMSUSD-65 use wait cursor for payload commands Dec 13, 2023
@pierrebai-adsk
Copy link
Collaborator Author

Only PF failure is a singel test on a single platform due to a USDC file remaining in the tmp folder.

@pierrebai-adsk pierrebai-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Dec 13, 2023
@seando-adsk seando-adsk merged commit c16e588 into dev Dec 14, 2023
10 of 11 checks passed
@seando-adsk seando-adsk deleted the bailp/EMSUSD-65/load-payload-wait-cursor branch December 14, 2023 19:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
adsk Related to Autodesk plugin enhancement New feature or request ready-for-merge Development process is finished, PR is ready for merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants