Skip to content

Commit

Permalink
Merge pull request #34 from rlei-weta/22.05_compatibility
Browse files Browse the repository at this point in the history
First pass at USD 22.05 compatibility
  • Loading branch information
rlei-weta authored May 14, 2022
2 parents eb7a0d4 + f455426 commit a1b2b69
Show file tree
Hide file tree
Showing 6 changed files with 126 additions and 195 deletions.
236 changes: 118 additions & 118 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,127 +20,127 @@ on:
jobs:

# A build job matrix based on pre-built USD binaries provided by NVIDIA.
nvidia-usd-binaries-linux-build:
strategy:
matrix:
usdVersion:
- 21.05
include:
- usdVersion: 21.05
usdVersionUrl: 21-05
pythonVersion: 3.6
USE_PYTHON_3: ON
buildType: Release
buildTests: 'ON'
runs-on: ubuntu-18.04
name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries
<USD Version=${{ matrix.usdVersion }},
Python Version=${{ matrix.pythonVersion }},
Build type:${{ matrix.buildType }},
Enable tests=${{ matrix.build-tests }}>'
steps:
- name: Install dependencies (Linux)
run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev
- uses: actions/checkout@v2
- name: Download and extract pre-built USD binaries
run: |
curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }}
mkdir -p /tmp/usd-${{ matrix.usdVersion }}
7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }}
- name: Create build directories
run: |
mkdir _build
mkdir _install
- name: Configure
run: |
cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \
-DBUILD_TESTING=${{ matrix.buildTests }} \
-DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \
-DCMAKE_INSTALL_PREFIX=../_install \
..
working-directory: _build
- name: Build
run: |
cmake --build . \
--verbose \
--target install \
--config ${{ matrix.buildType }}
working-directory: _build
- name: Test
run: ctest -VV --output-on-failure -C ${{ matrix.buildType }}
working-directory: _build
# nvidia-usd-binaries-linux-build:
# strategy:
# matrix:
# usdVersion:
# - 21.05
# include:
# - usdVersion: 21.05
# usdVersionUrl: 21-05
# pythonVersion: 3.6
# USE_PYTHON_3: ON
# buildType: Release
# buildTests: 'ON'
# runs-on: ubuntu-18.04
# name: 'Ubuntu 18.04 NVIDIA Pre-built Binaries
# <USD Version=${{ matrix.usdVersion }},
# Python Version=${{ matrix.pythonVersion }},
# Build type:${{ matrix.buildType }},
# Enable tests=${{ matrix.build-tests }}>'
# steps:
# - name: Install dependencies (Linux)
# run: sudo apt-get install cmake python${{ matrix.pythonVersion }} python${{ matrix.pythonVersion }}-dev
# - uses: actions/checkout@v2
# - name: Download and extract pre-built USD binaries
# run: |
# curl -L -o /tmp/usd-${{ matrix.usdVersion }}.7z https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-linux-python-${{ matrix.pythonVersion }}
# mkdir -p /tmp/usd-${{ matrix.usdVersion }}
# 7z x /tmp/usd-${{ matrix.usdVersion }}.7z -o/tmp/usd-${{ matrix.usdVersion }}
# - name: Create build directories
# run: |
# mkdir _build
# mkdir _install
# - name: Configure
# run: |
# cmake -DUSD_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
# -DTBB_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
# -DBOOST_ROOT="/tmp/usd-${{ matrix.usdVersion }}/" \
# -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} \
# -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} \
# -DBUILD_TESTING=${{ matrix.buildTests }} \
# -DCMAKE_CXX_FLAGS="-D_GLIBCXX_USE_CXX11_ABI=0" \
# -DCMAKE_INSTALL_PREFIX=../_install \
# ..
# working-directory: _build
# - name: Build
# run: |
# cmake --build . \
# --verbose \
# --target install \
# --config ${{ matrix.buildType }}
# working-directory: _build
# - name: Test
# run: ctest -VV --output-on-failure -C ${{ matrix.buildType }}
# working-directory: _build


