What is New in R21¶
R21¶
MAXON API¶
Clear and consistent naming convention.
Modularity concept.
Consistent object creation.
Error handling; in Python, exceptions are raised when something went wrong.
C4DPY¶
c4dpy.exe/app, is now bundled with the Cinema 4D standard installation process.
For more information, see c4dpy.
Version and License¶
c4d.GeGetSystemInfo()
was changed.
c4d.IsTrial()
Checks if the current license is a Trial version.
c4d.IsLiteVersion()
Checks if the current license is a Lite version.
c4d.IsEducation()
Checks if the current license is an Education version.
c4d.IsNFR()
Checks if the current license is an NFR (Not For Resell).
c4d.GeGetCinemaInfo()
returns a information about the current license used.
c4d.ExportLicenses()
returns a JSON string representation, with the license data.import c4d import json data = json.loads(c4d.ExportLicenses()) print data["username"]
c4d.GetGeneralLicensingInformation()
returns information about the currently used license.
c4d.GeGetVersionType()
return value was modified since the package versions changed.c4d.GeGetSerialInfo()
was modified in order to reflect the new license scheme and should no longer be used by third parties.See py-licensing-example in Github repository.
Token¶
It’s now possible to register your own token using c4d.plugins.RegisterToken()
or c4d.plugins.RegisterHiddenToken()
.
See py-render_token example in Github repository.
Fields¶
It’s now possible to creates masks within a c4d.FieldList
with the next methods:
FieldLayer.AddMask()
: Add a new mask.
FieldLayer.RemoveMask()
: Remove a mask.
FieldLayer.GetMaskHead()
: Retrieve thec4d.GeListHead
containing all masks.
c4d.modules.mograph.FieldOutput
and c4d.modules.mograph.FieldOutputBlock
now support pivot which correspond to the velocity with the next functions/attributes:
Volume¶
Cinema 4D R21 support vector volume so maxon.frameworks.volume.VolumeToolsInterface
was enhanced with:
Finally, maxon.frameworks.volume.VolumeInterface.GetMinMaxValues()
was added to retrieve the range of value stored in the volume.
MSG_GETCUSTOMICON and MSG_GETCUSTOMICON_SETTINGS¶
c4d.CustomIconSettings
and c4d.IconData
was introduced to fully support it.c4d.IconData
represents an icon from the C4D icon bitmap.c4d.CustomIconSettings
represents the settings to be filled in the MSG_GETCUSTOMICON to configure the display of the icon.
c4d.gui.GetInterfaceIconEx()
similar toc4d.gui.GetInterfaceIcon()
but it returns ac4d.IconData
instead of a dictionary.
BaseList2D.GetIconEx()
similar toBaseList2D.GetIcon()
but it returns ac4d.IconData
instead of a dictionary.
BitmapButtonCustomGui.SetImage()
was modified to support IconData
as input type for obj picture.IconData
directly, useDat should be set as True and define the IconData
in the dat entry of the dictionary.c4d.CustomIconSettings
.Miscellaneous¶
BaseDocument.RenderDocument()
now support callback, so it’s possible to know the current progress of the render launched.BaseContainer.__setitem__()
,BaseContainer.__getitem__()
andGeListNode.__setitem__()
,GeListNode.__getitem__()
now supports:BaseList2D.SetLayerData()
andBaseList2D.GetLayerData()
now contain xref information.GeDialog.GetDragObject()
,GeUserArea.GetDragObject()
andTreeViewFunctions.GetDragType()
now support:DRAGTYPE_BROWSER: list[str] list of dragged filenames.
DRAGTYPE_RGB_ARRAY: list[
c4d.Vector
] list of dragged colors.DRAGTYPE_RGBA_ARRAY:
maxon.BaseArray
(maxon.ColorA
) list of dragged color with alpha.
GeUserArea.HandleMouseDrag()
now support DRAGTYPE_RGBA_ARRAY.c4d.documents.GetAllAssets()
, now also returns information about node space.
Fixes¶
Fixed a memory leak in
bitmaps.InitResourceBitmap()
.Fixed a memory leak in
GeUserArea.HandleMouseDrag()
.Fixed an issue where the default script of the Python MoGraph Effector didn’t work.
Fixed an issue where
c4d.modules.mograph.GeSetMoDataWeights()
andc4d.modules.mograph.SetMoDataSelection()
didn’t not set dirtyFixed an issue where lPoints parameter was marked as optional while it wasn’t in reality in the next functions:
Fixed an issue where
GvNode.AddPort()
failed to create basics port(on, object, etc) in Xpresso.Fixed an issue where
VariableTag.GetAllHighlevelData()
andVariableTag.SetAllHighlevelData()
used Uint16 instead of int16 for Tnormal.Fixed an issue where
VariableTag.GetAllHighlevelData()
returned data were shifted and not complete for Tnormal.Fixed an issue where bool should be returned instead of an int:
Fixed an issue where C4D_SCRIPTS_DIR with multi directory separated with “;” are not working
Fixed an issue where
LoggerInterface.Write()
failed.Fixed an issue where
BaseArray.__str__()
failed if the BaseArray was created from C++.
Fixed an issue with the Python Console: Cursor is set to 0 after a clean.
Fixed an issue with the Python Console: Dragged UserData get wrong ID when created from copy.
Fixed an issue with the Python Console: Dragged object are renamed.
Fixed an issue with the Python Script Manager: Python auto indent broken in script manager.
Fixed an issue with the Python Script Log and Commander: Commander (Shift+C) commands doesn’t show in the Script Log.
Examples¶
Documentation¶
Added Manual List.
Added Types and Symbols List.
R21.022 - Documentation Update 1¶
Fixed issue where derived classes from examples are shown in the documentation.
Modified all links pointing to Github to point to the new official Cinema 4D Python GitHub repository.
Added MCOMMAND_JOIN to the list of command that needs a doc to be passed in the
c4d.utils.SendModelingCommand()
. It was already the case before R21, just not documented.Clarified Drag And Drop in the Python Console and Drag And Drop in the Script Manager.
Clarified Object Data and Cache Optimization and usage of SetOptimizeCache(True).
Fixed documentation about return type of
BaseObject.CheckCache()
. Previously it was written that it return True if the cache is valid, this is wrong, it returns True if the cache is dirty, False if it is valid. Last sentence is true even before R21.Updated icons to R21 in Icons list.
R21.026 - Hotfix 1¶
This hotfix for Cinema 4D R21 did not change any API functionality.
R21.115 - SP1¶
API¶
Added
HyperFile.GetFilterFlags()
.Added c4d.RENDERFLAGS_RENDERQUEUEERRORS.
Added c4d.IN_EXCLUDE_FLAG_NO_RESIZABLE.
maxon.Object renamed
maxon.ObjectInterface()
.
Fixes¶
Fixed a crash with EXR loader when a malformed path was given.
Fixed an issue where importing a document with a missing substance asset prompt a MessageBox while it was not allowed to do.
Fixed an issue where
c4d.gui.BitmapButtonCustomGui
doesn’t support border options.Fixed an issue where MCOMMAND_SPLIT didn’t return the resulting spline.
Fixed an issue where the value of the created key with
CCurve.AddKeyAdaptTangent()
was wrong.Fixed a crash when invoking
c4d.documents.LoadDocument()
using the standard python threading module.Fixed an issue where lPoint argument for
SplineData.MakePointBuffer()
should be optional but was not.Fixed a crash when hashing a
c4d.storage.ByteSeq
.
Documentation¶
Added note in
BaseDocument.SetActiveObject()
,BaseDocument.SetActiveTag()
,BaseDocument.SetActiveMaterial()
about the need to call respectivelyBaseDocument.GetActiveObject()
,BaseDocument.GetActiveTag()
,BaseDocument.GetActiveMaterial()
to update internal cache.Improved description of
PolygonObject.GetPolygonTranslationMap()
.Improved description of
BaseSelect.GetRange()
.Fixed documentation of
GeUserArea.OffScreenOn()
where parameter where marked as mandatory while it wasn’t the case.Update parameter list in the python documentation for the function
c4d.PrefsLib_OpenDialog()
.Updated PREFS_PRI with PREFS. Impacted functions:
c4d.plugins.RegisterPreferencePlugin()
andc4d.PrefsLib_OpenDialog()
.Updated FORMAT Export.
Fixed typos in Python Field Object / Layer.
Improved doc system, short description available in function/method signature list.
Improved doc system, parameters available in function/method signature list.
Improved doc system, static function are written completely (from c4d module).
R21.115 - SP1 - Documentation Update 1¶
Remove the double rubric entry of Inheritance in some pages.
The next functions/methods were documented in the Python documentation but didn’t exist.
MultipassBitmap.GetHiddenLayerNum()
is currently namedMultipassBitmap.GetHiddneLayerNum()
.SplineData.GetSelectedCount()
is currently namedSplineData.GetSelectCount()
.
BaseList2D.GetDocument()
is a member ofc4d.GeListNode
.BaseList2D.GetHighlightHandle()
is a member ofc4d.BaseObject
.BaseList2D.GetVisibility()
is a member ofc4d.BaseObject
.BaseList2D.KillTag()
is a member ofc4d.BaseObject
.
c4d.utils.Pulse()
doesn’t exist at all, was removed from doc.TextureTag.GetMln()
doesn’t exist at all, was removed from doc.
The next functions/methods were not documented in the Python document but existed so they have been added to the documentation.
c4d.bitmaps.MultipassBitmap.AllocWrapper()
.c4d.Vector.GetDistance()
.c4d.modules.mograph.FIELD_EXECUTION_BLOCK_SIZEf
.c4d.modules.mograph.FieldInfo.Create()
.
R21.207 - SP2¶
API¶
This Service pack for Cinema 4D R21 did not change any API functionality.
Fixes¶
Fixed an issue where printing a
c4d.storage.ByteSeq
didn’t work.Fixed an issue with
c4d.DescID
not working with shift operator.Fixed an issue where
MultipassBitmap.GetHiddenLayerNum()
was namedMultipassBitmap.GetHiddneLayerNum()
.MultipassBitmap.GetHiddenLayerNum()
is introduced.MultipassBitmap.GetHiddneLayerNum()
is still there for compatibility reason but marked as deprecated.
Fixed an issue with
HairObject.GenerateHair()
not returning an alive object.Fixed an issue with
SplineData.SetType()
where parameter bAll was not optional while it should be.Fixed an issue with
SplineData.SetZero()
where parameter bAll was not optional while it should be.Fixed an issue with
TextureTag.GetMaterial()
where ignoredoc default value was True while it should be False.Fixed an issue with
TreeViewFunctions.InputEvent()
where wrong arguments were passed internally.Fixed an issue when the environment variable PYTHONPATH was mal-formatted, it disabled Python in general within Cinema 4D.
Examples¶
Added a new example about GeUserArea and dragging see GeUserArea_Drag_r13.py.
Documentation¶
Fixed documentation of
SculptObject.GetPolygonCopy()
where parameters were not described in the documentation.Fixed documentation of
BaseBitmap.Scale()
where the last parameter was named inprop while it is nprop.Fixed documentation of
BaseList2D.GetBit()
where the return type was wrong`.Added information about current issue with c4dpy not working correctly with R21 see c4dpy.
API Changelist¶
See API Changelist R21 page.