Plugins that were written and build with older versions of the
Cinema 4D
C++ SDK (R19 or older) will not work in
Cinema 4D
R20. It is needed to adapt the plugin source code and re-compile the plugins for use with
Cinema 4D
R20.
The first steps are:
-
Get the
工程工具
from
developers.maxon.net
.
-
Unzip the sdk.zip file that is part of the
Cinema 4D
installation.
-
Run the Project Tool to create the needed project files.
-
Open the "project" solution and build the example projects.
-
Create a new plugin project, see
快速入门:介绍
.
-
Configure the projectdefinition.txt to disable code style checks. See
样式检查
.
-
Run the Project Tool to create the needed project files.
-
Open the "project" solution to edit your source code.
The typical tasks needed to adapt existing code are:
-
The names of language folders must be updated. See
插件资源
.
-
"include" statements may have to be added or removed.
-
The global resource instance must be renamed to g_resource.
-
The structure of enumeration values must be adapted.
-
"Classic" data types must be replaced with new
MAXON API
data types.
-
Error objects returned by functions must be handled.
-
Member functions must be adapted to a new naming scheme.
-
注意
-
When migrating a pre-R20 plugin, besides the changes needed in the code, both the Visual Studio and Xcode project files should also be re-created from scratch. Beware of using pre-R20 IDE project files to build R20 plugins. Instead, as pointed out above, create a new plugin project and use the Project Tool to create the new IDE project files.
More information can be found here: