SDK Change Notes for Cinema 4D 2024.0¶
Summarizes the API and API documentation changes made between Cinema 4D version 2023.2.0 and 2024.0.0.
Documentation Changes¶
Major Changes¶
Updated the python version used by Cinema 4D to 3.11.4 (previously was 3.10.8.) including improved 10-60% faster Python and fine-grained error locations. This update should not break API for your plugins or scripts, but check the Python 3.11 Changelog to ensure that. Due to this update the environment variable to add new entry to the sys path was updated to C4DPYTHONPATH311 and the pref folder is now python311. For more information on this topic read Python Libraries Manual.
The 2024.0 version of Cinema 4D bring performance improvement and therefor the C++ API changed drastically, however except for
c4d.Gradient
,c4d.modules.mograph.C4D_Falloff
and field sampling this update should not break the API for your plugins or scripts. However we recommend you to take a close look at the API changelog since some methods or arguments have been marked as deprecated and will be removed in 2025.0 which will break compatibility in some cases.The
c4d.Gradient
have been reworked, now you should callGradient.PrepareRenderData()
and call CalcGradientPixel from the previously returned object.- Fields sampling have been reworked, however due to time constraint the next methods have not been ported and are not working, we are going to fix it in an upcoming release:
- Introduced a new
mxutils
, providing Python API helper functions and classes. mxutils.IdProvider
, generates int or maxon.Id identifiers when defining them manually is not desirable.mxutils.LocalImportPath
, provides a context manger to import from packages relative to a file which do not lie in a module search path.mxutils.CheckIterable()
, checks item for being an iterable of a specific type, being composed of specific elements, or being of specific length.mxutils.CheckType()
, checks item for being of type t.mxutils.ImportSymbols()
, parses elements of all resource files contained in the given path into the global scope of the caller or into a dictionary.
- Introduced a new
The Visual Studio Code Exchanger, require at least Visual Studio Code 1.78 to work with Cinema 4D 2024.0.
Reworked how Python Documentation index page looks like and improved the Python Manuals Listing.
Minor Changes¶
Added
Gradient.SetAlphaGradient()
to define the alpha channel of a gradient in Python.Added new argument isCloneInit to
NodeData.Init()
to determine if this is a new instance or the instance is cloned from another one.Fixed a crash when an int was used as first operand of any mathematical operation with a
c4d.BaseTime
.Fixed a crash when None was passed to
maxon.NimbusBaseInterface.SetPath()
.Fixed missing VS Code Exchange button in Script Manager.
Fixed an issue with the Symbol Parser not being able to properly parse
maxon.Id
.Fixed an issue with the Symbol Parser not being able to properly parse
maxon.LiteralId
.Fixed an issue with the Symbol Parser not being able to properly parse classic API C++ define.
Fixed documentation of
Mt2dTrackData.GetTrackIndices()
which had its arguments not marked as optional.Fixed missing finalValue argument in the
TreeViewFunctions.GetFloatValue()
documentation.Improved documentation of
TreeViewFunctions.GetFloatValue()
andTreeViewFunctions.SetFloatValue()
.Improved documentation of
DescID.__init__()
.Improved documentation of
Gradient.GetAlphaGradient()
.Added examples for basic node material tasks on Github.
API Changes¶
Classic API¶
Added
PolygonObject.GetEdgeCount()
.Added
FalloffData.CheckDirty()
.Added
Gradient.PrepareRenderData()
.Added
Gradient.CopyFrom()
.Added
Gradient.GetChecksum()
.Added
Gradient.GetGradient()
.Added
Gradient.SetGradient()
.Added
Gradient.SetAlphaGradient()
.
Added new argument isCloneInit to
NodeData.Init()
.Added new argument op to
C4D_Falloff.Sample()
.Added new argument op to
C4D_Falloff.MultiSample()
.Added new argument op to
C4D_Falloff.AddFalloffToDescription()
.Added new argument op to
C4D_Falloff.Message()
.Added new argument op to
C4D_Falloff.Draw()
.Added new argument op to
C4D_Falloff.CopyTo()
.Added new argument op to
C4D_Falloff.GetDirty()
.
Added new optional argument sendNotification to
BaseDocument.InsertObject()
.Added new optional argument setDirty to
BaseList2D.SetName()
.Added new optional argument create to
FieldList.GetLayersRoot()
.Added new optional argument create to
BaseList2D.GetCTrackRoot()
.Added new optional argument create to
BaseList2D.GetNLARoot()
.Added new optional argument buttonStyle to
GeDialog.AddButton()
.Added new optional arguments bc and id to
Gradient.ConvertToAlphaGradient()
.Added new optional argument onlyVisible to
ViewportSelect.GetNearestPoint()
.Added new optional argument onlyVisible to
ViewportSelect.GetNearestEdge()
.Added new optional argument isNormalized to
c4d.utils.MatrixToHPB()
.Added new optional argument parentBc and cType to
C4D_Falloff.__init__()
.Added new optional argument data to
C4D_Falloff.InitFalloff()
.
Changed argument type of node from the
PriorityList.Add()
method, previously wasc4d.GeListNode
now itsc4d.BaseList2D
.
Fixed a typo in MENURESOURCE_SEPERATOR. The new symbol is MENURESOURCE_SEPARATOR.
Deprecated
BaseList2D.GetData()
, internally callBaseList2D.GetDataInstance()
.The argument hh of
BaseObject.AddDependence()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.InitFalloff()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.GetHandleCount()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.GetHandle()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.SetHandle()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.GetDirty()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.SetMode()
is deprecated and will be removed in 2025.0.0.The argument bc of
C4D_Falloff.SetTime()
is deprecated and will be removed in 2025.0.0.
Removed
BaseShader.HasGPURendererSupport()
.Removed
BaseDraw.IsMarkedAsGPURenderer()
.Removed
BaseDraw.IsGPURenderer()
.Removed
FalloffData.FreeFalloff()
.Removed
Gradient.InitRender()
. Instead callGradient.PrepareRenderData()
orGradient.PrepareRenderDataWithAlpha()
.Removed
Gradient.FreeRender()
.Removed
Gradient.CalcGradientPixel()
. Instead callmaxon.GradientRenderDataInterface.CalcGradientPixel()
.Removed argument falldata from
FalloffData.Init()
.
Maxon API¶
Added
maxon.GradientKnot
.Added
maxon.GradientInterface
.Added
maxon.Gradient
.Added
maxon.GradientRenderData
.
Added new optional arguments convertWindowsBackslashes to
maxon.UrlInterface.SetPath()
.