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-108814 Support viewport display filtering for meshes and basisCurves #1008

Conversation

huidong-chen
Copy link

  • If polygons are excluded from display, USD meshes will be filtered out.
  • If NURBS curves are excluded from display, USD curves will be filtered out.
  • If plugin shapes are excluded from display, all USD objects will be filtered out.

…rves

* If polygons are excluded from display, USD meshes will be filtered out.
* If NURBS curves are excluded from display, USD curves will be filtered out.
* If plugin shapes are excluded from display, all USD objects will be filtered out.
@huidong-chen huidong-chen added pending beta This issue or PR will be testable in next beta release do-not-merge-yet Development is not finished, PR not ready for merge labels Dec 16, 2020
@huidong-chen
Copy link
Author

@kxl-adsk I talked with Will again whether we need the "fine-grain" override control and we feel that it is safer not to do it the way you suggested.

The reason is that we don't have any doc about the viewport object-type filters as its behavior is quite intuitive, I assume users would expect all plug-in render items to be excluded from viewport when user chooses to exclude plug-in shapes. If we changed it to a "fine-grain" override control then we would introduce a slightly more complex logic that we had to document and made it clear.

Note the behavior is an internal implementation detail so we can change it if required by users without modifying the API, therfore we can wait for a strong requirement before changing the logic.

@huidong-chen
Copy link
Author

I need to run PF after Maya version including new API is blessed.

@huidong-chen huidong-chen removed the do-not-merge-yet Development is not finished, PR not ready for merge label Jan 7, 2021
@kxl-adsk kxl-adsk merged commit f65baa8 into dev Jan 21, 2021
@kxl-adsk kxl-adsk deleted the chenh/MAYA-108814/support-viewport-display-filtering-for-meshes-and-curves branch January 21, 2021 16:55
@@ -1666,6 +1667,10 @@ MHWRender::MRenderItem* HdVP2BasisCurves::_CreateWireRenderItem(const MString& n
renderItem->setShader(_delegate->Get3dSolidShader(kOpaqueGray));
renderItem->setSelectionMask(MSelectionMask::kSelectCurves);

#if MAYA_API_VERSION >= 20210000
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey all, is it possible that we might need to use a higher API version number here? We're continuing to build against PR 121 at the moment while we get our licenses sorted out for the newly released PR 122, but compilation against PR 121 seems to be failing with setObjectTypeExclusionFlag() not being found.

Choose a reason for hiding this comment

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

For beta releases, we only support the last release, i.e. PR122.

mattyjams added a commit to mattyjams/maya-usd that referenced this pull request Feb 3, 2021
…ExclusionFlag()

Maya PR 121 reports its API version as 20210000 while PR 122 reports its API
version as 20220000. The newly added MRenderItem::setObjectTypeExclusionFlag()
function whose use was added in pull request Autodesk#1008 is only available in PR 122,
not in PR 121. This means that compilation against PR 121 fails because the
API version check guarding the function's usage is incorrect.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pending beta This issue or PR will be testable in next beta release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants