Skip to content

Commit 9e9b8d0

Browse files
Ensure options attributes are not set while a render is in progress #2075 (#2076)
1 parent a33145a commit 9e9b8d0

File tree

3 files changed

+18
-7
lines changed

3 files changed

+18
-7
lines changed

CHANGELOG.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
# Changelog
33

44
## Pending next bugfix release
5+
- [usd#2075](https://github.com/Autodesk/arnold-usd/issues/2075) - Ensure options attributes are not set while a hydra render is in progress
6+
7+
## [7.3.3.1] - 2024-08-09
58
- [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.
69
- [usd#1610](https://github.com/Autodesk/arnold-usd/issues/1610) - Proper support of arnold:visibility primvar in hydra
710

8-
## Pending feature release
11+
## [7.3.3.0] - 2024-07-26
912

1013
### Feature
1114
- [usd#1814](https://github.com/Autodesk/arnold-usd/issues/1814) - Support skinning on USD curves and points

libs/render_delegate/render_delegate.cpp

+5-2
Original file line numberDiff line numberDiff line change
@@ -1620,8 +1620,11 @@ bool HdArnoldRenderDelegate::ShouldSkipIteration(HdRenderIndex* renderIndex, con
16201620
}
16211621
}
16221622
}
1623-
if (!skip)
1624-
ProcessConnections();
1623+
1624+
// If we have connections in our stack, it means that some nodes were re-exported,
1625+
// and therefore that the render was already interrupted
1626+
ProcessConnections();
1627+
16251628
return skip;
16261629
}
16271630

libs/render_delegate/render_pass.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,11 @@ void HdArnoldRenderPass::_Execute(const HdRenderPassStateSharedPtr& renderPassSt
569569
_windowNDC = GfVec4f(0.f, 0.f, 1.f, 1.f);
570570
}
571571
}
572-
AiNodeSetFlt(options, str::pixel_aspect_ratio, pixelAspectRatio);
572+
float currentPixelAspectRatio = AiNodeGetFlt(options, str::pixel_aspect_ratio);
573+
if (!GfIsClose(currentPixelAspectRatio, pixelAspectRatio, AI_EPSILON)) {
574+
renderParam->Interrupt(true, false);
575+
AiNodeSetFlt(options, str::pixel_aspect_ratio, pixelAspectRatio);
576+
}
573577

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

598602
// Eventually set the subdiv dicing camera in the options
599603
const AtNode *subdivDicingCamera = _renderDelegate->GetSubdivDicingCamera(GetRenderIndex());
600-
if (subdivDicingCamera)
604+
const AtNode *currentSubdivDicingCamera = (const AtNode*)AiNodeGetPtr(options, str::subdiv_dicing_camera);
605+
if (currentSubdivDicingCamera != subdivDicingCamera) {
606+
renderParam->Interrupt(true, false);
601607
AiNodeSetPtr(options, str::subdiv_dicing_camera, (void*)subdivDicingCamera);
602-
else
603-
AiNodeResetParameter(options, str::subdiv_dicing_camera);
608+
}
604609

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

0 commit comments

Comments
 (0)