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
40 changes: 37 additions & 3 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,15 @@ jobs:
fail-fast: false
matrix:
usd: ["v24.08", "v25.05"]
python: ["3.10", "3.12"]
python: ["", "3.10", "3.12"]

name: "USD-${{ matrix.usd }}-py${{ matrix.python }}"
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
if: matrix.python != ''
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
Expand All @@ -38,10 +39,14 @@ jobs:
run: |
sudo apt update
sudo apt install -y libgtest-dev ninja-build
python -m pip install -r ${{github.workspace}}/test/requirements.txt
mkdir -p ${{github.workspace}}/build
mkdir -p ${{runner.temp}}/USD

- name: Install test Python deps
if: matrix.python != ''
run: |
python -m pip install -r ${{github.workspace}}/test/requirements.txt

- name: Download USD
working-directory: ${{runner.temp}}/USD
run: |
Expand All @@ -57,6 +62,7 @@ jobs:
sed -i '/BOOST_URL/ s|\.zip"|.zip/download"|' src/build_scripts/build_usd.py

- name: Install USD
if: matrix.python != ''
working-directory: ${{runner.temp}}/USD
run: |
python ./src/build_scripts/build_usd.py . \
Expand All @@ -69,7 +75,23 @@ jobs:
--no-materialx \
-v

- name: Install USD (without Python)
if: matrix.python == ''
working-directory: ${{runner.temp}}/USD
run: |
python ./src/build_scripts/build_usd.py . \
--no-tests \
--no-examples \
--no-tutorials \
--no-tools \
--no-docs \
--no-imaging \
--no-materialx \
--no-python \
-v

- name: Configure & Build
if: matrix.python != ''
working-directory: ${{github.workspace}}/build
run: |
export PYTHONPATH="${{runner.temp}}/USD/lib/python"
Expand All @@ -80,6 +102,18 @@ jobs:
..
cmake --build . --config Release

- name: Configure & Build (without Python)
if: matrix.python == ''
working-directory: ${{github.workspace}}/build
run: |
cmake \
-D "BUILD_DOCS=OFF" \
-D "BUILD_PYTHON_BINDINGS=OFF" \
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
..
cmake --build . --config Release

- name: Check for formatting errors
working-directory: ${{github.workspace}}/build
run: |
Expand Down
50 changes: 47 additions & 3 deletions .github/workflows/test-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,25 +22,30 @@ jobs:
fail-fast: false
matrix:
usd: ["v24.08", "v25.05.01"]
python: ["3.10", "3.12"]
python: ["", "3.10", "3.12"]

name: "USD-${{ matrix.usd }}-py${{ matrix.python }}"
name: "USD-${{ matrix.usd }}${{ matrix.python != '' && format('-py{0}', matrix.python) || '-no-py' }}"

steps:
- uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python }}
if: matrix.python != ''
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}

- name: Create Build Environment
run: |
vcpkg install --triplet=x64-windows gtest
python -m pip install -r ${{github.workspace}}\test\requirements.txt
cmake -E make_directory ${{github.workspace}}\build
cmake -E make_directory ${{runner.temp}}\USD

- name: Install test Python deps
if: matrix.python != ''
run: |
python -m pip install -r ${{github.workspace}}/test/requirements.txt

- name: Download USD
working-directory: ${{runner.temp}}/USD
shell: cmd
Expand All @@ -58,6 +63,7 @@ jobs:
sed -i '/BOOST_URL/ s|\.zip"|.zip/download"|' src/build_scripts/build_usd.py

- name: Install USD
if: matrix.python != ''
working-directory: ${{runner.temp}}/USD
shell: cmd
run: |
Expand All @@ -75,7 +81,28 @@ jobs:
--no-materialx ^
-v

- name: Install USD (without Python)
if: matrix.python == ''
working-directory: ${{runner.temp}}/USD
shell: cmd
run: |
call "C:/Program Files/Microsoft Visual Studio/2022/Enterprise/VC/Auxiliary/Build/vcvars64.bat"
set VCPKG_TARGET_TRIPLET=x64-windows
set CMAKE_TOOLCHAIN_FILE=%VCPKG_INSTALLATION_ROOT%/scripts/buildsystems/vcpkg.cmake
python ./src/build_scripts/build_usd.py . ^
--generator "Visual Studio 17 2022" ^
--no-tests ^
--no-examples ^
--no-tutorials ^
--no-tools ^
--no-docs ^
--no-imaging ^
--no-materialx ^
--no-python ^
-v

