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

[al] ProxyShape: add pauseUpdate attr to pause evaluation #1511

Merged
merged 1 commit into from
Jul 28, 2021

Conversation

nxkb
Copy link
Contributor

@nxkb nxkb commented Jun 17, 2021

Adds an attribute to the proxy shape to delay any costly updates to the maya viewport representation. This allows users or tools to make a series of usd edits efficiently and only pay once for the final result of all the changes.

We use this internally to pause evaluation as our users select variants from the available options and then only display the end result once the stage is fully configured. ( As a result, for now, this PR only pauses updates due to variant switches...)

Would like to make it pause updates due to other usd changes (not too hard) as well as changes in file path or prim path, too, but that is trickier. We'd be curious to know if Autodesk may have other methods for pausing evaluation that we can tap into to solve this problem. Otherwise, please consider the way we've approached it and how we might get this merged in for others.

Example Workflow that this enables:

1.) Open a scene with a shot stage in a proxy shape
2.) Open a pipeline specific tool and point it at the proxy shapes stage
3.) set "pauseUpdates" = True
4.) Change top level variants on a prim (which might reveals nested variants options, sub assets, new prim metadata, etc). This can be very slow if the stage is still pushing updates to the viewport or maya nodes.
5.) Use new info in your pipeline specific tool to continue making variant selections.
6.) close tool, set "pauseUpdates" = False, and allow maya + viewport to catch up and make a SINGLE sparse update to the FINAL state of the Stage.

@kxl-adsk kxl-adsk requested a review from fabal June 21, 2021 19:44
@kxl-adsk kxl-adsk added the al Related to AnimalLogic plugin label Jun 21, 2021
@kxl-adsk
Copy link

Given this change is only modifying AL proxy, I will rely on a review from @fabal and PF.

@kxl-adsk
Copy link

I missed your last comment where you indicate that you would like to apply this approach to others (proxy shapes). The base proxy shape doesn't have the same features as AL and we are not heading in the direction of having to synchronize Maya's data model with USD. It would be beneficial to profile the same workflows with the Adsk plugin and confirm the bottlenecks.

@nxkb nxkb changed the title [al] ProxyShape: add pauseUpdate attr to pause evaluation [al + adsk] ProxyShape: add pauseUpdate attr to pause evaluation Jun 21, 2021
Copy link
Contributor

@fabal fabal left a comment

Choose a reason for hiding this comment

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

Thanks @nxkb , it looks good to me. If you can just provide the missing method's definition so I can approve.

for now, only pauses updates due to variant switches...
would like to make it pause updates due to changes in file path or
prim path, too, but that is trickier
@nxkb nxkb force-pushed the pr/al/pauseUpdates branch from 4787c62 to 4d7d256 Compare July 21, 2021 22:24
@nxkb nxkb changed the title [al + adsk] ProxyShape: add pauseUpdate attr to pause evaluation [al] ProxyShape: add pauseUpdate attr to pause evaluation Jul 21, 2021
@nxkb
Copy link
Contributor Author

nxkb commented Jul 21, 2021

as discussed we'll just support this behavior for al proxy for now.

Copy link
Contributor

@fabal fabal left a comment

Choose a reason for hiding this comment

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

Thanks @nxkb 👍

@kxl-adsk kxl-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Jul 27, 2021
@kxl-adsk kxl-adsk merged commit 288ecfb into Autodesk:dev Jul 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
al Related to AnimalLogic plugin 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.

5 participants