-
Notifications
You must be signed in to change notification settings - Fork 45
USD on macOS
The official Pixar script is a quick and easy way to get an out of the box USD build going using official distributions of the various dependencies. Build club is useful when a USD build has to be built in Debug mode, or if specific third party library versions are required.
These instructions vary from Pixar's in that it uses homebrew to install PyQt rather than macports. The reason for that is that macports sets up an alternative python environment, but some users need system python to work with USD. These steps allow for that.
If you choose to install these with homebrew -
brew install cmake
brew install cartr/qt4/qt
brew install cartr/qt4/pyside
brew install cartr/qt4/pyside-tools
The Pixar script will use pip to install PyOpenGL, but more likely than not, it will fail due to permissions. It's easy enough to do it manually:
pip install PyOpenGL
You may need sudo.
If necessary, set the PYTHONPATH environment variable so that cmake can find PyQt:
export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
Set up to build in ~/Projects/Pixar/USD:
cd $HOME
mkdir Projects
cd Projects
mkdir Pixar
cd Pixar
git clone https://github.com/PixarAnimationStudios/USD
cd USD
git checkout dev
cd ..
Run the build_usd.py build script
python USD/build_scripts/build_usd.py -v $HOME/Projects/Pixar/BUILD/USD
If the build succeeded, set up environment variables so that the USD binaries and python bindings can be found:
export PYTHONPATH=$PYTHONPATH:$HOME/Projects/Pixar/BUILD/USD/lib/python
export PATH=$PATH:$HOME/Projects/Pixar/BUILD/USD/bin
And test:
usdview ./USD/extras/usd/tutorials/convertingLayerFormats/Sphere.usda
Building USD this way will create a local cache of all the libraries USD depends on as well as USD itself.
Pick this method if you need to exercise absolute control over the libraries and don't want to mix them in with your system paths.
Run the following in your projects directory:
git clone https://github.com/PixarAnimationStudios/USD.git
cd USD
git checkout dev
cd ..
git clone https://github.com/vfxpro99/usd-build-club.git
mkdir stage
cd stage
../usd-build-club/build-prerequisites-macos.sh
pip install -U pyside
../usd-build-club/configure-macos.sh Xcode
cmake --build . --target install --config Release
Building USD this way will create a local cache of all the libraries USD depends on as well as USD itself.
Pick this method if you need to exercise absolute control over the libraries and don't want to mix them in with your system paths.
Run the following in your project directory:
git clone https://github.com/vfxpro99/usd-build-club.git
mkdir stage
cd stage
../usd-build-club/build-macos.sh
Building USD on macOS using Brew will install brew, USD's prerequisites, USD, and a local copy of python in your stage directory.
git clone https://github.com/vfxpro99/usd-build-club.git
mkdir stage
cd stage
../usd-build-club/build-macos-brew.sh
When the build is complete, run the following within a terminal to initialize the run time environment:
cd /path/to/my/stage
source ../usd-build-club/setvars-macos-brew.sh