-
Notifications
You must be signed in to change notification settings - Fork 202
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
Conversation
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
TfTokenVector requiredPrimvars; | ||
if (!_GetMaterialPrimvars(renderIndex, GetMaterialId(), requiredPrimvars)) { | ||
requiredPrimvars = sFallbackShaderPrimvars; | ||
} |
There was a problem hiding this comment.
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.
TfTokenVector requiredPrimvars; | ||
if (!_GetMaterialPrimvars(renderIndex, GetMaterialId(), requiredPrimvars)) { | ||
requiredPrimvars = sFallbackShaderPrimvars; | ||
} else { | ||
requiredPrimvars.push_back(HdTokens->widths); |
There was a problem hiding this comment.
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.
TfTokenVector requiredPrimvars; | ||
if (!_GetMaterialPrimvars(renderIndex, materialId, requiredPrimvars)) { | ||
requiredPrimvars = sFallbackShaderPrimvars; | ||
} |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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
if (!layerEnabled.asBool()) { | ||
continue; | ||
} |
There was a problem hiding this comment.
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); |
There was a problem hiding this comment.
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