HYDRA-2047 : Remove non-HVT code path#376
Conversation
debloip-adsk
commented
Jan 21, 2026
- Remove all non-HVT code paths (which includes the entire SelectionTask, as it was only used in the non-HVT path)
- Remove HVT flags from CMake setup
- Remove a dead function (_NeedToRecreateTheSceneIndicesChain) and its dependent code
lanierd-adsk
left a comment
There was a problem hiding this comment.
Thanks for doing all this cleanup. Only a few question to be sure what is being removed is no longer necessary.
| _CreateSceneIndicesChainAfterMergingSceneIndex(drawContext); | ||
|
|
||
| const Fvp::InformationInterface::RenderViewDesc hydraViewportInformation(panelNameStr, true); | ||
| manager.AddRenderViewData( |
There was a problem hiding this comment.
I don't see this function call any longer. Is that on purpose ?
There was a problem hiding this comment.
Yes, since _NeedToRecreateTheSceneIndicesChain always returned false we could never get into this branch path
| } | ||
|
|
||
| auto& manager = Fvp::RenderViewDataManager::Get(); | ||
| if (_NeedToRecreateTheSceneIndicesChain(currentDisplayStyle)){ |
There was a problem hiding this comment.
Yes, if you look at this function's implementation, it always returned false and had a comment saying to remove it at some point
| TF_DEBUG(MAYAHYDRALIB_RENDEROVERRIDE_SCENE_INDEX_CHAIN_MGMT) | ||
| .Msg("Re-using existing scene index chain to render %s\n", panelNameStr.c_str()); | ||
|
|
||
| #ifdef MAYA_HAS_VIEW_SELECTED_OBJECT_API |
There was a problem hiding this comment.
Is this no longer necessary ?
There was a problem hiding this comment.
It's still there, just moved up a bit due to the removed code, see line 1081 in the updated file
There was a problem hiding this comment.
Pull request overview
This PR removes all non-HVT (Hydra Viewport Toolbox) code paths from the codebase, streamlining the implementation to use HVT exclusively. The changes eliminate conditional compilation branches, remove unused code including the entire SelectionTask, and clean up CMake configuration.
Changes:
- Removed
VIEWPORT_TOOLBOXpreprocessor conditionals and associated non-HVT code paths throughout the codebase - Deleted the
SelectionTaskclass and related files that were only used in non-HVT mode - Removed the
_NeedToRecreateTheSceneIndicesChainfunction and its dependent code - Updated CMake build configuration to remove HVT-related conditional compilation flags
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| test/lib/mayaUsd/render/mayaToHydra/CMakeLists.txt | Unconditionally added testFramePasses.py test; removed BUILD_WITH_VIEWPORT_TOOLBOX conditional |
| lib/mayaHydra/mayaPlugin/renderOverride.h | Removed VIEWPORT_TOOLBOX preprocessor guards from declarations |
| lib/mayaHydra/mayaPlugin/renderOverride.cpp | Removed all non-HVT code paths and VIEWPORT_TOOLBOX conditionals; deleted _NeedToRecreateTheSceneIndicesChain function |
| lib/mayaHydra/mayaPlugin/plugin.cpp | Removed VIEWPORT_TOOLBOX guards from command registration |
| lib/mayaHydra/mayaPlugin/CMakeLists.txt | Made renderRegionCommand.cpp and setVisibleFramePassesCommand.cpp unconditional source files |
| lib/flowViewport/selection/fvpSelectionTask.h | Deleted entire file (SelectionTask header) |
| lib/flowViewport/selection/fvpSelectionTask.cpp | Deleted entire file (SelectionTask implementation) |
| lib/flowViewport/selection/CMakeLists.txt | Removed fvpSelectionTask source and header files |
| lib/flowViewport/sceneIndex/fvpPassFilteringSceneIndex.h | Removed VIEWPORT_TOOLBOX preprocessor guards |
| lib/flowViewport/sceneIndex/fvpPassFilteringSceneIndex.cpp | Removed VIEWPORT_TOOLBOX preprocessor guards |
| lib/flowViewport/imageWriter/fvpTextureBufferWriter.cpp | Removed non-HVT code path using HdEngine |
| lib/flowViewport/imageWriter/fvpRenderBufferWriter.cpp | Removed non-HVT code path using HdxTaskController |
| lib/flowViewport/fvpFramePassData.h | Removed VIEWPORT_TOOLBOX preprocessor guards |
| lib/flowViewport/fvpFramePassData.cpp | Removed VIEWPORT_TOOLBOX preprocessor guards |
| lib/flowViewport/CMakeLists.txt | Made VIEWPORTTOOLBOX libraries unconditional dependencies |
| lib/CMakeLists.txt | Removed ENABLE_VIEWPORT_TOOLBOX conditional around HVT subdirectory |
| cmake/compiler_config.cmake | Removed VIEWPORT_TOOLBOX preprocessor definition |
| CMakeLists.txt | Removed ENABLE_VIEWPORT_TOOLBOX build option |
Comments suppressed due to low confidence (1)
lib/mayaHydra/mayaPlugin/renderOverride.cpp:1
- There is a duplicate
#ifdef VIEWPORT_TOOLBOXguard on line 1681 within the function body. This appears to be a leftover from the refactoring. Remove the duplicate preprocessor directive.
//
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.