Skip to content

Commit 8778676

Browse files
authored
Merge branch 'Autodesk:dev' into hsabri/fix_compiler_vs2022
2 parents a71ade6 + 4436d4f commit 8778676

File tree

343 files changed

+12436
-2319
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

343 files changed

+12436
-2319
lines changed

.gitmodules

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "lib/hydra-viewport-toolbox"]
2+
path = lib/hydra-viewport-toolbox
3+
url = https://github.com/Autodesk/hydra-viewport-toolbox.git

CMakeLists.txt

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ project(maya-hydra)
2323
option(BUILD_TESTS "Build tests." ON)
2424
option(BUILD_STRICT_MODE "Enforce all warnings as errors." ON)
2525
option(BUILD_SHARED_LIBS "Build libraries as shared or static." ON)
26+
option(ENABLE_VIEWPORT_TOOLBOX "Build MayaHydra with ViewportToolbox support." ON)
2627
option(CODE_COVERAGE "Build and collect code coverage info." OFF)
2728

2829
if(APPLE)
@@ -91,7 +92,9 @@ include(cmake/flowViewport_version.info)
9192
set(FLOWVIEWPORT_VERSION "${FLOWVIEWPORT_MAJOR_VERSION}.${FLOWVIEWPORT_MINOR_VERSION}.${FLOWVIEWPORT_PATCH_LEVEL}")
9293

9394
set(DEFAULT_PYTHON_3_VERSION 3.10)
94-
if (MAYA_APP_VERSION VERSION_GREATER 2024)
95+
if (MAYA_APP_VERSION VERSION_GREATER 2026)
96+
set(DEFAULT_PYTHON_3_VERSION 3.13)
97+
elseif (MAYA_APP_VERSION VERSION_GREATER 2024)
9598
set(DEFAULT_PYTHON_3_VERSION 3.11)
9699
endif()
97100
if (NOT BUILD_WITH_PYTHON_3_VERSION)
@@ -124,6 +127,10 @@ if (CMAKE_WANT_MATERIALX_BUILD)
124127
endif()
125128
include(cmake/usd.cmake)
126129

130+
# Avoid re-invoking OpenUSD's pxrConfig.cmake from subprojects (e.g., hydra-viewport-toolbox)
131+
# which can lead to duplicate imported targets like TBB::tbb.
132+
set(pxr_FOUND TRUE)
133+
127134
set(CONFIGURABLE_DECIMAL_STREAMING_AVAILABLE FALSE)
128135
if (DEFINED PXR_USD_LOCATION)
129136
file(GLOB_RECURSE STRING_UTILS_HEADER_PATH
@@ -148,6 +155,18 @@ else()
148155
message(STATUS "UFE not found.")
149156
endif()
150157

158+
if (ENABLE_VIEWPORT_TOOLBOX)
159+
set(VIEWPORTTOOLBOX_INCLUDE_DIR "${CMAKE_SOURCE_DIR}/lib/hydra-viewport-toolbox/include")
160+
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_LIB hvt)
161+
# Note: The multi-configuration generators (e.g., VS) always append the build type to the output directories
162+
if(GENERATOR_IS_MULTI_CONFIG)
163+
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin/${CMAKE_BUILD_TYPE}")
164+
else()
165+
set(VIEWPORTTOOLBOX_VIEWPORTTOOLBOX_DLL_PATH "${CMAKE_BINARY_DIR}/lib/hydra-viewport-toolbox/bin")
166+
endif()
167+
set(BUILD_WITH_VIEWPORT_TOOLBOX TRUE)
168+
endif()
169+
151170
find_package(MayaUsd)
152171
if(MayaUsd_FOUND)
153172
message(STATUS "Building with MayaUsd.")
@@ -196,11 +215,6 @@ endif()
196215
#------------------------------------------------------------------------------
197216
include(cmake/compiler_config.cmake)
198217

199-
#------------------------------------------------------------------------------
200-
# gulrak filesystem
201-
#------------------------------------------------------------------------------
202-
include(cmake/gulrak.cmake)
203-
204218
#------------------------------------------------------------------------------
205219
# test
206220
#------------------------------------------------------------------------------

build.py

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,17 @@
1717

