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

[mtoh] Fix stage-repopulation. #650

Merged
merged 1 commit into from
Jul 25, 2020

Conversation

marsupial
Copy link
Contributor

When rendering via mtoh, changes to UsdProxy.filepath aren't working.
(If not always, at least when VP_RENDER_DELEGATE=0)

@kxl-adsk kxl-adsk added the mtoh Related to legacy Maya to Hydra plugin. label Jul 13, 2020
@kxl-adsk
Copy link

Similar problem we were solving in VP2RenderDelegate - see condition https://github.com/Autodesk/maya-usd/blob/dev/lib/mayaUsd/render/vp2RenderDelegate/proxyRenderDelegate.cpp#L421 and implementation details for ProxyRenderDelegate::ProxyShapeData::IsUsdStageUpToDate() and ProxyRenderDelegate::ProxyShapeData::IsExcludePrimsUpToDate()

I will ask @williamkrick to review this change and point out opportunities for aligning the two render paths on the same mechanism to detect when stage on proxy shape changed.

@kxl-adsk kxl-adsk requested a review from williamkrick July 14, 2020 12:51
@williamkrick
Copy link
Contributor

Similar problem we were solving in VP2RenderDelegate - see condition https://github.com/Autodesk/maya-usd/blob/dev/lib/mayaUsd/render/vp2RenderDelegate/proxyRenderDelegate.cpp#L421 and implementation details for ProxyRenderDelegate::ProxyShapeData::IsUsdStageUpToDate() and ProxyRenderDelegate::ProxyShapeData::IsExcludePrimsUpToDate()

I will ask @williamkrick to review this change and point out opportunities for aligning the two render paths on the same mechanism to detect when stage on proxy shape changed.

My approach in Vp2RenderDelegate is to hold all the data we use from the ProxyShape on a class (ProxyShapeData) and do all the version tracking there. ProxyShapeData could be refactored into ProxyShapeBase or a similar common area and re-used by mtoh. ProxyShapeData can directly compare cached values to the current ProxyShapeBase data to detect changes in simple types, or compare versionIDs to detect changes in complex types.

Right now y'all have a callback registered TfNotice::Register(me, &HdMayaProxyAdapter::_OnStageSet); so so know exactly when the proxy is changing. I'm not sure where that system comes from, we don't use that in Vp2RenderDelegate.

@@ -61,18 +61,11 @@ void HdMayaProxyAdapter::Populate() {
TF_DEBUG(HDMAYA_AL_POPULATE)
.Msg("HdMayaProxyDelegate::Populating %s\n", _proxy->name().asChar());

auto stage = _proxy->getUsdStage();

Choose a reason for hiding this comment

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

It's true that the base proxy shape currently always has a valid stage. This doesn't have to be true a) in future, b) for plugin proxy shapes (example AL proxy shape). Please bring back this validation.

Copy link

@kxl-adsk kxl-adsk left a comment

Choose a reason for hiding this comment

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

Changing the status of the review to "request changes"

@kxl-adsk kxl-adsk merged commit aef1831 into Autodesk:dev Jul 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
mtoh Related to legacy Maya to Hydra plugin.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants