Linux 开发
Plugin development on Linux is supported only on Ubuntu 14.04 LTS and CentOS 7.0 The following components are required:
The web site http://www.vfxplatform.com describes a Linux runtime reference environment. As Cinema 4D links statically to almost all external libraries, there should be no real problem meeting this reference platform.
The following suffixes are supposed to be used for compiled plugins:
Linux specific code can be guarded with the macro MAXON_TARGET_LINUX:
#ifdef MAXON_TARGET_LINUX #endifBuilding the SDK examples provided with Cinema 4D on Linux is done through the following steps:
Building the SDK examples provided with Cinema 4D on Linux is done through the following steps:
The main project file "SConstruct.plugins" expects the GCC executable files to be in /usr/local/gcc/gcc/bin . Creating symbolic link to gcc and g++ is recommended rather than editing "SConstruct.plugins" To look for a specific gcc version residing in /usr/local/gcc/<gcc-version>/bin use:
$ scons -f plugins/project/SConstruct.plugins gcc_version=<gcc-version>Cinema 4D for Linux is solely available as command-line render (c4d_clr) and is supposed to run in a terminal window without GUI. Assuming Cinema 4D is installed in /opt/maxon/cinema4d/<c4d-version>/ , the command line is:
$ cd /opt/ maxon /cinema4d/<c4d-version>/bin $ . ./setup_c4d_env && ./Commandline <optional arguments>It is possible to start Cinema 4D to run and debug a plugin:
Additionally one can set the command line argument g_runUnitTests to automatically execute custom unit tests.
The binary plugin build for debugging is created specifying config="debug64" .
$ scons -f plugins/project/SConstruct.plugins config= "debug64"The Terminal window displays messages printed with DiagnosticOutput() 。见 Debug and Output Functions .
For general information on debugging see 调试 .