Skip to content

Commit

Permalink
Merge release v23.02
Browse files Browse the repository at this point in the history
  • Loading branch information
pixar-oss committed Jan 24, 2023
2 parents 0c7b9a9 + 97d2ba3 commit 5c5ebdd
Show file tree
Hide file tree
Showing 1,250 changed files with 55,354 additions and 12,115 deletions.
97 changes: 48 additions & 49 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Advanced Build Configuration

## Building With Build Script

The simplest way to build USD is to run the supplied ```build_usd.py```
The simplest way to build USD is to run the supplied `build_usd.py`
script. This script will download required dependencies and build
and install them along with USD in a given directory.

Expand Down Expand Up @@ -99,16 +99,15 @@ Python support in USD refers to:
- Unit tests using Python

Support for Python can optionally be disabled by specifying the cmake flag
```PXR_ENABLE_PYTHON_SUPPORT=FALSE```.
`PXR_ENABLE_PYTHON_SUPPORT=FALSE`.

Python 3 is enabled by default, Python 2 can be enabled by specifying the cmake
flag
```PXR_USE_PYTHON_3=OFF```.
flag `PXR_USE_PYTHON_3=OFF`.

##### OpenGL

Support for OpenGL can optionally be disabled by specifying the cmake flag
```PXR_ENABLE_GL_SUPPORT=FALSE```. This will skip components and libraries
`PXR_ENABLE_GL_SUPPORT=FALSE`. This will skip components and libraries
that depend on GL, including:
- usdview
- Hydra GL imaging
Expand All @@ -117,7 +116,7 @@ that depend on GL, including:

Building USD with Metal enabled requires macOS Mojave (10.14) or newer.
Support for Metal can optionally be disabled by specifying the cmake flag
```PXR_ENABLE_METAL_SUPPORT=FALSE```. This will skip components and libraries
`PXR_ENABLE_METAL_SUPPORT=FALSE`. This will skip components and libraries
that depend on Metal, including:
- Hydra imaging

Expand All @@ -129,12 +128,12 @@ location of the SDK. The glslang compiler headers must be locatable during
the build process.

Support for Vulkan can optionally be enabled by specifying the cmake flag
```PXR_ENABLE_VULKAN_SUPPORT=TRUE```.
`PXR_ENABLE_VULKAN_SUPPORT=TRUE`.

##### OSL (OpenShadingLanguage)

Support for OSL is disabled by default, and can optionally be enabled by
specifying the cmake flag ```PXR_ENABLE_OSL_SUPPORT=TRUE```. This will
specifying the cmake flag `PXR_ENABLE_OSL_SUPPORT=TRUE`. This will
enable components and libraries that depend on OSL.

Enabling OSL suport allows the Shader Definition Registry (sdr) to
Expand All @@ -143,7 +142,7 @@ parse metadata from OSL shaders.
##### Documentation

Doxygen documentation can optionally be generated by specifying the cmake flag
```PXR_BUILD_DOCUMENTATION=TRUE```.
`PXR_BUILD_DOCUMENTATION=TRUE`.

The additional dependencies that must be supplied for enabling documentation
generation are:
Expand All @@ -160,22 +159,22 @@ See [3rd Party Library and Application Versions](VERSIONS.md) for version inform

This component contains Hydra, a high-performance graphics rendering engine.

