Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 8 additions & 12 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ project(maya-hydra)
option(BUILD_TESTS "Build tests." ON)
option(BUILD_STRICT_MODE "Enforce all warnings as errors." ON)
option(BUILD_SHARED_LIBS "Build libraries as shared or static." ON)
option(ENABLE_VIEWPORT_TOOLBOX "Build MayaHydra with ViewportToolbox support." ON)
option(CODE_COVERAGE "Build and collect code coverage info." OFF)

if(APPLE)
Expand Down Expand Up @@ -155,17 +154,14 @@ else()
message(STATUS "UFE not found.")
endif()

if (ENABLE_VIEWPORT_TOOLBOX)
set(VIEWPORTTOOLBOX_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lib/hydra-viewport-toolbox/include")
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_LIB hvt)
# Note: The multi-configuration generators (e.g., VS) always append the build type to the output directories
get_cmake_property(GENERATOR_IS_MULTI_CONFIG_VAR GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG_VAR)
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin/${CMAKE_BUILD_TYPE}")
else()
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin")
endif()
set(BUILD_WITH_VIEWPORT_TOOLBOX TRUE)
set(VIEWPORTTOOLBOX_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lib/hydra-viewport-toolbox/include")
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_LIB hvt)
# Note: The multi-configuration generators (e.g., VS) always append the build type to the output directories
get_cmake_property(GENERATOR_IS_MULTI_CONFIG_VAR GENERATOR_IS_MULTI_CONFIG)
if(GENERATOR_IS_MULTI_CONFIG_VAR)
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin/${CMAKE_BUILD_TYPE}")
else()
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin")
endif()

find_package(MayaUsd)
Expand Down
1 change: 0 additions & 1 deletion cmake/compiler_config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,5 @@ function(mayaHydra_compile_config TARGET)
TBB_SUPPRESS_DEPRECATED_MESSAGES # Remove TBB deprecation warnings
BOOST_ALL_NO_LIB # Avoid Boost autolinking libraries
$<$<BOOL:${CONFIGURABLE_DECIMAL_STREAMING_AVAILABLE}>:CONFIGURABLE_DECIMAL_STREAMING_AVAILABLE>
$<$<BOOL:${BUILD_WITH_VIEWPORT_TOOLBOX}>:VIEWPORT_TOOLBOX>
)
endfunction()
20 changes: 8 additions & 12 deletions lib/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
add_subdirectory(mayaHydra)
add_subdirectory(flowViewport)

if (ENABLE_VIEWPORT_TOOLBOX)
# Use vanilla OpenUSD
set(ENABLE_ADSK_OPENUSD_PENDING OFF)
set(OPENUSD_INSTALL_PATH "${PXR_USD_LOCATION}")

set(ENABLE_DRAW_ORDER OFF)

# Disable tests for HVT.
set(ENABLE_TESTS OFF)

add_subdirectory(hydra-viewport-toolbox)
endif()
# HVT setup
# Use vanilla OpenUSD
set(ENABLE_ADSK_OPENUSD_PENDING OFF)
set(OPENUSD_INSTALL_PATH "${PXR_USD_LOCATION}")
set(ENABLE_DRAW_ORDER OFF)
# Disable tests for HVT.
set(ENABLE_TESTS OFF)
add_subdirectory(hydra-viewport-toolbox)
9 changes: 3 additions & 6 deletions lib/flowViewport/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ target_include_directories(${TARGET_NAME}
${PXR_INCLUDE_DIRS}
${CMAKE_BINARY_DIR}/include
${UFE_INCLUDE_DIR}
$<$<BOOL:${BUILD_WITH_VIEWPORT_TOOLBOX}>:${VIEWPORTTOOLBOX_INCLUDE_DIR}>
${VIEWPORTTOOLBOX_INCLUDE_DIR}
)

