What is New in R25

R25

Node API examples

The Node API was exposed in S24 however, we added the next examples in our Github Repository.

Create Material

Create a node material for the current node space and for a specific node space.

Group Node

Retrieve the selected node material and group the nodes that are selected.

Modify port value

Create a material for the standard node space and modify the value of the BSDF color port.

Mute Selected Wire

Retrieve the selected node material and mute the selected wire.

NodeGraph Selection

Create a node material, select ports, print connections and select wires.

Retrieve Information

Retrieve some information of the selected port of a selected material.

Solo Node

Create a node material and solo the end node.

It’s recommended to take a look at the C++ documentation in the Node API HandBook to have more information about the Node API.

New Symbol Parser

A new parser to transpose C++ symbols to Python which support more features than the previous one also support the MAXON API. In an upcoming release, we will remove the hardcoded symbols located in symbols_old.h as described in R25 Deprecated Symbols page.

Finally the parser is available in Cinema 4D within the symbol_parser module and can be used to automatically import value from your resources files.

resc4d_symbols.h

enum
{
    My_Symbol = 1000,
    My_Syml = 1001,
    _DUMMY_ELEMENT_
};

resc4d_symbols.h

#ifndef _py_offsets_y_spline_H_
#define _py_offsets_y_spline_H_

enum
{
    PY_OFFSETYSPLINE_OFFSET         = 1000,
};

#endif

Python code to parse previous files automatically

import os
import symbol_parser

# Parse recursively all header files and parse enums and define
c4d_symbol_file = os.path.join(os.path.dirname(__file__), "res")
symbol_parser.parse_and_export_in_caller(c4d_symbol_file)

# Values are accessible directly
print(My_Symbol)
>>> 1000
print(My_Syml)
>>> 1001
print(PY_OFFSETYSPLINE_OFFSET)
>>> 1000

GeUserArea and TreeView Enhancement

The c4d.gui.GeUserArea classes and c4d.gui.TreeViewFunctions were enhanced to be on par with the C++ version.

Fixes

  • Fixed an issue where the c4d.DOCUMENT_SELECTIONFILTER (and a lot of other) enumeration are either missing or wrong.

  • Fixed an issue with default parameter not working for GraphModelInterface.GetNode().

API Changelog

See API Changelog R25 page.