# A build job matrix based on pre-built USD binaries provided by NVIDIA on Windows.
nvidia-usd-binaries-windows-build:
strategy:
matrix:
usdVersion:
- 21.05
include:
- usdVersion: 21.05
usdVersionUrl: 21-05
pythonVersion: 3.6
USE_PYTHON_3: ON
buildType: Release
buildTests: ON
runs-on: windows-2016
name: 'Windows 2016 NVIDIA Pre-built Binaries
<USD Version=${{ matrix.usdVersion }},
Python Version=${{ matrix.pythonVersion }},
Build type:${{ matrix.buildType }},
Enable tests=${{ matrix.build-tests }}>'
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.pythonVersion }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.pythonVersion }}
- name: Download and extract pre-built USD binaries
run: |
Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }}
7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y
- name: Create build directories
run: |
mkdir -Force _build
mkdir -Force _install
- name: Configure
run: |
cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
-DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} `
-DCMAKE_BUILD_TYPE=${{ matrix.buildType }} `
-DBUILD_TESTING=${{ matrix.buildTests }} `
-DCMAKE_INSTALL_PREFIX="../_install" `
-G "Visual Studio 15 2017 Win64" `
..
working-directory: "_build"
- name: Build
run: |
cmake --build . `
--verbose `
--config ${{ matrix.buildType }} `
--target ALL_BUILD
working-directory: "_build"
- name: Run Tests
run: |
ctest --extra-verbose `
--output-on-failure `
-C ${{ matrix.buildType }}
working-directory: "_build"
- name: Install
run: |
cmake --build . `
--verbose `
--config ${{ matrix.buildType }} `
--target INSTALL
working-directory: "_build"
# nvidia-usd-binaries-windows-build:
# strategy:
# matrix:
# usdVersion:
# - 21.05
# include:
# - usdVersion: 21.05
# usdVersionUrl: 21-05
# pythonVersion: 3.6
# USE_PYTHON_3: ON
# buildType: Release
# buildTests: ON
# runs-on: windows-2016
# name: 'Windows 2016 NVIDIA Pre-built Binaries
# <USD Version=${{ matrix.usdVersion }},
# Python Version=${{ matrix.pythonVersion }},
# Build type:${{ matrix.buildType }},
# Enable tests=${{ matrix.build-tests }}>'
# steps:
# - uses: actions/checkout@v2
# - name: Set up Python ${{ matrix.pythonVersion }}
# uses: actions/setup-python@v2
# with:
# python-version: ${{ matrix.pythonVersion }}
# - name: Download and extract pre-built USD binaries
# run: |
# Invoke-WebRequest https://developer.nvidia.com/usd-${{ matrix.usdVersionUrl }}-binary-windows-python-${{ matrix.pythonVersion }} -OutFile $env:TEMP/usd-${{ matrix.usdVersion }}.zip
# mkdir -Force $env:TEMP/usd-${{ matrix.usdVersion }}
# 7z x $env:TEMP/usd-${{ matrix.usdVersion }}.zip $("-o" + "$env:TEMP" + "\usd-${{ matrix.usdVersion }}") -y
# - name: Create build directories
# run: |
# mkdir -Force _build
# mkdir -Force _install
# - name: Configure
# run: |
# cmake -DUSD_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
# -DTBB_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
# -DBOOST_ROOT="$env:TEMP/usd-${{ matrix.usdVersion }}" `
# -DUSE_PYTHON_3=${{ matrix.USE_PYTHON_3 }} `
# -DCMAKE_BUILD_TYPE=${{ matrix.buildType }} `
# -DBUILD_TESTING=${{ matrix.buildTests }} `
# -DCMAKE_INSTALL_PREFIX="../_install" `
# -G "Visual Studio 15 2017 Win64" `
# ..
# working-directory: "_build"
# - name: Build
# run: |
# cmake --build . `
# --verbose `
# --config ${{ matrix.buildType }} `
# --target ALL_BUILD
# working-directory: "_build"
# - name: Run Tests
# run: |
# ctest --extra-verbose `
# --output-on-failure `
# -C ${{ matrix.buildType }}
# working-directory: "_build"
# - name: Install
# run: |
# cmake --build . `
# --verbose `
# --config ${{ matrix.buildType }} `
# --target INSTALL
# working-directory: "_build"

