快速入门:介绍
projectdefinition.txt
file.
The MAXON API SDK 包括在每次分发的 Cinema 4D . It is stored in the sdk.zip file. The content of this file can be extracted to any location. See SDK 概述 .
The SDK contains several frameworks that provide access to the API's functionality. For an overview see MAXON API Frameworks .
The SDK does not include IDE project files. The 工程工具 is used to create these project files for the supported operation systems. The tool is available for download on developers.maxon.net . The program can be installed to any location.
Simply run the 工程工具 on the command line. The g_updateproject argument is used to define the target folder. The tool will look into this folder and its sub-folders to search for MAXON API frameworks, projects and solutions. For more information see 工程工具 .
// Windows kernel_app_64bit.exe g_updateproject=C:\development\sdk
// MacOS kernel_app.app/Contents/MacOS/kernel_app g_updateproject=/Volumes/development/sdk
Use the Projet Tool as described above to create project files for solutions, plugins and frameworks. Then open the default solution located in "plugins/project".
This default solution includes the three example projects and all necessary frameworks. Simply build the complete solution to build all example projects.
For running Cinema 4D see 微软 Windows 开发 , macOS 开发 and Linux 开发 .
A new plugin project is added by creating a new folder in the SDK's "plugins" directory. This new folder must have two sub-folders:
projectdefinition.txt
file. This file defines the basic settings of a project. The project file is automatically generated based on these settings.
另请参阅 创建新插件工程 .
A typical example of a
projectdefinition.txt
file will look like this:
// 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
This new project must also be added to the solution defined in the "plugins/project" folder. This is done by editing the solution's
projectdefinition.txt
file. This example added a plugin called "newplugin":
// support Windows and macOS Platform=Win64; OSX
// this is a Solution Type=Solution
// included plugin projects Solution=\ plugins/cinema4dsdk;\ plugins/newplugin
To create the project files of the new plugin and to update the solution's project files one must again run the 工程工具 .
It is also possible to add a new solution project. See Custom Solutions
Existing classic API code must be adapted to work within a new MAXON API plugin. It is typically needed to remove references to deprecated classic header files and to include new MAXON API header files. Deprecated classes of the classic API must be replaced with new MAXON API classes.
见 API 过渡 , Replacements and 比较 .
A new plugin project can use all features of the MAXON API . For an overview see 插件开发 , API Features and MAXON API Frameworks .
For an introduction to the foundations of the MAXON API see 快速入门:基础 .