R23 的变化

内容表

Changes in R23.110

通用二进制

Cinema 4D R23 Service Pack 1 supports both Intel-based and ARM-based Apple hardware via universal binaries. See 通用二进制 .

Changes

  • All ToString methods changed to have the formatStatement arguments as optional (default value = nullptr): it's recommended to adapt your implementation.
  • Added Output Syntax about possible string formatting options.

API Changes in R23.110 for the detailed list.

Deprecation

  • GetUVSeams is deprecated use the newly GetUVSeams2.
  • DataDescriptionDatabaseInterface::GetEffectiveEnumList is deprecated use the new override GetEffectiveEnumList with the const LanguageRef& language` argument.
  • SSLInterface::ADD_thread_state is deprecated.
  • SSLInterface::SSL_load_error_strings is deprecated.
  • SSLInterface::SSL_library_init is deprecated use SSLInterface::OPENSSL_init_ssl.
  • SSLInterface::TLSv1_method is deprecated use SSLInterface::TLS_method.
  • SSLInterface::TLSv1_1_method is deprecated use SSLInterface::TLS_method.
  • SSLInterface::TLSv1_2_method is deprecated use SSLInterface::TLS_method.
  • SSLInterface::SSLv3_method is deprecated use SSLInterface::TLS_method.
  • SSLInterface::SSLv2_method is deprecated use SSLInterface::TLS_method.
  • SSLInterface::SSLv23_method is deprecated use SSLInterface::TLS_method.

Fix

  • Fixed an issue with PythonLibrary::InitModule not working for module registered outside of "c4d" namespace.

Changes in R23.008

开发环境

Cinema 4D R23 is supported on Windows 10 and on macOS 10.15 (recommended) and macOS 10.14 . Developing Cinema 4D R23 requires Visual Studio 2019 and Xcode 11 on the respective operating systems.

R23 Compatibility with previous versions

Plugins built against previous versions are not compatible with Cinema 4D R23 and require a rebuild against the R23 API.
Minor code adoption could also be required to build against R23.

In R23 the source processor could generate more files and it's recommended to include them at the end of the corresponding header file as shown below.

#include "headerFileName1.hxx" #include "headerFileName2.hxx"

Classic API Resources Documentation

R23 API documentation includes a section concerning to the Classic API resources resulting by parsing the files located in {C4D Install Folder}/resource/modules/*.
The new content is located in Classic Resource overview .

The section enables browsing the Cinema 4D resources to find a particular ID for a given parameter or possible values for a Cycle parameter.

Scene Node

Scene Nodes is a technology preview of Cinema 4D future.
Due to the scope of the project, an API to directly access the provided functionalities is not yet available.
As a temporary fallback, it's possible to request and create a Classic API representation of the Scene Nodes output adopting the code below:

// Export Scene Nodes data BaseObject * scenenodesRoot = nullptr ; BaseSceneHook * scenenodes = doc->FindSceneHook( Int32 ( SCENENODES_IDS::SCENEHOOK_ID )); if (scenenodes == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION );

// Request reference to Neutron objects before scene hook execution is done. scenenodes-> 消息 ( Int32 ( SCENENODES_IDS::MSGUPDATE_LEGACYOBJ_ID ), &scenenodesRoot); if (scenenodesRoot == nullptr ) return maxon::UnexpectedError( MAXON_SOURCE_LOCATION );

// Do anything with the sceneNodeRoot object. It's similar than BaseDocument::GetFirstObject(), but for the Scene Node Root.

For the time being, Scene Nodes Classic API representation only output PolygonObject , Null, LineObject and InstanceObject in Multi-Instances mode.
材质 applied via any 材质 node, will result in the creation of a TextureTag . Vertex Map will result in the creating of a VertexMapTag .
Dirty bit for these Classic API objects should be reliable. They also have unique hashes:

It's worth to mention the activeobject.cpp example has been adapted to display Scene Nodes Classic API representation (see Project Hooks->Scene Nodes-> "CLASSIC_REPRESENTATION" within the plugin).

Execution Priorities

The EXECUTIONPRIORITY_SCENENODE has been added and it establishes a priority level higher than EXECUTIONPRIORITY_GENERATOR.

Array

A new maxon::Array template interface has been introduced. This new Array support COW (Copy-On-Write) reference and it allows to wrap any existing array-like implementation ( maxon::BaseArray , maxon::BlockArray ).

Scene Nodes uses this interface to access arrays (some PORT_BUNDLE have been replaced from BaseArray to Array).
However, rest assured the use of maxon::BaseArray , maxon::BlockArray is supported by Scene Nodes and conversion to the maxon::Array is granted using the maxon::ArrayFactory .

矩阵

The maxon::SqMat2, maxon::SqMat3 and maxon::SqMat4 structs have been renamed in maxon::SqrMat2 , maxon::SqrMat3 and maxon::SqrMat4 . This renaming does not affect the class member variables named "sqmat".

Limit<>::MAX/Limit<>::MIN

The maxon::Limit<>::MAX and maxon::Limit<>::MIN constants have been added for types in which they were missing and maxon::Limit<>::Max() and maxon::Limit<>::Min() have been replaced by the former two for types in which they were existing.

HashCode

Most of MAXON API elements such as maxon::MAXON_DATATYPE or Interface have now a GetHashCode method used to perform efficient comparison.
In R23 the implementation must return a maxon::HashInt and while, at the current time, a Uint64 is used, this may change to 128bits in the future without breaking compatibility.

The new DefaultHash class has a Combine function which allows combining HashInt values.

maxon::HashInt GetHashCode() const { maxon::DefaultHash hash; for ( const DescLevel & d : _subids) { hash. Combine ( maxon::DefaultCompare::GetHashCode (d.id)); } return hash;

// return maxon::DefaultHash::EMPTY_HASH in case of error. }

This code shall be used instead of hash = hash * 31 + value which was previously suggested.
The macro MAXON_HASHCODE(value) can also be used to compute the hash code of the arguments based on DefaultCompare::GetCombinedHashCode.

Finally the old hash mechanism is still available via the macro MAXON_HASHCODE_LEGACY(value) .

Python

Within the Release 23, Python version was updated from 2.7.14 to 3.7.7.
This is a significant internal change within Python although if the python.framework was previously used, porting the code to Python 3 should be rather easy.

If the deprecated Python Library (lib_py.h) is used, the only change needed is:

Finally:

Various Changes

API Changes in R23.008

API Changes in R23.008 for the detailed list.

BaseObject
定义: c4d_baseobject.h:224
maxon::DefaultHash
定义: hash.h:11
maxon::CompareTemplate< false >::GetHashCode
static MAXON_ATTRIBUTE_FORCE_INLINE HashInt GetHashCode(UInt32 h)
定义: compare.h:71
MAXON_SOURCE_LOCATION
#define MAXON_SOURCE_LOCATION
定义: memoryallocationbase.h:66
maxon::DefaultHash::Combine
void Combine(HashInt value)
定义: hash.h:52
DescLevel
Represents a level within a DescID.
定义: lib_description.h:286
BaseSceneHook
定义: c4d_basedocument.h:43
SCENENODES_IDS::MSGUPDATE_LEGACYOBJ_ID
@ MSGUPDATE_LEGACYOBJ_ID
Legacy Objects Update Message ID.
Int32
maxon::Int32 Int32
定义: ge_sys_math.h:58
C4DAtom::Message
Bool Message(Int32 type, void *data=nullptr)
定义: c4d_baselist.h:1394
maxon::HashInt
UInt HashInt
定义: apibase.h:322
SCENENODES_IDS::SCENEHOOK_ID
@ SCENEHOOK_ID
SceneHook ID.

Copyright  © 2014-2025 乐数软件    

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