1818
from __future__ import print_function
1919

20-
from distutils.spawn import find_executable
20+
try:
21+
from shutil import which as find_executable
22+
except ImportError:
23+
from distutils.spawn import find_executable
24+
2125
from glob import glob
2226

2327
import argparse
2428
import contextlib
2529
import codecs
2630
import datetime
27-
import distutils
28-
import distutils.util
2931
import multiprocessing
3032
import os
3133
import platform
@@ -77,6 +79,22 @@ def PrintError(error):
7779
traceback.print_exc()
7880
print("ERROR:", error)
7981

82+
def strtobool(val):
83+
"""Convert a string representation of truth to bool.
84+
85+
Accepted true values are: 'y', 'yes', 't', 'true', 'on', '1'
86+
Accepted false values are: 'n', 'no', 'f', 'false', 'off', '0'
87+
Case-insensitive; raises ValueError for invalid values.
88+
"""
89+
if isinstance(val, bool):
90+
return val
91+
v = str(val).strip().lower()
92+
if v in ("y", "yes", "t", "true", "on", "1"):
93+
return True
94+
if v in ("n", "no", "f", "false", "off", "0"):
95+
return False
96+
raise ValueError("Invalid truth value: {0}".format(val))
97+
8098
def Python3():
8199
return sys.version_info.major == 3
82100
############################################################
@@ -662,7 +680,7 @@ def Package(context):
662680
"(default: # of processors [{0}])"
663681
.format(GetCPUCount())))
664682

665-
parser.add_argument("--redirect-outstream-file", type=distutils.util.strtobool, dest="redirect_outstream_file", default=True,
683+
parser.add_argument("--redirect-outstream-file", type=strtobool, dest="redirect_outstream_file", default=True,
666684
help="Redirect output stream to a file. Set this flag to false to redirect output stream to console instead.")
667685

668686
args = parser.parse_args()

cmake/compiler_config.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,6 @@ function(mayaHydra_compile_config TARGET)
223223
TBB_SUPPRESS_DEPRECATED_MESSAGES # Remove TBB deprecation warnings
224224
BOOST_ALL_NO_LIB # Avoid Boost autolinking libraries
225225
$<$<BOOL:${CONFIGURABLE_DECIMAL_STREAMING_AVAILABLE}>:CONFIGURABLE_DECIMAL_STREAMING_AVAILABLE>
226+
$<$<BOOL:${BUILD_WITH_VIEWPORT_TOOLBOX}>:VIEWPORT_TOOLBOX>
226227
)
227228
endfunction()

cmake/gulrak.cmake

Lines changed: 0 additions & 48 deletions
This file was deleted.

cmake/test.cmake

Lines changed: 37 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ function(mayaUsd_add_test test_name)
182182
if(PREFIX_WORKING_DIRECTORY)
183183
set(WORKING_DIR ${PREFIX_WORKING_DIRECTORY})
184184
else()
185-
set(WORKING_DIR ${CMAKE_CURRENT_SOURCE_DIR})
185+
set(WORKING_DIR ${CMAKE_CURRENT_BINARY_DIR})
186186
endif()
187187

188188
# --------------
@@ -288,21 +288,55 @@ finally:
288288
else()
289289
list(APPEND ALL_PATH_VARS
290290
LD_LIBRARY_PATH
291+
IDIFF_LD_LIBRARY_PATH
292+
LD_PRELOAD
291293
)
292294
endif()
293295

294296
# Set initial empty values for all path vars
297+
# NOTE - we prefix varnames with "MAYAUSD_VARNAME_" just to make collision
298+
# with some existing var less likely
299+
295300
foreach(pathvar ${ALL_PATH_VARS})
296301
set(MAYAUSD_VARNAME_${pathvar})
297302
endforeach()
298303

