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.

Python 3.7.7 offers a vast improvement over Python 2.7.14 including better Unicode handling, internal rewriting for better performance, and much more.
For more information about Python 3.7.7 please read the Official Python Documentation.

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:

PYTHONPATH Removal

The support of the PYTHONPATH environment variable was removed in the R23 since it could contain Python 2.7 and Python 3.7 code, which is too ambiguous.
In a case where a 3rd-party package requires the PYTHONPATH, it’s still possible to manually use it with the next code:
# 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

R23 documentation includes a Classic API Resource documentation, parsing the file located in {C4D Install Folder}/resource/modules/*.
The new content is located in Classic 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

Launching Cinema 4D with the command line g_encryptPypFile={PathToAPypFile} will encrypt the given python plugin (pyp file).
The command is the same than the one located in the Extension Menu -> Tools -> Source Protector…

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 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

  • Fixed typo in MACHINEINFO_PHYSICAL_RAM_SIZE documentation.

R23.110 - SP1

C4DPYTHONPATH37 environment variable is added. This behave exactly as PYTHONPATH.

Fixes

API Changelist

See API Changelog R23 page.