3ds Max supports the development of Python-based tools and extensions so it can be customized and integrated into modern digital content creation pipelines. To enable this, 3ds Max integrates both the Python 2.7 and 3.7 interpreters, and exposes Python's rich functionality through two APIs, pymxs and MaxPlus. In addition, user interfaces for these Python-based tools can be created using the included PySide2 framework.
3ds Max includes a standard version of Python 3.7, located under [3ds Max Install]\Python37. You can use standard, pre-compiled extension libraries with this version of Python. This is now the default version for 3ds Max.
Note: MaxPlus is not supported under Python 3.
3ds Max includes a customized Python 2.7.15 interpretor and environment (3dsmaxpy.exe
). The Python modules are located in [3ds Max Install]\python\lib\site-packages. They were compiled with Visual Studio 2017, to be binary compatible with 3ds Max. CPython libraries must also be built with the same compiler to be compatible with the Python environment. Note: extension libraries should be installed outside of the 3ds Max install location.
Note: Python 3 is the default version. To enable Python 2, see Python 3 Support.
A pre-compiled version of PySide2 (also known as "Qt For Python") is installed with 3ds Max, and this is the preferred method for building UIs with Python. See Creating Python UIs for more information.
3ds Max offers two Python APIs to help you to extend and customize 3ds Max, and more easily integrate it into a Python-based pipeline:
The pymxs module contains a runtime member that provides access to the interfaces, functions, structures, objects, properties, and variables in the MAXScript environment, whether they are built in or defined by the user. This guide contains some examples of how to translate between MAXScript syntax and Python, but for a comprehensive list of everything available, see the MAXScript Help. For more information about pymxs see Using pymxs.
The Python MaxPlus module is built on top of the 3ds Max C++ SDK, but has limited functionality. It is a thin, auto-generated wrapper for some C++ classes, and requires some understanding of the C++ API. See the 3ds Max Developer Help for information about the C++ API. For more information see Using MaxPlus Python