299304
if(IS_WINDOWS)
300305
list(APPEND MAYAUSD_VARNAME_PATH "${CMAKE_INSTALL_PREFIX}/lib/gtest")
301306
list(APPEND MAYAUSD_VARNAME_PATH "${MAYA_LOCATION}/bin")
307+
else()
308+
# Set up environment for idiff execution
309+
set(MAYAUSD_VARNAME_LD_LIBRARY_PATH "${ADDITIONAL_LD_LIBRARY_PATH}")
310+
311+
# LD_LIBRARY_PATH needs to be set for the idiff executable because its
312+
# RPATH is absolute rather than relative to ORIGIN, meaning the RPATH
313+
# points to the absolute path on the machine where idiff was built.
314+
# This absence of relative paths for RPATH comes from OpenImageIO.
315+
# We introduce a second workaround to avoid Maya using usd's libpng,
316+
# because both use incompatible versions of libpng. This is done by
317+
# setting LD_LIBRARY_PATH to IDIFF_LD_LIBRARY_PATH only when we run
318+
# idiff using Python's subprocess module.
319+
set(MAYAUSD_VARNAME_IDIFF_LD_LIBRARY_PATH "${ADDITIONAL_LD_LIBRARY_PATH}:${PXR_USD_LOCATION}/lib64:${PXR_USD_LOCATION}/lib")
320+
321+
# Maya uses a very old version of GLEW, so we need support for
322+
# pre-loading a newer version from elsewhere.
323+
set(MAYAUSD_VARNAME_LD_PRELOAD "${ADDITIONAL_LD_PRELOAD}")
302324
endif()
303325

304-
# NOTE - we prefix varnames with "MAYAUSD_VARNAME_" just to make collision
305-
# with some existing var less likely
326+
# Set up environment for overall test and Maya defaults.
327+
set(ALL_TEST_VARS
328+
IMAGE_DIFF_TOOL
329+
MAYA_HAS_RENDER_ITEM_CULL_MODE_API
330+
)
331+
332+
set(MAYAUSD_VARNAME_IMAGE_DIFF_TOOL "${IMAGE_DIFF_TOOL}")
333+
334+
set(MAYAUSD_VARNAME_MAYA_HAS_RENDER_ITEM_CULL_MODE_API "${MAYA_HAS_RENDER_ITEM_CULL_MODE_API}")
335+
336+
foreach(testvar ${ALL_TEST_VARS})
337+
set_property(TEST "${test_name}" APPEND PROPERTY ENVIRONMENT
338+
"${testvar}=${MAYAUSD_VARNAME_${testvar}}")
339+
endforeach()
306340

307341
# Emulate what the module files for mayaHydra and mayaUsdPlugin would do.
308342

doc/CHANGELOG.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,33 @@
11
# Changelog
22

