SDK 概述

内容表

概述

The Cinema 4D SDK is the collection of frameworks and example projects available for third party developers to create Cinema 4D plugins. To use the SDK it is also necessary to get the 工程工具 .

SDK 安装

The sdk.zip file containing the frameworks and example projects is delivered with each version of Cinema 4D . This ZIP file can be extracted to any location on the file system.

注意
The needed project files for frameworks, solutions and plugins must be created using the 工程工具 .

Plugin development for Cinema 4D is currently supported on these platforms:

SDK Structure

The unzipped SDK contains two folders:

  • frameworks: Contains the header and source files for all frameworks. These frameworks define the MAXON API and give access to Cinema 4D 's functionality.
  • plugins: Contains the SDK solution and plugin projects. New plugin projects must be added to this folder.

解决方案

The development solution includes plugin and framework projects. It is automatically generated based on the settings of a projectdefinition.txt file. The master solution is located in the "plugins/project" folder. Additional custom plugins can be added to or removed from this solution by editing its projectdefinition.txt file. Alternatively one can create a custom solution.

// Configuration of the development solution projectdefinition.txt file

// support Windows and macOS Platform=Win64; OSX

// this is a Solution Type=Solution

// included plugin projects Solution=\ plugins/cinema4dsdk;\ plugins/newplugin

Custom Solutions

A new solution is simply added by creating a new sub-folder in the "plugins" folder. This folder must contain a custom projectdefinition.txt file.

For more details see projectdefinition.txt .

// Configuration of a custom solution in the projectdefinition.txt file

// support Windows and macOS Platform=Win64; OSX

// this is a solution Type=Solution

// included plugin projects Solution=\ plugins/pluginA;\ plugins/pluginB

// include natvis files in Visual Studio solution file AdditionalSolutionFiles=\ ..\..\frameworks\core.framework\project\typeviewer\msvc\maxon.natvis;\ ..\..\frameworks\cinema.framework\project\typeviewer\msvc\c4dapi.natvis

框架

A framework is a collection of source and header files that define a part of the MAXON API . It includes symbols, functions, data structures and interfaces. If a plugin project wants to access the functionality defined in such a framework it must include it in the project file (see below). The functionality presented in such frameworks is implemented in the modules delivered with Cinema 4D .

The functions, symbols and classes defined in these frameworks are commented using Doxygen syntax. Functions marked as "private" or "internal" must not be used by third party developers.

For an overview over all MAXON API frameworks see MAXON API Frameworks .

Custom Frameworks

A new framework is created by adding a new sub-folder to the "frameworks" folder. Framework names are typically using the suffix ".framework" e.g. "custom.framework" .

Such a framework folder must contain a "source" folder which will contain all source and header files of the framework. A "project" folder must contain the projectdefinition.txt file. For more details see projectdefinition.txt .

// Configuration of a custom framework in the projectdefinition.txt file

// support Windows and macOS Platform=Win64; OSX

// this is a framework Type=Lib

// this framework depends on the listed frameworks: APIS=core.framework

// framework ID ModuleId=com.examplecompany.myplugin.framework

A custom framework must be registered in a source code file in exactly one plugin (module). In this custom code a automatically generated hxx file must be included. The name of that hxx file is based on the framework's "ModuleId" (see 框架 ). E.g. for a framework named "com.examplecompany.myplugin.framework" the code would look like this:

#define MAXON_REGISTRATION_EXCLUDE_REFLECTION #define MAXON_REGISTRATION_EXCLUDE_REFLECTION_NONVIRTUAL #include "registration_com_examplecompany_myplugin_framework.hxx"

Example Plugins

The "plugins" folder contains these example plugin projects:

Custom Plugins

A new plugin is added by creating a sub-folder in the "plugins" folder. The suffix ".module" is used to identify plugins that purely use the MAXON API and do not use any classic API code. See 插件、模块和依赖 .

The "source" folder of such a plugin must contain the source code files. The "project" folder contains the projectdefinition.txt file that describes the plugin:

// Configuration of a custom plugin in the projectdefinition.txt file

// support Windows and macOS Platform=Win64; OSX

// this is a plugin Type=DLL

// this plugin depends on these frameworks: APIS=\ cinema.framework; \ misc.framework; \ image.framework; \ core.framework

// defines the level of rigour of the source processor's style check stylecheck.level=3

// plugin/module ID ModuleId=com.examplecompany.myplugin

另请参阅 projectdefinition.txt and 插件开发 .

Scripts and Tools

The complexity of the MAXON API requires the automation of various processes using custom tools:

延伸阅读

OSX
OSX
OS X.
定义: ge_prepass.h:3324

Copyright  © 2014-2025 乐数软件    

工业和信息化部: 粤ICP备14079481号-1