Cinema 4D SDK Overview
-
Cinema 4D SDK
This section contains the links and overview for both the Cinema 4D Python and C++ SDK.
- Python SDK: The Python API is targeted at artists and a great point to get to know the Cinema 4D API.
- C++ SDK: The C++ API offers the full feature set of the public Cinema 4D API and is targeted at developers who seek performant solutions and deep access into Cinema 4D.
Happy coding,
the Maxon SDK GroupThis topic deliberately has been left open for on-topic questions. Due to its informative purpose, this topic will be strictly moderated.
-
Cinema 4D Python SDK
The Cinema 4D Python SDK offers a subset of the features of the C++ SDK and is targeted at artists and developers who favor development speed over having the full API at their fingertips.
Quickstart
- Online Python Documentation: The official Cinema 4D Python documentation. To bookmark a link to the most recent version of the documentation, bookmark
developers.maxon.net/docs/py/
(when you bookmark a link you followed, you will bookmark a specific version). - Offline Python Documentation: The Python documentation to store locally, unlike the online version, you cannot switch between multiple versions here.
- Python Script Examples: The Python SDK code examples for writing Script Manager scripts and abstract subjects demonstrated in Script Manager scripts.
- Python Scene Examples: The Python SDK code examples for writing code for Scripting Objects.
- Python Plugin Examples: The Python SDK code examples for writing code for Plugins.
Features
Cinema 4D loosely makes the distinction between scripting, small pieces of Python code that can be written in and executed from a running Cinema 4D executable, and plugins, more elaborate Python code that must already be present in the boot sequence of the executable. The most important manuals for getting started with scripting can be found in the Scripting Section.
A second class of scripts are the Scripting Objects. They offer a qucik way to implement objects, tags, and fields and more in Cinema 4D without having to write a full plugin. The most complex Python solutions are Plugins. Apart from finer API details, the biggest differences to the C++ API are that one cannot implement render engines, video post effects, materials, description based tools, or custom description GUIs and data types.
Runtime Environment
Cinema 4D uses internally a standard CPython based interpreter. It can be run in two ways:
- Cinema 4D Executable: This is the primary manner to run Python in Cinema 4D, it allows you to running plugins, Script Manager scripts, or Python scene element scripts.
- c4dpy Executable: This file is located next to the Cinema 4D executable, and it is a headless Cinema 4D instance that provides a REPL-like interactive interpreter experience. Headless means that this is a full Cinema 4D instance with all plugins laoded and capabilities enabled, execpt for everything that is GUI related.
Although our Python interpreter is based on CPython, it is not identical to it. Our library is for example missing the
tkinter
package. We also offer only limited support for installing complex third party Python libraries, see Python Libraries for details.Unlike for the C++ SDK, one does not need to include frameworks to get started. Cinema 4D comes with all the necessary libraries. The version of the interpreter depends on the version of Cinema 4D that is running. The current Cinema 4D Python interpreter version is:
- Windows: Python 3.11.4 (pipelines/893915622:c23be21, Jun 8 2023, 15:31:26) [MSC v.1929 64 bit (AMD64)]
- Mac OS: Python 3.11.4 (pipelines/893543668-dirty:1e04aba, Jun 8 2023, 11:27:02) [Clang 14.0.0 (clang-1400.0.29.202)]
Cinema 4D Version Python Version R20, R21, S22 CPython 2.7 R23 CPython 3.7 S24 CPython 3.9 S24, R25, S26, 2023.0, 2023.1 CPython 3.9 2023.2 CPython 3.10 2024.0+ CPython 3.11 - Online Python Documentation: The official Cinema 4D Python documentation. To bookmark a link to the most recent version of the documentation, bookmark
-
Cinema 4D C++ SDK
The Cinema 4D C++ SDK offers the full tool set of the public Cinema 4D API. It is an excellent choice for experienced developers who want to implement computationally demanding plugins or plugin types such as custom render engines or material systems that are exclusive to the C++ API.
Quickstart
- Online C++ Documentation: The most recent Cinema 4D C++ online documentation. To bookmark a link to the most recent version of the documentation, bookmark
developers.maxon.net/docs/cpp/
(when you bookmark a link you followed, you will bookmark a specific version). - Offline C++ Documentation: The official most recent Cinema 4D C++ offline documentation. Unlike the online version, you cannot switch between multiple versions here.
- C++ Code Examples: The C++ SDK code examples. You will need the frameworks provided in an
sdk.zip
to run these. - Project Tool: A tool to generate Visual Studio and XCode solutions for Cinema 4D C++ API projects.
- SDK Database: The SDK Asset API database, containing assets used by code examples.
To be able to compile the code examples, one requires t+the frameworks provided in the
sdk.zip
of a Cinema 4D installation. See Getting Started for details.Development Environment
To build plugins for a specific SDK, one must meet the development environments listed below. And while it might be possible to deviate from these requirements from time to time, doing so will be out of scope of support; when you run into technical problems and ask for support, we will ask you to match the required environment.
The Application Binary Interface (ABI) marks the range of compatibility of SDKs and plugins compiled for them. All versions that are binary compatible with each other can run your plugin, if the SDK version is equal to or lower than the Cinema 4D version. So, a plugin compiled for R21.0 will also run in R21.1, S22.0, and S22.1 because they all share one ABI. But you cannot run a plugin compiled for S22.0 (using S22.0 features) in R21.0. For the greatest range of compatibility, it is therefore often best to compile for the earliest version within an ABI one can use for the feature one requires.
Release ABI Windows macOS Linux 2024 2023904 VS 2019/22 Xcode 13 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 2023 2022901 VS 2019 Xcode 13 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 S26 25004 VS 2019 Xcode 12 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 R25 25004 VS 2019 Xcode 12 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 S24 23004 VS 2019 Xcode 12 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 R23 23004 VS 2019 Xcode 11 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 S22 21014 VS 2019 Xcode 11 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 R21 21014 VS 2017 Xcode 10 GCC 9.3.1.12, glibc 2.17, Python 3, Scon 3.1.2 - Online C++ Documentation: The most recent Cinema 4D C++ online documentation. To bookmark a link to the most recent version of the documentation, bookmark