Reference Cinema 4D Basic Features Extensions menu Script
Function available in CINEMA 4D Prime, Visualize, Broadcast, Studio & BodyPaint 3D

Script Manager

Open the Script Manager (Extensions / Script Manager).

The Script Manager lets you create and manage Python. scripts and even assign new icons so that you can later easily access these scripts in the Extensions menu under User Scripts. It is no longer necessary to create plugins.

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:

File Menu

New Script

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); for example, if a script should cause the application to crash the script will itself will not be lost).

Open Script...

Use this command to load non-write protected (non-encrypted) Python codes (*.py). The file selection dialog will jump directly to the proper directory.

Import Script...

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

*.py (Python)

Save Script
Save Script 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 Script As. Scripts will be saved by default to the "library / scripts" user directory.

Save All Scripts

All new or modified scripts will be saved.

Delete Script

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

Duplicate Script

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.

Edit menu

Undo
Redo

Changes made to the code can be undone or redone.

Cut

Cuts out the selected code and copies it to the cache.

Copy

Copies the selected code to the cache.

Paste

Pastes the cut or copied code from the cache to the selected location.

Delete

Deletes the selected code.

Select All
Deselect All

Selects or deselects all selected code. The code can also be deselected by clicking anywhere within the code window.

Dialog

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.

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

Script

Here, all scripts in the directory library / scripts in the user directory will be shown with their file names. Scripts marked with a small x are not yet saved.

Shortcut

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

Execute

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