Skip to content

Commit

Permalink
Ensure options attributes are not set while a render is in progress #…
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienblor authored Aug 27, 2024
1 parent a33145a commit 9e9b8d0
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 7 deletions.
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
# Changelog

## Pending next bugfix release
- [usd#2075](https://github.com/Autodesk/arnold-usd/issues/2075) - Ensure options attributes are not set while a hydra render is in progress

## [7.3.3.1] - 2024-08-09
- [usd#1989](https://github.com/Autodesk/arnold-usd/issues/1989) - Support mixed half/float channels when using the render delegate in batch mode with husk.
- [usd#1610](https://github.com/Autodesk/arnold-usd/issues/1610) - Proper support of arnold:visibility primvar in hydra

## Pending feature release
## [7.3.3.0] - 2024-07-26

### Feature
- [usd#1814](https://github.com/Autodesk/arnold-usd/issues/1814) - Support skinning on USD curves and points
Expand Down
7 changes: 5 additions & 2 deletions libs/render_delegate/render_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1620,8 +1620,11 @@ bool HdArnoldRenderDelegate::ShouldSkipIteration(HdRenderIndex* renderIndex, con
}
}
}
if (!skip)
ProcessConnections();

// If we have connections in our stack, it means that some nodes were re-exported,
// and therefore that the render was already interrupted
ProcessConnections();

return skip;
}

Expand Down
13 changes: 9 additions & 4 deletions libs/render_delegate/render_pass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,11 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
_windowNDC = GfVec4f(0.f, 0.f, 1.f, 1.f);
}
}
AiNodeSetFlt(options, str::pixel_aspect_ratio, pixelAspectRatio);
float currentPixelAspectRatio = AiNodeGetFlt(options, str::pixel_aspect_ratio);
if (!GfIsClose(currentPixelAspectRatio, pixelAspectRatio, AI_EPSILON)) {
renderParam->Interrupt(true, false);
AiNodeSetFlt(options, str::pixel_aspect_ratio, pixelAspectRatio);
}

auto checkShader = [&] (AtNode* shader, const AtString& paramName) {
auto* options = _renderDelegate->GetOptions();
Expand Down Expand Up @@ -597,10 +601,11 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt

// Eventually set the subdiv dicing camera in the options
const AtNode *subdivDicingCamera = _renderDelegate->GetSubdivDicingCamera(GetRenderIndex());
if (subdivDicingCamera)
const AtNode *currentSubdivDicingCamera = (const AtNode*)AiNodeGetPtr(options, str::subdiv_dicing_camera);
if (currentSubdivDicingCamera != subdivDicingCamera) {
renderParam->Interrupt(true, false);
AiNodeSetPtr(options, str::subdiv_dicing_camera, (void*)subdivDicingCamera);
else
AiNodeResetParameter(options, str::subdiv_dicing_camera);
}

// We are checking if the current aov bindings match the ones we already created, if not,
// then rebuild the driver setup.
Expand Down

0 comments on commit 9e9b8d0

Please sign in to comment.