# -----------------------------------------------------------------------------
Expand All @@ -63,8 +63,8 @@ target_link_libraries(${TARGET_NAME}
sdf
usdImaging
${UFE_LIBRARY}
$<$<BOOL:${BUILD_WITH_VIEWPORT_TOOLBOX}>:${VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_LIB}>
$<$<BOOL:${BUILD_WITH_VIEWPORT_TOOLBOX}>:${VIEWPORTTOOLBOX_VISUALSTYLES_LIB}>
${VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_LIB}
${VIEWPORTTOOLBOX_VISUALSTYLES_LIB}
PRIVATE
ar
gf
Expand Down Expand Up @@ -110,9 +110,6 @@ if(IS_WINDOWS)
install(FILES $<TARGET_PDB_FILE:${TARGET_NAME}>
DESTINATION ${CMAKE_INSTALL_PREFIX}/lib OPTIONAL)
endif()
endif()

if (BUILD_WITH_VIEWPORT_TOOLBOX AND IS_WINDOWS)
install(
FILES
${VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH}/hvt.dll
Expand Down
3 changes: 0 additions & 3 deletions lib/flowViewport/fvpFramePassData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
#include "fvpFramePassData.h"
#include "flowViewport/sceneIndex/fvpPassFilteringSceneIndex.h"

#ifdef VIEWPORT_TOOLBOX

PXR_NAMESPACE_USING_DIRECTIVE

namespace FVP_NS_DEF {
Expand All @@ -33,4 +31,3 @@ void FramePassData::DirtyPrimsFromPurposeRenderTag(const PXR_NS::TfToken purpose
}

}; // namespace FVP_NS_DEF
#endif
4 changes: 0 additions & 4 deletions lib/flowViewport/fvpFramePassData.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@

#include "flowViewport/api.h"

#ifdef VIEWPORT_TOOLBOX

#include <pxr/pxr.h>
#include <pxr/base/tf/token.h>
#include <pxr/usd/sdf/path.h>
Expand Down Expand Up @@ -101,6 +99,4 @@ using FramePassDataPtrVector = std::vector<FramePassDataPtr>;

}; // namespace FVP_NS_DEF

#endif // VIEWPORT_TOOLBOX

#endif // FLOW_VIEWPORT_FRAME_PASS_FILTERING_DATA_H
7 changes: 0 additions & 7 deletions lib/flowViewport/imageWriter/fvpRenderBufferWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

#include <flowViewport/imageWriter/fvpRenderBufferWriter.h>

#ifdef VIEWPORT_TOOLBOX
#include <hvt/engine/framePass.h>
#endif

#include <pxr/imaging/hdSt/hioConversions.h>
#include <pxr/imaging/hdx/taskController.h>
Expand All @@ -42,13 +40,8 @@ HdRenderBuffer* getRenderBuffer(
const PXR_NS::TfToken& aovToken
)
{
#ifdef VIEWPORT_TOOLBOX
auto framePass = Fvp::ImageBufferWriter::GetPtr<hvt::FramePass>(args, "framePass");
return framePass ? framePass->GetRenderBuffer(aovToken) : nullptr;
#else
auto taskController = Fvp::ImageBufferWriter::GetPtr<HdxTaskController>(args, "taskController");
return getRenderBuffer(taskController, aovToken);
#endif
}

}
Expand Down
7 changes: 0 additions & 7 deletions lib/flowViewport/imageWriter/fvpTextureBufferWriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,7 @@

#include <flowViewport/imageWriter/fvpTextureBufferWriter.h>

#ifdef VIEWPORT_TOOLBOX
#include <hvt/engine/framePass.h>
#endif

#include <pxr/imaging/hd/engine.h>
#include <pxr/imaging/hdx/types.h>
Expand Down Expand Up @@ -47,13 +45,8 @@ HgiTextureHandle getTextureHandle(
const TfToken& aovToken
)
{
#ifdef VIEWPORT_TOOLBOX
auto framePass = Fvp::ImageBufferWriter::GetPtr<hvt::FramePass>(args, "framePass");
return framePass ? framePass->GetRenderTexture(aovToken) : HgiTextureHandle();
#else
auto engine = Fvp::ImageBufferWriter::GetPtr<HdEngine>(args, "engine");
return getTextureHandle(engine, aovToken);
#endif
}

}
Expand Down
4 changes: 0 additions & 4 deletions lib/flowViewport/sceneIndex/fvpPassFilteringSceneIndex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
// limitations under the License.
//

#ifdef VIEWPORT_TOOLBOX

#include "fvpPassFilteringSceneIndex.h"
#include "flowViewport/fvpUtils.h"

Expand Down Expand Up @@ -347,5 +345,3 @@ void PassFilteringSceneIndex::_PrimsDirtied(
}

} // namespace FVP_NS_DEF

#endif // VIEWPORT_TOOLBOX
4 changes: 0 additions & 4 deletions lib/flowViewport/sceneIndex/fvpPassFilteringSceneIndex.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@
#ifndef FVP_PASS_FILTERING_SCENE_INDEX_H
#define FVP_PASS_FILTERING_SCENE_INDEX_H

#ifdef VIEWPORT_TOOLBOX

#include "flowViewport/api.h"
#include "flowViewport/sceneIndex/fvpSceneIndexUtils.h"
#include "flowViewport/fvpFramePassData.h"
Expand Down Expand Up @@ -119,6 +117,4 @@ class PassFilteringSceneIndex

} // namespace FVP_NS_DEF

#endif // VIEWPORT_TOOLBOX

#endif // FVP_PASS_FILTERING_SCENE_INDEX_H
2 changes: 0 additions & 2 deletions lib/flowViewport/selection/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ target_sources(${TARGET_NAME}
PRIVATE
fvpSelection.cpp
fvpSelectionFwd.cpp
fvpSelectionTask.cpp
fvpSelectionTracker.cpp
fvpSelectionTypes.cpp
fvpPathMapper.cpp
Expand All @@ -18,7 +17,6 @@ target_sources(${TARGET_NAME}
set(HEADERS
fvpSelection.h
fvpSelectionFwd.h
fvpSelectionTask.h
fvpSelectionTracker.h
fvpSelectionTypes.h
fvpPathMapper.h
Expand Down
120 changes: 0 additions & 120 deletions lib/flowViewport/selection/fvpSelectionTask.cpp

This file was deleted.

Loading