3+
## [v0.7.3] - 2025-10-01
4+
5+
**Added:**
6+
* Support Transform Selection Highlighting on Native Instances [#296](https://github.com/Autodesk/maya-hydra/pull/296)
7+
* Enable `cameraAdapter` when `MAYA_HYDRA_USE_MESH_ADAPTER` is 0 [#297](https://github.com/Autodesk/maya-hydra/pull/297)
8+
* Delete Ancestor Prim Folders from Hydra Scene Browser [#295](https://github.com/Autodesk/maya-hydra/pull/295)
9+
* Hydra Primitive Scene Stats [#294](https://github.com/Autodesk/maya-hydra/pull/294)
10+
* Dual hierarchy implementation [#308](https://github.com/Autodesk/maya-hydra/pull/308)
11+
12+
**Fixed:**
13+
* Change erroneous USD version code switch from 2403 to 2405 [#300](https://github.com/Autodesk/maya-hydra/pull/300)
14+
* Fix camera translation to Hydra [#301](https://github.com/Autodesk/maya-hydra/pull/301)
15+
* Fix issue when using new Qt [#299](https://github.com/Autodesk/maya-hydra/pull/299)
16+
* Fix minor details [#292](https://github.com/Autodesk/maya-hydra/pull/292)
17+
18+
**Build / Dependencies:**
19+
* Update minimum CMake version [#312](https://github.com/Autodesk/maya-hydra/pull/312)
20+
* Bump MayaHydra version [#314](https://github.com/Autodesk/maya-hydra/pull/314)
21+
* Update to next development version [#290](https://github.com/Autodesk/maya-hydra/pull/290)
22+
23+
**Documentation:**
24+
* Update build docs [#313](https://github.com/Autodesk/maya-hydra/pull/313)
25+
* Remove dead link [#293](https://github.com/Autodesk/maya-hydra/pull/293)
26+
27+
**Tests:**
28+
* Add NURBS curve test [#311](https://github.com/Autodesk/maya-hydra/pull/311)
29+
* Extend transform tests [#309](https://github.com/Autodesk/maya-hydra/pull/309)
30+
331
## [v0.7.2] - 2025-08-05
432

533
**Build:**

doc/build.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Before building the project, consult the following table to ensure you use the r
1313
| Operating System | Windows 10 <br> Windows 11 | High Sierra (10.13)<br>Mojave (10.14)<br>Catalina (10.15)<br>Big Sur (11.2.x) | Rocky Linux 8.6 / Linux® Red Hat® Enterprise 8.6 WS |
1414
| Compiler Requirement| Maya 2026 (VS 2022)<br>Maya PR (VS 2022) | Maya 2026 (Xcode 13.4 or higher)<br>Maya PR (Xcode 13.4 or higher) | Maya 2026 (gcc 11.2.1)<br>Maya PR (gcc 11.2.1) |
1515
| CMake Version (min/max) | 3.21...3.30 | 3.21...3.30 | 3.21...3.30 |
16-
| Python | 3.11.4, 3.11.9 | 3.11.4, 3.11.9 | 3.11.4, 3.11.9 |
16+
| Python | 3.11.4, 3.13.7 | 3.11.4, 3.13.7 | 3.11.4, 3.13.7 |
1717
| Python Packages | PyYAML, PySide, PyOpenGL | PyYAML, PySide2, PyOpenGL | PyYAML, PySide, PyOpenGL |
1818
| Build generator | Visual Studio, Ninja (Recommended) | XCode, Ninja (Recommended) | Ninja (Recommended) |
1919
| Command processor | x64 Native Tools Command Prompt for VS 2022 | bash | bash |
@@ -112,9 +112,9 @@ PYTHON_LIBRARIES=<maya-location>/lib/libpython<python-version>.so (e.g. : <maya-
112112
OSX:
113113
Python_EXECUTABLE=<maya-location>/Maya.app/Contents/bin/mayapy
114114
PYTHON_INCLUDE_DIR=<maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/<python-version>/include/python<python-version>
115-
(e.g. <maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/3.11/include/python3.11)
115+
(e.g. <maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/3.13/include/python3.13)
116116
PYTHON_LIBRARIES=<maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/<python-version>/lib/libpython<python-version>.dylib
117-
(e.g. : <maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/3.11/lib/libpython3.11.dylib)
117+
(e.g. : <maya-location>/Maya.app/Contents/Frameworks/Python.framework/Versions/3.13/lib/libpython3.13.dylib)
118118
119119
Windows:
120120
Python_EXECUTABLE=<maya-location>\bin\mayapy.exe

doc/legacyBuilds.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ If OpenUSD was not built with the same version of Python as the one used in your
2727
| 2024 | 3.10.8 |
2828
| 2025 | 3.11.4 |
2929
| 2026 | 3.11.9 |
30+
| PR | 3.13.3 |
3031

3132
So for Maya 2024, we need to rebuild OpenUSD with Python 3.10.8.<br>
3233
To do so, you need to clone the OpenUSD repository and checkout the version used by MayaUsd and MayaHydra which is [v24.11-MayaUsd-Public](https://github.com/autodesk-forks/USD/tree/v24.11-MayaUsd-Public).<br>

doc/mayaHydraDetails.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ classDiagram
8787
-_rendererPlugin: HdRendererPlugin*
8888
-_taskController: HdxTaskController*
8989
-_renderDelegate: HdPluginRenderDelegateUniqueHandle
90-
-_renderIndexProxy: std::unique_ptr<Fvp::RenderIndexProxy>
90+
-_dataProducerMergingSceneIndexProxy: std::shared_ptr<Fvp::DataProducerMergingSceneIndexProxy>
9191
-_renderIndex: HdRenderIndex*
9292
-_fvpSelectionTracker: Fvp::SelectionTrackerSharedPtr
9393
-_selectionSceneIndex: Fvp::SelectionSceneIndexRefPtr

0 commit comments

Comments
 (0)