The Python API in R18 brings important additions and more C++ API coverage. It also carries some API changes and fixes several issues.
c4d.modules.mograph.GeGetMoDataWeights()
supports the weights workflow
c4d.VertexColorTag
class allows to access the Vertex Color tag and its data
c4d.modules.colorchooser
is a new API for the Color Chooser swatches
c4d.modules.substance
provides functions to handle Substance shaders and graphs
c4d.modules.motiontracker
allows to retrieve object tracking data
c4d.BaseObject
,
c4d.CKey
,
c4d.CCurve
and
c4d.CTrack
c4d.Vector4d
class allows to manipulate four-dimensional vectors (e.g. RGB colors with alpha value for Vertex Colors)
BaseDraw.DrawHUDText()
and
BaseDraw.DrawMultipleHUDText()
Here are the additions in R18 for the ongoing effort on parity with the C++ API:
NodeData.GetDDescription()
/
NodeData.GetDParameter()
/
NodeData.SetDParameter()
and enhanced
c4d.Description
class
c4d.modules.bodypaint.CallUVCommand()
and
c4d.modules.bodypaint.GetActiveUVSet()
/
c4d.modules.bodypaint.FreeActiveUVSet()
c4d.utils.InitBakeTexture()
/
c4d.utils.BakeTexture()
c4d.plugins.ObjectData
Automated Handle Interface:
GetHandle()
/
SetHandle()
/
GetHandleCount()
c4d.gui.BaseCustomGui
class is no longer empty and now provides the same methods as in C++ (e.g.
BaseCustomGui.GetData()
/
BaseCustomGui.SetData()
)
c4d.InExcludeData
missing methods,
c4d.modules.mograph.GeGetMoDataSelection()
ReflectionLayer.GetName()
/
SetName()
,
ReflectionLayer.GetLayerID()
and
ReflectionLayer.GetFlags()
/
SetFlags()
FalloffData.Draw()
return value changed from bool to
DRAWRESULT
. Returning a bool is still supported for backward compatibility
ID_MODELING_KNIFE_TOOL was removed
HyperFile.WriteFloat32()
writes wrong value and corrupts stack
c4d.modules.render.InitRenderStruct
not correctly initialized with a document
BaseList2D.SetLayerObject()
parameter
layer
can be
None
TextureTag.GetMaterial()
can now be passed parameter
ignoredoc
. The parameter is optional and by default
True
for backward compatibility
GeDialog.Message()
when message
BFM_WEIGHTS_CHANGED
was received
SplineHelp.GetLineObject()
crashes if not initialized with
SPLINEHELPFLAGS_RETAINLINEOBJECT
c4d.VoronoiFracture
allows to access and create Voronoi fracture objects
GeSetMoDataSelection()
and
GeSetMoDataWeights()
set
MoGraph
clones selection and weights
c4d.utils.RadToDeg()
and
c4d.utils.DegToRad()
functions have been added. These functions should be used instead of
c4d.utils.Deg()
and
c4d.utils.Rad()
c4d.modules.bodypaint.CallUVCommand()
does not change UV data
TakeData.GetTakeSelection()
is broken
c4d.VoronoiFracture
:
VoronoiFracture.py
PolygonObject.GetNgonEdgesCompact()
c4d.plugins.ObjectData
Automated Handle Interface functions
GetHandle()
/
SetHandle()
/
GetHandleCount()
The addition of
GvNode.OperatorSetData()
allows to simulate dragging onto an XPresso node
BaseObject.GetHierarchyClone()
/
BaseObject.GetAndCheckHierarchyClone()
Also the functions no longer return only
None
when the cloned object is
None
. It has been changed to always return a dictionary with
clone
and
dirty
keys
With these changes
BaseObject.GetHierarchyClone()
/
BaseObject.GetAndCheckHierarchyClone()
have the same behavior as their C++ API counterparts
MessageData
timer fires too often
c4d.Cast()
returns a copy of a
BaseContainer
instead of a reference
CallUVCommand()
settings
c4d.GenerateTexturePath()
freezes if called with a
NetRenderService
and/or a
BaseThread
BaseDraw.DrawPoints()
vc
and
vn
optional parameters can be
None
DescID.IsPartOf()
cmp
parameter cannot be None
UVWTag.CpySlow()
Description.GetParameterI()
crashes
See API Changelist R18 page.