What is New in R23¶
R23¶
Python3¶
Cinema 4D R23 only run on Python 3.7.7 and doesn’t support Python 2.7.X code.
Those vast improvements may require modifications to existing scripts and plugins for more information see Python 3 Migration Guideline.
c4d.storage.BitSeq Replacement¶
The c4d.storage.BitSeq
class is removed in favor of Python builtin type such as:
- memoryview: This represents a memory view, meaning a view of the current memory.
Warning
To be used with extreme care, since it can crash Cinema 4D.The host object should be alive or any access on the memoryview will crash Cinema 4D.Keep the memoryview alive as short as possible. Never keep only the memoryvview alive. bytes: Represents an immutable bytes sequence.
bytearray: Represents a mutable byte sequence.
Find a list of all methods that used a c4d.storage.BitSeq and their replacements:
c4d.plugins.ReadRegInfo()
: Returns a bytes. Example in reg_plugin_info.c4d.plugins.WriteRegInfo()
: buffer argument expect a bytes. Example in reg_plugin_info.c4d.plugins.ReadPluginInfo()
: Returns a bytes. Example in reg_plugin_info.c4d.plugins.WritePluginInfo()
: buffer argument expect a bytes. Example in reg_plugin_info.
C4DAtom.AddUniqueID()
: mem argument expect a bytes. Example in c4datom_unique_id.C4DAtom.FindUniqueID()
: Returns a memoryview. Example in c4datom_unique_id.C4DAtom.GetUniqueIDIndex()
: Returns a tuple(int, bytes). Example in c4datom_unique_id.
MemoryFileStruct.SetMemoryReadMode()
: adr argument expect a bytearray or a memoryview. Example in read_write_memory_file_data.MemoryFileStruct.GetData()
: Returns a tuple(bytearray, int). Example in read_write_memory_file_data.HyperFile.WriteMemory()
: data argument expect a bytearray. Example in read_write_memory_file_data.HyperFile.ReadMemory()
: Returns a bytes. Example in read_write_memory_file_data.
BitmapLoaderData.Identify()
: probe argument is a memoryview. Example in py-xample_loader.SceneLoaderData.Identify()
: probe argument is a memoryview. No example but similar than the previous one.
VariableTag.GetLowlevelDataAddressR()
: Returns a memoryview. Example in read_write_normal_tag.VariableTag.GetLowlevelDataAddressW()
: Returns a memoryview. Example in read_write_normal_tag.
BaseBitmap.SetPixelCnt()
: buffer argument expect a bytearray or a memoryview. Example in copy_32bits_image.BaseBitmap.GetPixelCnt()
: buffer argument expect a bytearray or a memoryview. Example in copy_32bits_image.PaintLayerBmp.GetPixelCnt()
: buffer argument expect a bytearray or memoryview. No example but similar than the previous one.PaintLayerBmp.SetPixelCnt()
: buffer argument expect a bytes, bytearray or memoryview. Example in sculpt_paint_brush.
ColorProfileConvert.Convert()
: src and dst argument expect a bytes.
PYTHONPATH Removal¶
# extend sys.path whit content of PYTHONPATH
python_path = os.environ['PYTHONPATH'].replace("\\", "/").split(';')
for entry in python_path:
if not entry in sys.path:
sys.path.append(entry)
Note
In R23.105 - SP1, C4DPYTHONPATH37 environment variable is added. This behave exactly as PYTHONPATH.
Cinema 4D Resource Overview¶
This enables the browsing of Cinema 4D resources to find a particular ID of a given parameter or possible values for a Cycle Parameter.
Note
Parameter can be discovered via the Python Console, for more information see Drag And Drop.
CLI Plugin Encryption¶
g_encryptPypFile={PathToAPypFile}
will encrypt the given python plugin (pyp file).Note
Multiples pyp files can be encrypted at once, with ; as a separator for each path.
Fixes¶
Fixed an issue with SSL and Python not working correctly on Mac OS.
Fixed a crash with
GeListNode.GetBranchInfo()
.Fixed a crash with
GeListHead.InsertFirst()
.
Fixed an issue with Python Tag::Draw() errors not correctly raised.
Fixed an issue with c4d.BaseMaterial(c4d.Mmaterial) doesn’t return a c4d.Material
Fixed an issue with c4d.BaseShader(c4d.Xlayer) doesn’t return a c4d.LayerShader
Fixed an issue with the default code of the Python Field Layer.
Fixed an issue with the default code of the Python Field Object.
Fixed an issue with the default code of the Python Effector.
Documentation¶
Improved documentation for
BaseView.BackfaceCulling()
.Improved documentation for
TreeViewFunctions.HeaderClick()
.
Fixed documentation for
PolygonObject.GetNGonTranslationMap()
.
Fixed missing parameters pNormal and pSelected for
TreeViewFunctions.GetColors()
.Fixed missing parameter col for
TreeViewFunctions.GetBackgroundColor()
.Fixed missing parameter bgcolor for
TreeViewFunctions.DrawCell()
.Fixed missing parameter data for
FalloffData.GetHandleCount()
.Fixed missing parameters doc, data, bd, win and msg for
SculptBrushToolData.HandleNonModelPickMode()
Fixed missing parameters doc, data, bd, bh, bt and flags for
SculptBrushToolData.DrawNonModelPickMode()
Fixed typo in parameter pluginid for
c4d.plugins.GetToolData()
.
Fixed typo in MACHINEINFO_PHYSICAL_RAM_SIZE documentation.
R23.110 - SP1¶
C4DPYTHONPATH37 environment variable is added. This behave exactly as PYTHONPATH.
API¶
Added
EditorWindow.IsHotkeyDown()
.Added
EditorWindow.StatusSetText()
.Added
c4d.modules.bodypaint.GetUvSeams2()
.
Fixes¶
Fixed an issue with
TreeViewFunctions.HeaderClick()
not working.Fixed an issue with
SculptObject.HitObject()
, rayp and rayv arguments not parsed as c4d.Vector.Fixed an issue with
SculptLayerData.SetOffset()
, offset argument not parsed as c4d.Vector.Fixed an issue with
SculptLayerData.AddOffset()
, offset argument not parsed as c4d.Vector.Fixed an issue with
c4d.storage.ShowInFinder()
, open argument wasn’t named properly (previously called i).Fixed an issue with the Python Tag message method that raised an error when dragging it.
API Changelist¶
See API Changelog R23 page.