Skip to content

Commit

Permalink
[maya] remove support for building Maya USD libraries and plugins
Browse files Browse the repository at this point in the history
The Maya USD libraries and plugins that previously shipped with USD have
been adopted by Autodesk and are continuing to be developed in a separate
repository.

More information and the source code can be found here:

https://github.com/Autodesk/maya-usd

(Internal change: 2019777)
  • Loading branch information
mattyjams authored and pixar-oss committed Nov 7, 2019
1 parent feb2cae commit 702873e
Show file tree
Hide file tree
Showing 610 changed files with 13 additions and 254,389 deletions.
23 changes: 5 additions & 18 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ Support for OpenGL can optionally be disabled by specifying the cmake flag
that depend on GL, including:
- usdview
- Hydra GL imaging
- Maya and Katana app plugins
- Katana app plugins

##### OSL (OpenShadingLanguage)

Expand Down Expand Up @@ -209,10 +209,13 @@ More documentation is available [here](http://openusd.org/docs/RenderMan-USD-Ima
## Third Party Plugins

USD provides several plugins for integration with third-party software packages,
including Maya, Katana, Houdini, and Alembic. There is additional documentation on each plugin
including Katana, Houdini, and Alembic. There is additional documentation on each plugin
[here](http://openusd.org/docs/USD-3rd-Party-Plugins.html).
These plugins are not built by default and must be enabled via the instructions below.

The USD Maya plugins can be found in the Autodesk-supported repo available
[here](https://github.com/Autodesk/maya-usd).

##### Alembic Plugin

Enable the [Alembic](https://github.com/alembic/alembic) plugin in the build
Expand All @@ -237,22 +240,6 @@ support requires the following dependencies:

For further information see the documentation on the Alembic plugin [here](http://openusd.org/docs/Alembic-USD-Plugin.html).

##### Maya Plugin

Enable the Maya plugin in the build by specifying the cmake flag
```PXR_BUILD_MAYA_PLUGIN=TRUE``` when invoking cmake.

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

| Dependency Name | Description |
| ----------------- | ----------------------------------- |
| MAYA_LOCATION | The root path to a Maya SDK install |
| MAYA_tbb_LIBRARY | The location of TBB, this should be the same as TBB_tbb_LIBRARY provided to the core USD build |

See [3rd Party Library and Application Versions](VERSIONS.md) for version information.

For further information see the documentation on the Maya plugin [here](http://openusd.org/docs/Maya-USD-Plugins.html).

##### Katana Plugin

Enable the Katana plugin in the build by specifying the cmake flag
Expand Down
4 changes: 0 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,6 @@ if (${PXR_BUILD_KATANA_PLUGIN})
add_subdirectory(third_party/katana)
endif()

if (${PXR_BUILD_MAYA_PLUGIN})
add_subdirectory(third_party/maya)
endif()

if (${PXR_BUILD_HOUDINI_PLUGIN})
add_subdirectory(third_party/houdini)
endif()
Expand Down
53 changes: 4 additions & 49 deletions build_scripts/build_usd.py
Original file line number Diff line number Diff line change
Expand Up @@ -941,7 +941,7 @@ def InstallOpenSubdiv(context, force, buildArgs):
# all TBB libraries it finds, including libtbbmalloc and
# libtbbmalloc_proxy. On Linux and MacOS, this has the
# unwanted effect of replacing the system allocator with
# tbbmalloc, which can cause problems with the Maya plugin.
# tbbmalloc.
extraArgs.append('-DNO_TBB=ON')

# Add on any user-specified extra arguments.
Expand Down Expand Up @@ -1197,14 +1197,6 @@ def InstallUSD(context, force, buildArgs):
else:
extraArgs.append('-DPXR_BUILD_MATERIALX_PLUGIN=OFF')

if context.buildMaya:
if context.mayaLocation:
extraArgs.append('-DMAYA_LOCATION="{mayaLocation}"'
.format(mayaLocation=context.mayaLocation))
extraArgs.append('-DPXR_BUILD_MAYA_PLUGIN=ON')
else:
extraArgs.append('-DPXR_BUILD_MAYA_PLUGIN=OFF')

if context.buildKatana:
if context.katanaApiLocation:
extraArgs.append('-DKATANA_API_LOCATION="{apiLocation}"'
Expand Down Expand Up @@ -1271,9 +1263,9 @@ def InstallUSD(context, force, buildArgs):
built using the DCC's version of Python and not the system version. This can be
done by running %(prog)s using the DCC's version of Python.
For example, to build USD and the Maya plugins on macOS for Maya 2019, run:
For example, to build USD on macOS for use in Maya 2019, run:
/Applications/Autodesk/maya2019/Maya.app/Contents/bin/mayapy %(prog)s --maya --no-usdview ...
/Applications/Autodesk/maya2019/Maya.app/Contents/bin/mayapy %(prog)s --no-usdview ...
Note that this is primarily an issue on macOS, where a DCC's version of Python
is likely to conflict with the version provided by the system. On other
Expand Down Expand Up @@ -1450,16 +1442,6 @@ def InstallUSD(context, force, buildArgs):
subgroup.add_argument("--no-materialx", dest="build_materialx", action="store_false",
help="Do not build MaterialX plugin for USD (default)")

group = parser.add_argument_group(title="Maya Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--maya", dest="build_maya", action="store_true",
default=False,
help="Build Maya plugin for USD")
subgroup.add_argument("--no-maya", dest="build_maya", action="store_false",
help="Do not build Maya plugin for USD (default)")
group.add_argument("--maya-location", type=str,
help="Directory where Maya is installed.")

group = parser.add_argument_group(title="Katana Plugin Options")
subgroup = group.add_mutually_exclusive_group()
subgroup.add_argument("--katana", dest="build_katana", action="store_true",
Expand Down Expand Up @@ -1587,11 +1569,6 @@ def __init__(self, args):
# - MaterialX Plugin
self.buildMaterialX = args.build_materialx

# - Maya Plugin
self.buildMaya = args.build_maya
self.mayaLocation = (os.path.abspath(args.maya_location)
if args.maya_location else None)

# - Katana Plugin
self.buildKatana = args.build_katana
self.katanaApiLocation = (os.path.abspath(args.katana_api_location)
Expand Down Expand Up @@ -1696,29 +1673,13 @@ def ForceBuildDependency(self, dep):
if not context.buildPython:
pythonPluginErrorMsg = (
"%s plugin cannot be built when python support is disabled")
if context.buildMaya:
PrintError(pythonPluginErrorMsg % "Maya")
sys.exit(1)
if context.buildHoudini:
PrintError(pythonPluginErrorMsg % "Houdini")
sys.exit(1)
if context.buildKatana:
PrintError(pythonPluginErrorMsg % "Katana")
sys.exit(1)

# Error out if we're building the Maya plugin and have enabled Ptex support
# in imaging. Maya includes its own copy of Ptex, which we believe is
# version 2.0.41. We would need to build imaging against this version to
# avoid symbol lookup errors due to library version differences when running
# the Maya plugin. However, the current version of OpenImageIO requires
# a later version of Ptex. Rather than try to untangle this, we punt for
# now.
if context.buildMaya and PTEX in requiredDependencies:
PrintError("Cannot enable Ptex support when building the Maya "
"plugin, since using a separately-built Ptex library "
"would conflict with the version used by Maya.")
sys.exit(1)

# Determine whether we're running in Maya's version of Python. When building
# against Maya's Python, there are some additional restrictions on what we're
# able to build.
Expand All @@ -1733,7 +1694,7 @@ def ForceBuildDependency(self, dep):
except:
pass

if context.buildMaya and isMayaPython:
if isMayaPython:
if context.buildUsdview:
PrintError("Cannot build usdview when building against Maya's version "
"of Python. Maya does not provide access to the 'OpenGL' "
Expand Down Expand Up @@ -1840,7 +1801,6 @@ def ForceBuildDependency(self, dep):
HDF5 support: {enableHDF5}
Draco Plugin {buildDraco}
MaterialX Plugin {buildMaterialX}
Maya Plugin {buildMaya}
Katana Plugin {buildKatana}
Houdini Plugin {buildHoudini}
Expand Down Expand Up @@ -1890,7 +1850,6 @@ def FormatBuildArguments(buildArgs):
buildDraco=("On" if context.buildDraco else "Off"),
buildMaterialX=("On" if context.buildMaterialX else "Off"),
enableHDF5=("On" if context.enableHDF5 else "Off"),
buildMaya=("On" if context.buildMaya else "Off"),
buildKatana=("On" if context.buildKatana else "Off"),
buildHoudini=("On" if context.buildHoudini else "Off"))

Expand Down Expand Up @@ -1966,10 +1925,6 @@ def FormatBuildArguments(buildArgs):
The following in your PATH environment variable:
{requiredInPath}
""".format(requiredInPath="\n ".join(sorted(requiredInPath))))

if context.buildMaya:
Print("See documentation at http://openusd.org/docs/Maya-USD-Plugins.html "
"for setting up the Maya plugin.\n")

if context.buildKatana:
Print("See documentation at http://openusd.org/docs/Katana-USD-Plugins.html "
Expand Down
5 changes: 0 additions & 5 deletions cmake/defaults/CXXDefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,6 @@ _add_define(GLX_GLXEXT_PROTOTYPES)
# Python bindings for tf require this define.
_add_define(BOOST_PYTHON_NO_PY_SIGNATURES)

# Maya seems to require this
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
_add_define(LINUX)
endif()

if(CMAKE_BUILD_TYPE STREQUAL "Debug")
_add_define(BUILD_OPTLEVEL_DEV)
endif()
Expand Down
21 changes: 0 additions & 21 deletions cmake/defaults/Options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ option(PXR_BUILD_OPENCOLORIO_PLUGIN "Build OpenColorIO plugin" OFF)
option(PXR_BUILD_USD_IMAGING "Build USD imaging components" ON)
option(PXR_BUILD_USDVIEW "Build usdview" ON)
option(PXR_BUILD_KATANA_PLUGIN "Build usd katana plugin" OFF)
option(PXR_BUILD_MAYA_PLUGIN "Build usd maya plugin" OFF)
option(PXR_BUILD_ALEMBIC_PLUGIN "Build the Alembic plugin for USD" OFF)
option(PXR_BUILD_DRACO_PLUGIN "Build the Draco plugin for USD" OFF)
option(PXR_BUILD_HOUDINI_PLUGIN "Build the Houdini plugin for USD" OFF)
Expand All @@ -45,7 +44,6 @@ option(PXR_ENABLE_MULTIVERSE_SUPPORT "Enable Multiverse backend in the Alembic p
option(PXR_ENABLE_HDF5_SUPPORT "Enable HDF5 backend in the Alembic plugin for USD" ON)
option(PXR_ENABLE_OSL_SUPPORT "Enable OSL (OpenShadingLanguage) based components" OFF)
option(PXR_ENABLE_PTEX_SUPPORT "Enable Ptex support" ON)
option(PXR_MAYA_TBB_BUG_WORKAROUND "Turn on linker flag (-Wl,-Bsymbolic) to work around a Maya TBB bug" OFF)
option(PXR_ENABLE_NAMESPACES "Enable C++ namespaces." ON)

# Precompiled headers are a win on Windows, not on gcc.
Expand Down Expand Up @@ -171,25 +169,6 @@ if (${PXR_BUILD_KATANA_PLUGIN})
endif()
endif()

if (${PXR_BUILD_MAYA_PLUGIN})
if (NOT ${PXR_ENABLE_PYTHON_SUPPORT})
message(STATUS
"Setting PXR_BUILD_MAYA_PLUGIN=OFF because "
"PXR_ENABLE_PYTHON_SUPPORT=OFF")
set(PXR_BUILD_MAYA_PLUGIN "OFF" CACHE BOOL "" FORCE)
elseif (NOT ${PXR_ENABLE_GL_SUPPORT})
message(STATUS
"Setting PXR_BUILD_MAYA_PLUGIN=OFF because "
"PXR_ENABLE_GL_SUPPORT=OFF")
set(PXR_BUILD_MAYA_PLUGIN "OFF" CACHE BOOL "" FORCE)
elseif (NOT ${PXR_BUILD_USD_IMAGING})
message(STATUS
"Setting PXR_BUILD_MAYA_PLUGIN=OFF because "
"PXR_BUILD_USD_IMAGING=OFF")
set(PXR_BUILD_MAYA_PLUGIN "OFF" CACHE BOOL "" FORCE)
endif()
endif()

if (${PXR_BUILD_HOUDINI_PLUGIN})
if (NOT ${PXR_ENABLE_PYTHON_SUPPORT})
message(STATUS
Expand Down
4 changes: 0 additions & 4 deletions cmake/defaults/Packages.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,6 @@ if (PXR_BUILD_KATANA_PLUGIN)
)
endif()

if (PXR_BUILD_MAYA_PLUGIN)
find_package(Maya REQUIRED)
endif()

if (PXR_BUILD_HOUDINI_PLUGIN)
find_package(Houdini REQUIRED)
endif()
Expand Down
4 changes: 0 additions & 4 deletions cmake/defaults/gccclangshareddefaults.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,6 @@ if (NOT CMAKE_CXX_COMPILER_ID STREQUAL "Clang" OR
endif()
endif()

if (${PXR_MAYA_TBB_BUG_WORKAROUND})
set(_PXR_GCC_CLANG_SHARED_CXX_FLAGS "${_PXR_GCC_CLANG_SHARED_CXX_FLAGS} -Wl,-Bsymbolic")
endif()

# If using pthreads then tell the compiler. This should automatically cause
# the linker to pull in the pthread library if necessary so we also clear
# PXR_THREAD_LIBS.
Expand Down
10 changes: 0 additions & 10 deletions cmake/macros/Public.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,6 @@ function(pxr_library NAME)
set(options
DISABLE_PRECOMPILED_HEADERS
KATANA_PLUGIN
MAYA_PLUGIN
)
set(oneValueArgs
TYPE
Expand Down Expand Up @@ -260,15 +259,6 @@ function(pxr_library NAME)
if(args_KATANA_PLUGIN)
set(subdir "Libs")
endif()

# Maya plugins require the .mll suffix on Windows and .bundle on OSX.
if(args_MAYA_PLUGIN)
if (WIN32)
set(suffix ".mll")
elseif(APPLE)
set(suffix ".bundle")
endif()
endif()
else()
# If the caller didn't specify the library type then choose the
# type now.
Expand Down
4 changes: 2 additions & 2 deletions cmake/macros/generateDocs.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
import sys, os, argparse, shutil, subprocess, tempfile, platform, stat

# This finds all modules in the source area. For example, it will find ar,
# usdGeom, etc. in the pxr source area, or usdKatana, usdMaya, etc. in the
# third_party source area.
# usdGeom, etc. in the pxr source area, or usdKatana, etc. in the third_party
# source area.
def _getModules(sourceRoot):
modules = []
topLevel = []
Expand Down
Loading

0 comments on commit 702873e

Please sign in to comment.