快速入门:介绍

内容表

概述

  • The SDK is included in every distribution of Cinema 4D and is stored in the sdk.zip file.
  • The 工程工具 can be obtained from developers.maxon.net .
  • The 工程工具 must be used to create project files for frameworks, plugins and solutions.
  • The example plugins can be build with the solution in "plugins/project".
  • A new plugin can be added by creating the plugin folder and defining the projectdefinition.txt file.
  • Such a new plugin must be added to a solution.
  • Existing plugins must be adapted to the Cinema 4D R20 SDK, see API 过渡 .
  • The "classic" API is available in cinema.framwork.
  • The new MAXON API is defined in core.framework and further frameworks.

Getting the SDK

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 .

Creating Project Files

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 工程工具 .

注意
Run the Project Tool on the complete SDK folder to create the needed project files for all frameworks, plugins and solutions.
// This example shows how to run the Project Tool using command line arguments.

// Windows kernel_app_64bit.exe g_updateproject=C:\development\sdk

// MacOS kernel_app.app/Contents/MacOS/kernel_app g_updateproject=/Volumes/development/sdk

Build the SDK Examples

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 开发 .

Creating a Plugin Project

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:

注意
The Project Tool will add all source code files found in the project folder to the project file. The Source Processor will only process source code files in the "source" folder.

另请参阅 创建新插件工程 .

A typical example of a projectdefinition.txt file will look like this:

// 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

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":

// 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

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

Update Classic API Code

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 比较 .

Use new API

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 快速入门:基础 .

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

Copyright  © 2014-2025 乐数软件    

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