Changes in R16

Changes in R16.021

Development Environment Requirements

  • Minimum OS requirement are Windows 7 (or newer) and OS X 10.8.5 (or newer).
  • On Windows, Microsoft Visual Studio 2012 (or newer) is required.
  • On OS X, Xcode 5.0.2 (or newer) is required.

Naming Changes

If you have not transitioned yet to the R15 naming schemes and still use the __LEGACY_API preprocessor define we strongly recommend to do this now!

File/Folder Structure

R16 brings a different file structure: the SDK is now located in frameworks folder and the API definitions in the cinema.framework/source subfolder.
The cinema4dsdk examples project can now be found in plugins/examples.
Most notably the resources are in a centralized place. All the description headers that Cinema 4D offer can now be found in frameworks/cinema.framework/source/description.
This allows to move plugins along with the frameworks folder to any location on hard disk. The whole installation was previously necessary to access the description definitions.
It is also not needed anymore to search the directory where a description is defined in the resources for the include statement.
For instance Cinema 4D's descriptions headers can now be simply included writing:

For plugins nothing has changed but if any of the internal resources is referenced make sure the paths are updated.

Project Settings

New folder frameworks/settings contains .xcconfig files (XCode) and .props files (Visual Studio) base definitions for the different targets and compilers.
Under Visual Studio add the file cinema.framework.includes.props (in frameworks/cinema.framework/project) to a plugin project and this will automatically add the necessary include directories for the API.
It is then no longer needed to manually add all kinds of API include paths to the project settings.

API Changes in R16.021

R16 brings minor changes and some additions.

See API Changes in R16.021 for the detailed list.

Changes in R16.038

Cinema 4D R16.038 brings some changes.

New Color Property for TP Particles

A new color property has been added to Thinking Particles. See IN_PART_COLOR and OUT_PART_COLOR.
TP_MasterSystem has Color() and SetColor() new methods.

To preserve the old behavior PGROUP_USE_COLOR parameter has been added to Particle Groups.
Also TP_PGroup class has GetUseColor() and SetUseColor() new methods.

ChannelData::GetCurrentCPU()

ChannelData::GetCurrentCPU() has been added to support Multiprocessing in Channel Shaders computation with no VolumeData passed.
This change only affects shaders that store (and preallocate) information per CPU index.

Let say we write a Channel Shader that uses dynamic arrays during its operation. It would be inefficient to allocate and free the arrays every single time ShaderData::Output() is called.
So in ShaderData::InitRender() we query InitRenderStruct::vd->GetCPUCount() (or assume 1 if InitRenderStruct::vd is nullptr) and preallocate those structures. For example:

struct MyPerThreadStructure
{
// Declare your thread dynamic data here
};
class MyChannelData : puiblic ChannelData
{
...
private:
PointerArray<MyPerThreadStructure> _threadArray;
};

Note that the _threadArray must be a PointerArray (and not a BaseArray), otherwise a lot of False Sharing would be given which would dramatically decrease performance.

So given this setup a variety of combinations how calls are made from Cinema 4D can happen:

1.)

2.)

3.)

GeIsMainThreadAndNoDrawThread()

GeIsMainThreadAndNoDrawThread() has been added to check if code is run from within the main thread of Cinema 4D and if the main thread is not executing any draw code.

Miscellaneous Changes

MSG_DOCUMENTINFO_TYPE_RENDER_CLONE has been renamed to MSG_DOCUMENTINFO_TYPE_SWAP_XREF and made private.
The message was misused and the new naming makes it clear for what it is used.

The macro __FLOAT_32_BIT has been renamed to MAXON_TARGET_SINGLEPRECISION.

Descriptions headers xskyshadervolume.h and xxmbreflection.h have been removed.

Documentation Changes

Added note to BITMAPBUTTON_TOOLTIP.

API Changes in R16.038

See API Changes in R16.038 for the detailed list.

Changes in R16.050

Cinema 4D R16.050 brings minor changes.

Thinking Particles

The most important additions in R16.050 are related to Thinking Particles:

New Description Headers

The following description headers have been added:

Miscellaneous Changes

MSG_XREFINIT new message and its related struct XrefInitData.

EXECUTIONPRIORITY_FORCE new flag for the execution pipeline.

CheckEditorVisibility() new function.

API Changes in R16.050

See API Changes in R16.050 for the detailed list.

ocamera.h
ChannelData
Definition: c4d_shader.h:952