- name: Configure & Build
if: matrix.python != ''
shell: bash
working-directory: ${{github.workspace}}/build
run: |
Expand All @@ -91,6 +118,23 @@ jobs:
..
cmake --build . --config Release

- name: Configure & Build (without Python)
if: matrix.python == ''
shell: bash
working-directory: ${{github.workspace}}/build
run: |
export PATH="${{runner.temp}}/USD/bin;${{runner.temp}}/USD/lib;${PATH}"
cmake \
-G "Visual Studio 17 2022" -A x64 \
-D "CMAKE_TOOLCHAIN_FILE=${VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake" \
-D "VCPKG_TARGET_TRIPLET=x64-windows" \
-D "BUILD_DOCS=OFF" \
-D "BUILD_PYTHON_BINDINGS=OFF" \
-D "CMAKE_INCLUDE_PATH=${{runner.temp}}/USD/include" \
-D "CMAKE_LIBRARY_PATH=${{runner.temp}}/USD/lib" \
..
cmake --build . --config Release

- name: Check for formatting errors
shell: bash
working-directory: ${{github.workspace}}/build
Expand Down
5 changes: 0 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,6 @@ if(BUILD_PYTHON_BINDINGS)
CACHE INTERNAL "Python library path.")
endif()

# usd::usd target always requres Boost::Boost
if (NOT TARGET Boost::Boost)
find_package(Boost REQUIRED)
endif()

add_subdirectory(src)

if (BUILD_TESTS)
Expand Down
3 changes: 1 addition & 2 deletions cmake/modules/FindUSD.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,8 @@ if(USD_INCLUDE_DIR AND EXISTS "${USD_INCLUDE_DIR}/pxr/pxr.h")
# if internal Boost.Python is not explicitly disabled
if (USD_VERSION VERSION_LESS "0.25.5" OR _use_external_boost_python)
set(USD_USE_INTERNAL_BOOST_PYTHON OFF CACHE INTERNAL "")
list(APPEND USD_DEPENDENCIES "Boost::boost")
if (BUILD_PYTHON_BINDINGS)
list(APPEND USD_DEPENDENCIES "Boost::python")
list(APPEND USD_DEPENDENCIES "Boost::boost" "Boost::python")
endif()
endif()

Expand Down
5 changes: 3 additions & 2 deletions doc/sphinx/release/release_notes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,14 @@ Release Notes
.. release:: 0.9.0
:date: Upcoming

.. change:: changed
.. change:: changed

Performance improvements for the Merge operation.

.. change:: fixed

Improved cmake packaging when building against a Python-free USD.
Removed the :term:`Boost` dependency for OpenUSD versions prior to
25.05 when Python bindings aren’t needed.

.. release:: 0.8.4
:date: 2025-07-30
Expand Down
5 changes: 1 addition & 4 deletions src/unf/broker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,7 @@ BrokerPtr Broker::Create(const UsdStageWeakPtr& stage)
return Registry[stage];
}

const UsdStageWeakPtr
Broker::GetStage() const {
return _stage;
}
const UsdStageWeakPtr Broker::GetStage() const { return _stage; }

bool Broker::IsInTransaction() { return _mergers.size() > 0; }

Expand Down
13 changes: 6 additions & 7 deletions src/unf/notice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)
{
// Update resyncChanges if necessary.
for (auto& path : notice._resyncChanges) {
const auto iter = std::find(_resyncChanges.begin(), _resyncChanges.end(), path);
if (iter == _resyncChanges.end())
{
const auto iter =
std::find(_resyncChanges.begin(), _resyncChanges.end(), path);
if (iter == _resyncChanges.end()) {
_resyncChanges.emplace_back(std::move(path));
}
}
Expand All @@ -80,8 +80,7 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)
{
const auto it = std::find(
_resyncChanges.begin(), _resyncChanges.end(), primPath);
if (it != _resyncChanges.end())
continue;
if (it != _resyncChanges.end()) continue;
}

// Skip if an ancestor of the path is already in resyncedPaths.
Expand All @@ -96,8 +95,8 @@ void ObjectsChanged::Merge(ObjectsChanged&& notice)

// Add infoChanges, when not already available
{
const auto it = std::find(
_infoChanges.begin(), _infoChanges.end(), path);
const auto it =
std::find(_infoChanges.begin(), _infoChanges.end(), path);
if (it == _infoChanges.end()) {
_infoChanges.push_back(std::move(path));
}
Expand Down