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

fixes for testProxyShapeSelectionPerformance when run with the VP2 render delegate #828

Conversation

mattyjams
Copy link
Contributor

These changes get the testProxyShapeSelectionPerformance test passing when run with the Viewport 2.0 render delegate. The test can be run in that configuration by setting VP2_RENDER_DELEGATE_PROXY=1 here:

There are three main issues addressed here:

  • By default the VP2 render delegate will only select prims, so we use the UsdSelectionKind optionVar set to assembly to pick assets at a coarser granularity. Since the CubeGrid..._10.usd files are binary, the changes to them aren't directly visible here, but the only update was to set kind=assembly on the root prim in each of those files.
  • Even with selecting by kind=assembly, we still end up selecting a UFE item representing a root USD prim with the VP2 render delegate. To make the behavior consistent with the non-VP2 render delegate case, we just cleave off the root prim and proxy shape segments of the item's path, leaving the proxy's transform node name at the end which is what gets selected in the Pixar batch renderer configuration.
  • The output images were being rendered without selection highlighting when the VP2 render delegate was enabled, so this change also turns on the UI object filter in the hardwareRenderingGlobals.

… USD assets

We'll be setting the USD selection kind optionVar to "assembly" when we run the
testProxyShapeSelectionPerformance, so this kind needs to be set on the root
prims for them to be selected.
…ectionPerformance

When using the Pixar batch renderer, we select entire USD "assets" by clicking
on them in the viewport. We mimic this behavior with the Viewport 2.0 render
delegate by setting kind=assembly on the root-level prims and using that same
kind to set the "UsdSelectionKind" optionVar.
When the Viewport 2.0 render delegate is being used, we will have selected USD
prims rather than proxy shape nodes or their transform nodes, so in that case
we query UFE for the selection and manipulate the paths of the selected scene
items to yield the Maya-side selection.
…ShapeSelectionPerformance

This ensures that the rendered image includes selection highlighting when using
the Viewport 2.0 render delegate.
@kxl-adsk kxl-adsk added the unit test Related to unit tests (both python or c++) label Oct 13, 2020
@kxl-adsk kxl-adsk added the ready-for-merge Development process is finished, PR is ready for merge label Oct 14, 2020
@kxl-adsk kxl-adsk merged commit c863fd0 into Autodesk:dev Oct 14, 2020
@mattyjams mattyjams deleted the pr/fixes_for_testProxyShapeSelectionPerformance_with_VP2_render_delegate branch October 14, 2020 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 unit test Related to unit tests (both python or c++)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants