Cinema 4D / BodyPaint 3D Program Documentation Reference Cinema 4D Cinema 4D Prime
Function available in CINEMA 4D Prime, Visualize, Broadcast, Studio & BodyPaint 3D

Script Menu

Cinema 4D contains 2 script languages, C.O.F.F.E.E. and the more modern Python. Of the two, it is recommended that Python be used. Python offers almost the same accessibility to Cinema 4D functions as the C++ SDK. Support and documentation for Python can be found exclusively at http://developers.maxon.net.

Scripts

In addition to both commands described below you will find a list of all Python and C.O.F.F.E.E. scripts. In contrast to plugins, scripts have *.py and *.csc extensions. If a TIF image of the same name is located there it will be used as an icon.

Run Script...

If this option is selected, an open dialog window will open in which you can load and run a script.

Script Folder...

Opens the script directory in your user directory (library / scripts).

Save as Template

This sample script saves the currently displayed Project as a template and will open it each time Cinema 4D is started.

Source Protector...

Here you can select a *.pyp or *.cof plugin file and encode it. However, the encoding cannot be undone. An encoded file has the extension *.pypv or *.cof. The encoded file will be saved to the same path as the non-encoded file (which can be deleted separately).

Note that the encryption is not 100% secure. It offers low-level protection, which can be circumvented by those with corresponding technical know-how. C++ plugins should be used if you want to ensure the highest level of security.

The Expression Editor

The Expression Editor can be called up from several items:

The Editor has 4 buttons:

Load

Load *.py or *. cof files to display their code in the Editor.

Save

Saves code.

Compile…

The code will be checked for errors. Any errors found will be displayed below. If this button (or the next) is not clicked, the code will not be saved in the corresponding object/tag.

Execute

Executes the code.

Reset All

Resets the state of all Python objects (tag, Node, Generator).

Plugin Manager...

The Plugin Manager lists all known Python plugins, including their load times. At the top is a name filter that works exactly like the one in the Customize Commands Manager. If you have a long list of plugins, this filter will prove to be quite helpful.

At the left of the list you can see which plugins loaded correctly. Those that did not will be marked with an "X".

Clicking on the small triangle next to the file name will open the view and the plugin name will be displayed.

Right-clicking on a name in the list will open a context menu with the following commands:

Unfold All, Fold All

Opens or closes the entire tree view (as if you were to open each arrow manually).

Reload Plugin

Right-clicking on a plugin will make this option available, which allows you to reload that plugin.

Show in Finder

Right-clicking on a plugin will make this option available, which will display the plugin’s location in a finder window.

Reload All

Reloads all plugins.

Create Reload Script

Creates a Python script and copies it to the cache. The script will then reload the given plugin.