Disable this component by specifying the cmake flag ```PXR_BUILD_IMAGING=FALSE``` when
Disable this component by specifying the cmake flag `PXR_BUILD_IMAGING=FALSE` when
invoking cmake. Disabling this component will also disable the [USD Imaging](#usd-imaging)
component and any [Imaging Plugins](#imaging-plugins).

Support for Ptex can optionally be disabled by specifying the cmake flag
```PXR_ENABLE_PTEX_SUPPORT=FALSE```.
`PXR_ENABLE_PTEX_SUPPORT=FALSE`.


##### USD Imaging

This component provides the USD imaging delegates for Hydra, as well as
usdview, a standalone native viewer for USD files.

Disable this component by specifying the cmake flag ```PXR_BUILD_USD_IMAGING=FALSE``` when
Disable this component by specifying the cmake flag `PXR_BUILD_USD_IMAGING=FALSE` when
invoking cmake. usdview may also be disabled independently by specifying the cmake flag
```PXR_BUILD_USDVIEW=FALSE```.
`PXR_BUILD_USDVIEW=FALSE`.

## Imaging Plugins

Expand All @@ -184,7 +183,7 @@ Hydra's rendering functionality can be extended with these optional plugins.
##### OpenImageIO

This plugin can optionally be enabled by specifying the cmake flag
```PXR_BUILD_OPENIMAGEIO_PLUGIN=TRUE```. When enabled, OpenImageIO provides
`PXR_BUILD_OPENIMAGEIO_PLUGIN=TRUE`. When enabled, OpenImageIO provides
broader support for reading and writing different image formats as textures.
If OpenImageIO is disabled, imaging by default supports the image formats bmp,
jpg, png, tga, and hdr. With OpenImageIO enabled, support extends to exr, tif,
Expand All @@ -194,14 +193,14 @@ like subimages and mipmaps.
##### OpenColorIO

This plugin can optionally be enabled by specifying the cmake flag
```PXR_BUILD_OPENCOLORIO_PLUGIN=TRUE```. When enabled, OpenColorIO provides
`PXR_BUILD_OPENCOLORIO_PLUGIN=TRUE`. When enabled, OpenColorIO provides
color management for Hydra viewports.

##### Embree Rendering

This component contains an example rendering backend for Hydra and usdview,
based on the embree raycasting library. Enable the plugin in the build by
specifying the cmake flag ```PXR_BUILD_EMBREE_PLUGIN=TRUE``` when invoking
specifying the cmake flag `PXR_BUILD_EMBREE_PLUGIN=TRUE` when invoking
cmake.

The additional dependencies that must be supplied when invoking cmake are:
Expand All @@ -216,7 +215,7 @@ See [3rd Party Library and Application Versions](VERSIONS.md) for version inform

This plugin uses Pixar's RenderMan as a rendering backend for Hydra and
usdview. Enable the plugin in the build by specifying the cmake flag
```PXR_BUILD_PRMAN_PLUGIN=TRUE``` when invoking cmake.
`PXR_BUILD_PRMAN_PLUGIN=TRUE` when invoking cmake.

The additional dependencies that must be supplied when invoking cmake are:

Expand Down Expand Up @@ -244,7 +243,7 @@ The USD Katana plugins can be found in the Foundry-supported repo available
##### Alembic Plugin

Enable the [Alembic](https://github.com/alembic/alembic) plugin in the build
by specifying the cmake flag ```PXR_BUILD_ALEMBIC_PLUGIN=TRUE``` when invoking cmake.
by specifying the cmake flag `PXR_BUILD_ALEMBIC_PLUGIN=TRUE` when invoking cmake.

The additional dependencies that must be supplied when invoking cmake are:

Expand All @@ -260,7 +259,7 @@ Alembic library specified in ALEMBIC_DIR.
See [3rd Party Library and Application Versions](VERSIONS.md) for version information.

Support for Alembic files using the HDF5 backend is enabled by default but can be
disabled by specifying the cmake flag ```PXR_ENABLE_HDF5_SUPPORT=FALSE```. HDF5
disabled by specifying the cmake flag `PXR_ENABLE_HDF5_SUPPORT=FALSE`. HDF5
support requires the following dependencies:

| Dependency Name | Description |
Expand All @@ -272,7 +271,7 @@ For further information see the documentation on the Alembic plugin [here](http:
##### MaterialX Plugin

Enable [MaterialX](https://github.com/materialx/materialx) support in the
build by specifying the cmake flag ```PXR_ENABLE_MATERIALX_SUPPORT=TRUE``` when
build by specifying the cmake flag `PXR_ENABLE_MATERIALX_SUPPORT=TRUE` when
invoking cmake. Note that MaterialX with shared library support is required.

The additional dependencies that must be supplied when invoking cmake are:
Expand All @@ -285,7 +284,7 @@ See [3rd Party Library and Application Versions](VERSIONS.md) for version inform

##### Draco Plugin

Enable the [Draco](https://github.com/google/draco) plugin in the build by specifying the cmake flag ```PXR_BUILD_DRACO_PLUGIN=TRUE```
Enable the [Draco](https://github.com/google/draco) plugin in the build by specifying the cmake flag `PXR_BUILD_DRACO_PLUGIN=TRUE`
when invoking cmake. This plugin is compatible with Draco 1.3.4. The additional dependencies that must be supplied when invoking cmake are:

| Dependency Name | Description | Version |
Expand All @@ -295,7 +294,7 @@ when invoking cmake. This plugin is compatible with Draco 1.3.4. The additional
## Tests

Tests are built by default but can be disabled by specifying the cmake flag
```PXR_BUILD_TESTS=FALSE``` when invoking cmake.
`PXR_BUILD_TESTS=FALSE` when invoking cmake.

##### Running Tests
Run tests by invoking ctest from the build directory, which is typically the
Expand Down Expand Up @@ -335,21 +334,21 @@ libraries when needed.

The plugin system requires knowledge of where these metadata files are located. The cmake build will ensure this is set up
properly based on the install location of the build. However, if you plan to relocate these files to a new location after
the build, you must inform the build by setting the cmake variable ```PXR_INSTALL_LOCATION``` to the intended final
the build, you must inform the build by setting the cmake variable `PXR_INSTALL_LOCATION` to the intended final
directory where these files will be located. This variable may be a ':'-delimited list of paths.

Another way USD is locating plugins is the ```PXR_PLUGINPATH_NAME``` environment variable. This variable
Another way USD is locating plugins is the `PXR_PLUGINPATH_NAME` environment variable. This variable
may be a list of paths. If you do not want your USD build to use this default variable name, you can override the name
of the environment variable using the following CMake option:

```
-DPXR_OVERRIDE_PLUGINPATH_NAME=CUSTOM_USD_PLUGINPATHS
```

By doing this, USD will check the ```CUSTOM_USD_PLUGINPATHS``` environment variable for paths, instead of the default
```PXR_PLUGINPATH_NAME``` one.
By doing this, USD will check the `CUSTOM_USD_PLUGINPATHS` environment variable for paths, instead of the default
`PXR_PLUGINPATH_NAME` one.

The values specified in ```PXR_PLUGINPATH_NAME``` or ```PXR_INSTALL_LOCATION```
The values specified in `PXR_PLUGINPATH_NAME` or `PXR_INSTALL_LOCATION`
have the following characteristics:

- Values may contain any number of paths.
Expand All @@ -369,7 +368,7 @@ By default shared libraries will have the prefix 'lib'. This means, for a given
component such as [usdGeom](pxr/usd/lib/usdGeom), the build will generate a corresponding
libusdGeom object (libusdGeom.so on Linux, libusdGeom.dll on Windows
and libusdGeom.dylib on Mac). You can change the prefix (or remove it) through
```PXR_LIB_PREFIX```. For example,
`PXR_LIB_PREFIX`. For example,

```
-DPXR_LIB_PREFIX=pxr
Expand All @@ -389,9 +388,9 @@ flags:

| Option Name | Description | Default |
| ------------------------------ |-----------------------------------------| ------- |
| PXR_SET_EXTERNAL_NAMESPACE | The outer namespace identifier | ```pxr``` |
| PXR_SET_INTERNAL_NAMESPACE | The internal namespace identifier | ```pxrInternal_v_x_y``` (for version x.y.z) |
| PXR_ENABLE_NAMESPACES | Enable namespaces | ```ON``` |
| PXR_SET_EXTERNAL_NAMESPACE | The outer namespace identifier | `pxr` |
| PXR_SET_INTERNAL_NAMESPACE | The internal namespace identifier | `pxrInternal_v_x_y` (for version x.y.z) |
| PXR_ENABLE_NAMESPACES | Enable namespaces | `ON` |

When enabled, there are a set of macros provided in a generated header,
pxr/pxr.h, which facilitates using namespaces:
Expand All @@ -400,8 +399,8 @@ pxr/pxr.h, which facilitates using namespaces:
| ------------------------------ |-----------------------------------------|
| PXR_NAMESPACE_OPEN_SCOPE | Opens the namespace scope. |
| PXR_NAMESPACE_CLOSE_SCOPE | Closes the namespace. |
| PXR_NS | Explicit qualification on items, e.g. ```PXR_NS::TfToken foo = ...```|
| PXR_NAMESPACE_USING_DIRECTIVE | Enacts a using-directive, e.g. ```using namespace PXR_NS;``` |
| PXR_NS | Explicit qualification on items, e.g. `PXR_NS::TfToken foo = ...`|
| PXR_NAMESPACE_USING_DIRECTIVE | Enacts a using-directive, e.g. `using namespace PXR_NS;` |

##### ASCII Parser Editing/Validation

Expand All @@ -410,7 +409,7 @@ There is an ASCII parser for the USD file format, which can be found in
for the adventurous ones, there are a couple additional requirements.

If you choose to edit the ASCII parsers, make sure
```PXR_VALIDATE_GENERATED_CODE``` is set to ```TRUE```. This flag enables tests
`PXR_VALIDATE_GENERATED_CODE` is set to `TRUE`. This flag enables tests
that check the generated code in [sdf](pxr/usd/lib/sdf) and
[gf](pxr/base/lib/gf).

Expand Down Expand Up @@ -445,7 +444,7 @@ There are certain optimizations that can be enabled in the build.
##### Malloc Library

We've found that USD performs best with allocators such as [Jemalloc](https://github.com/jemalloc/jemalloc).
In support of this, you can specify your own allocator through ```PXR_MALLOC_LIBRARY```.
In support of this, you can specify your own allocator through `PXR_MALLOC_LIBRARY`.
This variable should be set to a path to a shared object for the allocator. For example,

```bash
Expand All @@ -461,8 +460,8 @@ There are four ways to link USD controlled by the following options:

| Option Name | Default | Description |
| ---------------------- | --------- | ----------------------------------------- |
| BUILD_SHARED_LIBS | ```ON``` | Build shared or static libraries |
| PXR_BUILD_MONOLITHIC | ```OFF``` | Build single or several libraries |
| BUILD_SHARED_LIBS | `ON` | Build shared or static libraries |
| PXR_BUILD_MONOLITHIC | `OFF` | Build single or several libraries |
| PXR_MONOLITHIC_IMPORT | | CMake file defining usd_ms import library |

##### Shared Libraries
Expand All @@ -472,8 +471,8 @@ just the libraries necessary for a given task.

| Option Name | Value |
| ---------------------- | --------- |
| BUILD_SHARED_LIBS | ```ON``` |
| PXR_BUILD_MONOLITHIC | ```OFF``` |
| BUILD_SHARED_LIBS | `ON` |
| PXR_BUILD_MONOLITHIC | `OFF` |
| PXR_MONOLITHIC_IMPORT | |

```bash
Expand All @@ -490,8 +489,8 @@ application and another in each plugin/module.

| Option Name | Value |
| ---------------------- | --------- |
| BUILD_SHARED_LIBS | ```OFF``` |
| PXR_BUILD_MONOLITHIC | ```OFF``` |
| BUILD_SHARED_LIBS | `OFF` |
| PXR_BUILD_MONOLITHIC | `OFF` |
| PXR_MONOLITHIC_IMPORT | |

```bash
Expand All @@ -510,11 +509,11 @@ libraries of the default mode. Plugins inside of `pxr/` are compiled into
This mode is useful to reduce the number of installed files and simplify
linking against USD.

| Option Name | Value |
| ---------------------- | ---------- |
| Option Name | Value |
| ---------------------- | ---------- |
| BUILD_SHARED_LIBS | _Don't care_ |
| PXR_BUILD_MONOLITHIC | ```ON``` |
| PXR_MONOLITHIC_IMPORT | |
| PXR_BUILD_MONOLITHIC | `ON` |
| PXR_MONOLITHIC_IMPORT | |

```bash
cmake -DPXR_BUILD_MONOLITHIC=ON ...
Expand All @@ -528,10 +527,10 @@ client has control of building the monolithic shared library. This mode
is useful to embed USD into another shared library. The build steps are
significantly more complicated and are described below.

| Option Name | Value |
| ---------------------- | ---------- |
| BUILD_SHARED_LIBS | _Don't care_ |
| PXR_BUILD_MONOLITHIC | ```ON``` |
| Option Name | Value |
| ---------------------- | ---------- |
| BUILD_SHARED_LIBS | _Don't care_ |
| PXR_BUILD_MONOLITHIC | `ON` |
| PXR_MONOLITHIC_IMPORT | _Path-to-import-file_ |

To build in this mode:
Expand Down
Loading

0 comments on commit 5c5ebdd

Please sign in to comment.