Skip to content

Commit

Permalink
Merge fix-7.3.7 to master (#2203)
Browse files Browse the repository at this point in the history
* Fix build issue in older versions of USD (#2199)

* Fix build issue in older versions of USD (#2199) (#2200)

* more fixes for older USD versions

* expose legacy delegate Stop() declaration

---------

Co-authored-by: Ashley Handscomb Retallack <ashley.handscomb.retallack@autodesk.com>
  • Loading branch information
sebastienblor and compso authored Jan 22, 2025
1 parent 333ad8c commit e026928
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions libs/render_delegate/render_delegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1670,7 +1670,11 @@ bool HdArnoldRenderDelegate::IsPauseSupported() const { return false; }

bool HdArnoldRenderDelegate::IsStopSupported() const { return true; }

#if PXR_VERSION >= 2203
bool HdArnoldRenderDelegate::Stop(bool blocking)
#else
bool HdArnoldRenderDelegate::Stop()
#endif
{
_renderParam->Pause();
return true;
Expand All @@ -1688,11 +1692,13 @@ bool HdArnoldRenderDelegate::Restart()
return true;
}

#if PXR_VERSION >= 2203
bool HdArnoldRenderDelegate::IsStopped() const
{
int status = AiRenderGetStatus(GetRenderSession());
return (status != AI_RENDER_STATUS_RENDERING && status != AI_RENDER_STATUS_RESTARTING);
}
#endif

const HdArnoldRenderDelegate::NativeRprimParamList* HdArnoldRenderDelegate::GetNativeRprimParamList(
const AtString& arnoldNodeType) const
Expand Down
6 changes: 6 additions & 0 deletions libs/render_delegate/render_delegate.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,17 +367,23 @@ class HdArnoldRenderDelegate final : public HdRenderDelegate {
HDARNOLD_API
bool IsStopSupported() const override;

#if PXR_VERSION >= 2203
/// Advertise whether the render was stopped or if it's in progress
/// @return True if no render is in progress
HDARNOLD_API
bool IsStopped() const override;
#endif

#if PXR_VERSION >= 2203
/// Stop all of this delegate's background rendering threads. Default
/// implementation does nothing.
///
/// @return True if successful.
HDARNOLD_API
bool Stop(bool blocking = true) override;
#else
bool Stop() override;
#endif

/// Restart all of this delegate's background rendering threads previously
/// paused by a call to Stop. Default implementation does nothing.
Expand Down
2 changes: 2 additions & 0 deletions libs/render_delegate/rprim.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,14 @@ class HdArnoldRprim : public HydraType {
/// @return Pointer to the Render Delegate.
HdArnoldRenderDelegate* GetRenderDelegate() { return _renderDelegate; }

#if PXR_VERSION >= 2203
/// Tracking render tag changes
void UpdateRenderTag(HdSceneDelegate *delegate, HdRenderParam *renderParam) override {
HdRprim::UpdateRenderTag(delegate, renderParam);
HdArnoldRenderParamInterrupt param(renderParam);
_shape.UpdateRenderTag(this, delegate, param);
}
#endif

/// Syncs internal data and arnold state with hydra.
void SyncShape(
Expand Down

0 comments on commit e026928

Please sign in to comment.