# Run automated code formatting checks.
code-formatting-check:
Expand Down
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ There are many other USD plugins available online - check out [USD Working Group
The following dependencies are required:
- C++ compiler
- [CMake](https://cmake.org/documentation/) (3.13 or greater)
- [USD](https://github.com/pixaranimationstudios/USD) (21.05)
- [USD](https://github.com/pixaranimationstudios/USD) (22.05)
- [Boost](https://boost.org) and [Intel TBB](https://www.threadingbuildingblocks.org/) (USD dependencies)

[Python](https://www.python.org/) may also be required, depending on python support in the USD installation.
Expand All @@ -46,9 +46,9 @@ Example snippet for building the plugins on Linux (and potentially MacOS):
mkdir build
cd build
cmake \
-DUSD_ROOT="/apps/usd/21.05/" \
-DTBB_ROOT="/apps/usd/21.05/" \
-DBOOST_ROOT="/apps/usd/21.05/" \
-DUSD_ROOT="/apps/usd/22.05/" \
-DTBB_ROOT="/apps/usd/22.05/" \
-DBOOST_ROOT="/apps/usd/22.05/" \
-DBUILD_TESTING=ON \
-DCMAKE_INSTALL_PREFIX="/apps/USDPluginExamples/" \
..
Expand All @@ -65,9 +65,9 @@ cmake ^
-DCMAKE_INSTALL_PREFIX=D:\usd\USDPluginExamples\ ^
-DUSE_PYTHON_3=ON ^
-DBUILD_TESTING=ON ^
-DUSD_ROOT="D:\usd\builds\v21.05" ^
-DTBB_ROOT="D:\usd\builds\v21.05" ^
-DBOOST_ROOT="D:\usd\builds\v21.05"
-DUSD_ROOT="D:\usd\builds\v22.05" ^
-DTBB_ROOT="D:\usd\builds\v22.05" ^
-DBOOST_ROOT="D:\usd\builds\v22.05"
cmake --build . --config Release -j 8 --target ALL_BUILD RUN_TESTS INSTALL
```
Expand Down
2 changes: 1 addition & 1 deletion cmake/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,5 @@ if (ENABLE_PYTHON_SUPPORT)
endif()

# USD & TBB
find_package(USD REQUIRED)
include(${USD_ROOT}/pxrConfig.cmake)
find_package(TBB REQUIRED)
51 changes: 0 additions & 51 deletions cmake/packages/FindUSD.cmake

This file was deleted.

7 changes: 0 additions & 7 deletions src/usdTri/triangle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,6 @@ UsdTriTriangle::_GetSchemaKind() const
return UsdTriTriangle::schemaKind;
}

/* virtual */
UsdSchemaKind
UsdTriTriangle::_GetSchemaType() const
{
return UsdTriTriangle::schemaType;
}

/* static */
const TfType&
UsdTriTriangle::_GetStaticTfType()
Expand Down
11 changes: 0 additions & 11 deletions src/usdTri/triangle.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,6 @@ class UsdTriTriangle : public UsdGeomGprim
/// \sa UsdSchemaKind
static const UsdSchemaKind schemaKind = UsdSchemaKind::ConcreteTyped;

/// \deprecated
/// Same as schemaKind, provided to maintain temporary backward
/// compatibility with older generated schemas.
static const UsdSchemaKind schemaType = UsdSchemaKind::ConcreteTyped;

/// Construct a UsdTriTriangle on UsdPrim \p prim .
/// Equivalent to UsdTriTriangle::Get(prim.GetStage(), prim.GetPath())
/// for a \em valid \p prim, but will not immediately throw an error for
Expand Down Expand Up @@ -120,12 +115,6 @@ class UsdTriTriangle : public UsdGeomGprim
USDTRI_API
UsdSchemaKind _GetSchemaKind() const override;

/// \deprecated
/// Same as _GetSchemaKind, provided to maintain temporary backward
/// compatibility with older generated schemas.
USDTRI_API
UsdSchemaKind _GetSchemaType() const override;

private:
// needs to invoke _GetStaticTfType.
friend class UsdSchemaRegistry;
Expand Down

0 comments on commit a1b2b69

Please sign in to comment.