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-125149 - When "Enable Overrides" is unchecked for a Display Layer USD Data still uses Bounding Box #2611

Merged
merged 3 commits into from
Sep 20, 2022

Conversation

vlasovi
Copy link
Collaborator

@vlasovi vlasovi commented Sep 19, 2022

  • properly handle display layer's attribute "enable"
  • fixing an issue with bound box dimensions when a display layer is switched to bound box mode in multi-viewport
  • fixing an issue with visibility when a display layer is switched into invisible state while in multi-viewport
  • fixing an issue with enabling all required material primvars from both networks: full and untextured

- fixing an issue with bound box dimensions when a display layer is switched to bound box mode in multi-viewport
- fixing an issue with visibility when a display layer is switched into invisible state while in multi-viewport
- fixing an issue with enabling all required material primvars from both networks: full and untextured
Comment on lines +450 to +453
TfTokenVector requiredPrimvars;
if (!_GetMaterialPrimvars(renderIndex, GetMaterialId(), requiredPrimvars)) {
requiredPrimvars = sFallbackShaderPrimvars;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since primvars (and their vertex buffers) are shared among all representations, we need to include here all required primvars from all available material networks, which is done inside _GetMaterialPrimvars method.

Comment on lines +146 to +150
TfTokenVector requiredPrimvars;
if (!_GetMaterialPrimvars(renderIndex, GetMaterialId(), requiredPrimvars)) {
requiredPrimvars = sFallbackShaderPrimvars;
} else {
requiredPrimvars.push_back(HdTokens->widths);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since primvars (and their vertex buffers) are shared among all representations, we need to include here all required primvars from all available material networks, which is done inside _GetMaterialPrimvars method.

Comment on lines +885 to +888
TfTokenVector requiredPrimvars;
if (!_GetMaterialPrimvars(renderIndex, materialId, requiredPrimvars)) {
requiredPrimvars = sFallbackShaderPrimvars;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Since primvars (and their vertex buffers) are shared among all representations, we need to include here all required primvars from all available material networks, which is done inside _GetMaterialPrimvars method.


// Invisible rprims don't get calls to Sync or _PropagateDirtyBits while
// they are invisible. This means that when a prim goes from visible to
// invisible that we must update every repr, because if we switch reprs while
// invisible we'll get no chance to update!
if (!usdVisibility)
if (!sharedData.visible)
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This fixes an issue with visibility when a display layer is switched into invisible state while in multi-viewport

Comment on lines +727 to +729
if (!layerEnabled.asBool()) {
continue;
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Properly handle display layer's attribute "enable"

@@ -177,21 +177,20 @@ void MayaUsdRPrim::_UpdateTransform(
}

// Local-to-world transformation
MMatrix& worldMatrix = drawItemData._worldMatrix;
sharedData.bounds.GetMatrix().Get(worldMatrix.matrix);
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Moving this call inside if-statements fixes an issue with bound box dimensions when a display layer is switched to bound box mode in multi-viewport

@vlasovi vlasovi added the ready-for-merge Development process is finished, PR is ready for merge label Sep 20, 2022
@seando-adsk seando-adsk added the vp2renderdelegate Related to VP2RenderDelegate label Sep 20, 2022
@seando-adsk seando-adsk merged commit 71f4a1d into dev Sep 20, 2022
@seando-adsk seando-adsk deleted the vlasovi/MAYA-125149 branch September 20, 2022 13:02
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 vp2renderdelegate Related to VP2RenderDelegate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants