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

Script Manager

Open the Script Manager (Window / Script Manager).

The Script Manager lets you create and manage Python and C.O.F.F.E.E. scripts and even assign new icons so that you can later easily access these scripts in the Plugin menu under User Scripts. It is no longer necessary to create plugins. You can switch between Python and C.O.F.F.E.E., depending on the type of script you want to edit or create.

Scripts created using the Script Manager are saved to the user Library / Scripts directory.

User Buttons


Using the script field

The following interactive functions are available for the script field:

  • Double-click on a word to select it (keep the mouse button pressed to select additional text).
  • Clicking on a line number will select the entire line (keep the mouse button pressed and drag vertically to select additional lines).
  • When valid characters are typed (quotation marks, brackets, etc.), these will automatically be created double with the cursor positioned correctly so you can continue typing without having to worry about closing the bracket. The same applies to selected text: typing a respective character will close the text block with the symbols mentioned above.
  • Highlighted text will be commented out when * (asterix) is entered.
  • Highlighted text can be moved with the mouse (while simultaneously pressing the Cmd/Ctrl key), whereby the cursor will display the text’s new position.
  • Undo/redo can be used on text.
  • A colored marker will be displayed between text and line number. The colors have the following meaning: yellow (new); green (compied); blue (saved but not compiled). This color coding only works for newly entered text. As soon as the file has been saved, this color coding will no longer be displayed.

File Menu


A new, untitled script will be created (however, scripts that were not saved will be saved to the prefs/_last_script folder in the user directory with the file extension *.py (Python) or *.cof (C.O.F.F.E.E.); for example, if a script should cause the application to crash the script will itself will not be lost).


Use this command to load non-write protected (non-encrypted) C.O.F.F.E.E. or Python codes (*.py and *.csc). The file selection dialog will jump directly to the proper directory.


Use this command to import code into the Script Manager. The following file formats can be imported:

*.py (Python) and *.cof (C.O.F.F.E.E.)

Save as...

Save the script currently selected under Script (unsaved scripts have a * in their name). A new name can be assigned if you select Save As. Scripts will be saved by default to the "library / scripts" user directory.

Save All

All new or modified scripts will be saved.


The script currently selected under Script will be deleted after a security prompt is confirmed by you.


Duplicates the script currently selected under Script.

Load Icon...

Select a square bitmap that you want to use for this script. This icon will be displayed in the corresponding menu’s icon list and even in the Command Manager. Even alpha channels will be displayed.

Render Icon

If you are looking for the ideal image to use for your icon, this is the button for you – the current Cinema 4D scene will be rendered and this image can be used as your icon.



This is the icon (see next image) that has been assigned to the current script. An icon can be assigned or changed by selecting Load Icon … or Render Icon …

You can simply drag & drop this icon onto any Icon Palette or into a Menu Manager.

In order to save the resulting configuration, you must select Window / Customize / Save as Startup Layout.

Name (C.O.F.F.E.E. Only)

Assign a name to your Script here.

Language (C.O.F.F.E.E. Only)

A list of available languages.

Information (C.O.F.F.E.E. Only)

Use this space to enter comments about your script, e.g., the script’s function(s) or its mode of operation.

Menu State (C.O.F.F.E.E. Only)

Here you can define a script’s menu entry’s status via C.O.F.F.E.E. commands, e.g., ENABLE = TRUE would mean the command can be selected and ENABLE = FALSE would mean that the command is grayed out. In order to see this effect, a script must be present in the menu or in the command palette.

Avoid executing complex operations here since this will lead to a drastic slow-down of the interface.

Command Line Field

Enter your script here.

Keywords that are recognized, such as classes, functions, symbols, etc., will be color-coded.

Right-clicking in the text field will open a context menu in which the common commands Cut, Copy, Paste, Delete and Select All are available.

Show in Script Menu (C.O.F.F.E.E. Only)

Activate this option if you want the script to be shown under User Scripts in the Plugin menu. The script can otherwise be called up from the Script Manager.

Add Event (C.O.F.F.E.E. Only)

Activate this option if you want Cinema 4D to add an event when a script is executed. This has the same function as GeEventAdd() in the C.O.F.F.E.E. code.


Click on this button to open the Customize Commands Manager where you can assign a keyboard shortcut to this script.


Executes the script. Error messages will be output to the Console (main menu: Scripts / Console).