My collection of Python scripts for Maxon Cinema 4D (@aturtur). Almost every script is commented to make learning Python scripting in Cinema 4D faster and easier. You can find more of Cinema 4D related stuff on my blog e.g. Python Generators, Python Effectors, custom Xpresso setups and so on.
Latest version: 1.78 (Released 09.07.2024)
Changes in 1.78
- 09.07.2024 New script: AR_ZoomHelper (Camera)
- 04.07.2024 New script: AR_AxisToParent (Modeling)
- 04.07.2024 Updated: AR_AxisToCenter, doesn't change children transformations
- 27.06.2024 New script: AR_MarkersToRange (Animation)
- 26.04.2024 New script: AR_TakeMarkSelected, AR_TakeUnmarkSelected, AR_TakeMarkToggleSelected (Takes)
- 26.04.2024 Updated: AR_BakePLA and AR_BakePSR, disables alembic morph tag on baked object(s)
- 10.04.2024 Updated: AR_TglEnable, added support for new 2024.4.0 particle objects and Thicken generator and Doodle object
- 20.02.2024 New script: AR_PrintCloneCount (Utility)
- 20.02.2024 Updated: AR_LayerToggle, AR_LayerOff, AR_LayerOn, added undo support
- 17.01.2024 Updated: AR_KeysConstantSpeed, error checking
- 12.01.2024 New script: AR_EdgeSelectionsToSpline (Modeling)
- 10.01.2024 New script: AR_EditorCamToSelectedCam (Camera)
- 10.01.2024 New script: AR_SelectedCamToEditorCam (Camera)
- 26.12.2023 New script: AR_TakeMaterialPreviews (Take)
Older change logs are collected in CHANGELOG.md file
In this section I go through how you install AR_Scripts to Cinema 4D. These scripts are written for Maxon Cinema 4D 2024.4.0 (usually always the newest version) and Python 3.11.4. Scripts are tested using Microsoft Windows 11. All of the scripts should be compatible also with Mac OS. I'm not writing scripts anymore for older Cinema 4D versions.
Use these scripts with your own risk!
Download this repo and put AR_Scripts_#.## folder to following path:
C:\Users\<USER>\AppData\Roaming\MAXON\Maxon Cinema 4D 2024\library\scripts
/Applications/MAXON/CINEMA 4D 2024/library/scripts
Other way to find folder for installing scripts is to opening C4D and opening preferences (Ctrl+E / Cmd+E) and pressing 'Open Preferences Folder...' -button and navigating to library > scripts.
Some of the scripts will make a txt-files in the aturtur folder under the C4D's prefs folder to save the previous settings of the script.
C:\Users\<USER>\AppData\Roaming\MAXON\Maxon Cinema 4D 2024\prefs\aturtur
If/when you want to uninstall AR_Scripts completely, remove that folder too.
When you have installed AR_Scripts you have to reboot Cinema 4D if it is already running. On start up Cinema 4D will scan and load all of the scripts. Scripts are located under Extensions -> User Scripts -> AR_Scripts_#.##. Scripts can be used with the commander (Shift+C) too.
You run the script by clicking it. Some of the scripts have multiple functions and you can use those with key modifiers (Alt / Ctrl / Shift) and different combinations. Some of the scripts requires a certain item selection or mode to be active. If you don't know what the script does you can either open the script in the script editor and read the description or search the info of the specific script on this page.
Default: Bakes selected camera(s) to world space.
Shift: Keeps render engine tags if any.
Default: Bakes object to Point Level Animation (PLA).
To bake spline object correctly, bake them first to alembic and then use this script to bake the alembic file to PLA spline object.
It's important that 'Intermediate Points' is set to 'Uniform'! The script does not support that the point number is changing over time.
Default: Bakes selected object(s) to PSR animation in the world space.
Shift: Bakes selected object(s) to PSR animation in the local space.
Default: Distributes selected keyframes evenly.
Shift: Distributes selected keyframes by given step (in frames).
Requires at least three (3) selected keyframes to correctly function. Use in dope sheet editor, does not work in f-curve editor.
Default: Duplicate keydrames to playhead flipped.
Use in dope sheet editor, does not work in f-curve editor.
Default: Duplicate keydrames to playhead flipped.
Use in dope sheet editor, does not work in f-curve editor.
Default: Aligns selected keyframes to the closest whole frame.
Use in dope sheet editor, does not work in f-curve editor.
Default: Modifies two selected keyframes' tangents so they are aligned.
Shift: Break tangents.
Use in dope sheet editor, does not work in f-curve editor.
Default: Move selected keyframe(s) to the left.
Shift: Set custom value as default (shared with AR_KeysMoveR).
Ctrl: Move selected keyframe(s) by the set value multiplied by 2 to the left.
Use in dope sheet editor, does not work in f-curve editor.
Default: Move selected keyframe(s) to the right.
Shift: Set custom value as default (shared with AR_KeysMoveL).
Ctrl: Move selected keyframe(s) by the set value multiplied by 2 to the right.
Use in dope sheet editor, does not work in f-curve editor.
Default: Align selected keyframe(s) to playhead, first keyframe ruling.
Use in dope sheet editor, does not work in f-curve editor.
Default: Align selected keyframe(s) to playhead, last keyframe ruling.
Use in dope sheet editor, does not work in f-curve editor.
Default: Scripts to set individually position, scale or rotation keyframe for wanted axis for selected object(s).
Default: Increases selected keyframe(s) value.
Shift: Set custom value as default (shared with AR_KeysValueSub).
Ctrl: Increases selected keyframe(s) value times 2.
Note: Use in dope sheet editor, does not work in f-curve editor.
Default: Decreases selected keyframe(s) value.
Shift: Set custom value as default (shared with AR_KeysValueAdd).
Ctrl: Decreases selected keyframe(s) value times 2.
Note: Use in dope sheet editor, does not work in f-curve editor.
Default: Set render range from markers.
Adds special track: Time for selected track(s) for time remapping.
Default: Time track is set to absolute.
Shift: time track is set to relative.
Note: Use in dope sheet editor, does not work in f-curve editor.
Default: Removes all animated tracks from selected item(s).
Default: Sequences selected animation tracks.
Shift: Sequences selected animation tracks with a given gap (in frames).
Ctrl: Sequencing is reversed.
Shift+Ctrl: Reversed sequencing with a given gap.
Requires at least two (2) selected tracks to correctly function.
Note: Use in dope sheet editor, does not work in f-curve editor.
Default: Creates an aspect ratio guide for selected camera(s).
Requires at least one (1) selected camera object to correctly function.
Default: Creates Focus Distance object for selected camera(s).
Shift: Assigns also target tag to camera.
Default: Creates plane object that matches selected camera(s) field of view. Positioned to cameras focal point in Z-axis.
Shift: Same as default, but plane stays in place. Does not support film shift.
Supports perspective and parallel projections.
Default: Crops the canvas to Interactive Render Region.
Changes active render settings resolution and selected/active camera's sensor size (film gate) and possibly also film offsets.
Default: Cycles through available cameras.
Shift: Cycles cameras backwards.
Default: Copies settings from editor camera to selected camera.
Default: Resizes the canvas without changing the perspective.
Changes active render settings resolution and selected/active camera's sensor size or focal length and possibly also film offsets.
Default: Selects the active camera in the object manager.
Default: Copies settings from selected camera to editor camera.
Default: Stabilizes active camera view to selected object.
Designed to use with AR_AverageLocator.
Default: Creates a helper camera from active camera and activates 'Film Magnify' tool
Default: Exports selected spline objects to Adobe Illustrator-sequence.
Shift: Export selected spline objects to separated folders (separated sequences).
Preview range will determine the frame range that will be exported.
Default: Exports top level objects individually to C4D-file. Supports object selection.
Default: Exports selected material(s) to own file(s).
Note: Material names should NOT end with dot and number! Eg. "MyMaterial.1" rename that to "MyMaterial_1" or something different. Currently the script does not copy textures to the export location, use global paths!
Default: Exports top level objects individually to OBJ-file. Supports object selection.
Default: Exports UV texture for selected object.
Note: Uses colors from Bodypaint. Set these first!
Default: Imports Adobe Audition markers CSV file and creates markers from those.
Default: Creates a camera from fSpy JSON-file and Background object from a Image-file.
Default: Creates a setup from Gaea height map image file.
Default: Imports an image folder into materials.
Shift: Generates also plane objects for each material with correct proportion of the image.
Default: Merges OBJ-files from selected folder into the active document.
Default: Creates materials from Pixeur color palette file.
Default: Imports PSD-file's layers into separate materials.
Shift: Generates also plane-objects for each layer.
Default: Imports sound-file and places it to the current time.
Default: Colorizes selected layers with custom gradient.
Default: Turns all layers off or only selected ones.
Alt+Ctrl+Shift: Open settings.
Default: Turns all layers on or only selected ones.
Alt+Ctrl+Shift: Open settings.
Default: Toggles all layers or only selected ones.
Alt+Ctrl+Shift: Open settings.
Default: Consolidates different polygon selections together that uses same materials.
Note: Messes up material projections! Select object(s) and run the script.
Default: Overrides selected materials with the top of the list selected material.
Default: Merges materials that has the same name.
Case sensitive. Supports Cinema 4D's naming conventions. The first material in the material manager overrides the other ones (with the same name).
Default: Creates own materials for every object from existing materials. Supports object selection.
Default: Select next material.
Default: Select previous material.
Default: Puts material to object if they have a same name.
Default: Creates a null object(s) which is aligned to selected polygon(s).
Default: Sets object's axis to world origin.
Currently does not support objects with exposed normal tags.
Default: Sets object's axis to parent's origin (axis).
Default: Splits selected objects in half.
Default: Places the object on the floor.
Default: Remeshes selected object with ZRemesher.
Shift: Dialog to set different options. Options will be saved.
Note: Requires Cinema 4D S26 or newer!
Default: Creates splines for each edge selection tags.
Default: Flips selected object(s) (multiplies specific axis by -1).
Shift: Dialog to set different options, like space, which axis to flip and make a copy of the original object. Options will be saved.
Default: Creates a guide object from two selected objects, points or edge.
Default: Creates null(s) from selected point(s) that can control the original geometry.
Default: If point selection: Creates null(s) with constraint tag(s) (clamp) from selected point(s).
Default: If object selection: Creates null(s) with constraint tag(s) (PSR) from selected object(s).
Default: Replaces objects with instance of the first selected object.
Shift: Replace objects with instances of the last selected object.
Ctrl: Replace objects with copies of the first selected object.
Shift+Ctrl: Replace objects with copies of the last selected object.
Default: Converts selected object(s) to splines.
Shift: Keep the original object(s).
Creates null to current axis matrix.
Default: Selects the new null object and deselects the old selection.
Shift: Does not change the current selection.
Default: Creates a point cloud (polygon object with only points) from selected objects' positions.
Default: Splits the object into pieces by polygon selection tag(s).
Default: Swaps selected objects between each other (transformation).
Shift: Generates a dialog where you can pick specifically what properties to swap.
Ctrl: Swaps selected objects only in the object manager.
Requires just two (2) selected objects.
Default: Creates a vertex map tag for selected object(s).
Shift: Creates also linear falloff field to control the vertex map.
Default: Inverts selected Vertex Map tag's data.
Default: Selects MoGraph Effector(s) that use(s) selected Field object. Selects MoGraph Effector(s) that are used in selected Generator object.
Does not support subfields or tags!
Default: Selects MoGraph generator(s) that use(s) selected effector. Prints info also to console.
Default: Creates MoGraph to nulls setup.
Shift: User input for custom index.
Default: Creates MoGraph selection for every clone.
Shift: Shared tag for given IDs.
Ctrl: Individual tags for given IDs.
Default: Merges selected MoGraph Selection Tags into one tag.
Note: If you have nested MoGraph Generators, disable parent generators before running this script.
Default: Messes position of selected nodes (2023 April Fools' Day).
Works only with Redshift. Make sure the Redshift material is selected when using the script!
Default: Adds node between selected nodes.
Works only with Redshift. Make sure the Redshift material is selected when using the script!
Aligns selected graph nodes horizontally.
Default: The leftmost node rules. Pivot is in the middle.
Shift: The leftmost node rules. Pivot is in the top.
Ctrl: The leftmost node rules. Pivot is in the bottom.
Alt: The rightmost node rules. Pivot is in the middle.
Alt+Shift: The rightmost node rules. Pivot is in the top.
Alt+Ctrl: The rightmost node rules. Pivot is in the bottom.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Aligns selected graph nodes vertically.
Default: The topmost node rules. Pivot is in the middle.
Shift: The topmost node rules. Pivot is in the left.
Ctrl: The topmost node rules. Pivot is in the right.
Alt: The lowest node rules. Pivot is in the middle.
Alt+Shift: The lowest node rules. Pivot is in the left.
Alt+Ctrl: The lowest node rules. Pivot is in the right.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Connects two selected nodes, if possible. Starting from the top.
Shift: Custom input to connect OUT and IN port.
Ctrl: Connects two selected nodes, if possible. Starting from the bottom.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Disconnect all connection(s) of selected node or connection(s) between selected nodes.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Distributes selected nodes horizontally.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Distributes selected nodes vertically.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Lines up selected graph nodes horizontally.
Shift: Lines up selected graph nodes horizontally with a custom gap.
Alt: Reversed direction.
Shift+Alt: Reversed direction with a custom gap.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Lines up selected graph nodes vertically.
Shift: Lines up selected graph nodes vartically with a custom gap.
Alt: Reversed direction.
Shift+Alt: Reversed direction with a custom gap.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Resizes selected nodes by given width and height values.
Supports Xpresso and Redshift.
Notice: Make sure the Xpresso tag or the Redshift material is selected when using the script!
Default: Creates individual scale, offset and rotate control nodes for Redshift texture and triplanar nodes.
Shift: Add only scale controller.
Ctrl: Add only offset controller.
Alt: Add only rotation controller.
Works only with Redshift.
Notice: Make sure the Redshift material is selected when using the script!
Default: Creates material node from selected texture nodes or connects selected texture nodes to selected materials.
Shift: Change settings.
Works only with Redshift.
Notice: Make sure the Redshift material is selected when using the script!
Creates a copy from object to the rest of the selected objects.
Default: Copy the first selected object.
Shift: Copy the last selected object.
Ctrl: Instance the first selected object.
Shift+Ctrl: Instance the last selected object.
Default: Selects the source object.
Supports Instance, Connect, MoInstance, MoSpline, Cloner and Matrix objects.
Default: Merges selection tags.
Supports object and tag selections.
Default: Gives a random display color to selected object(s).
Shift: Gives a random grayscale display color to selected object(s).
Ctrl: Colorize objects randomly based on a custom gradient.
Alt: Reset color.
Default: Removes empty selection tags from selected object(s) or from all objects if no selection.
Default: Removes missing texture tags. If selection, removes only from selected objects.
Default: Selects objects by visibility.
Default: Select children of selected object(s).
Shift: Keeps original selection.
Ctrl: Select children from custom level.
Alt: Select siblings from given level (ignore their children).
Default: Selects the object's cousins.
Ctrl: Selects the object's cousins and deselects the original selection.
Default: Select children of selected object(s) that are the most deep in hierarchy.
Shift: Keep the original selection.
Default: Goes down one hierarchy level.
Shift: Keeps the old selection.
Default: Selects the next object.
Shift: Keeps the old selection.
Default: Selects every even object.
Shift: Selects every odd object.
Ctrl: Selects every nth object.
Alt: Selects every nth object inverted.
Shift+Ctrl: Keep random n.
Default: Selects the previous object.
Shift: Keeps the old selection.
Default: Selects the root object of the object.
Shift: Keeps the old selection.
Default: Selects objects that has same display color as the selected object.
Default: Selects the object's siblings.
Ctrl: Selects the object's siblings and deselects the original selection.
Default: Selects the parent object.
Shift: Keeps the old selection.
Default: Sorts selected objects order alphabetically (descending) in the object manager.
Shift: Sorts selected objects order alphabetically (ascending) in the object manager.
Note: Objects has to be in the same level in the object manager.
Default: Randomizes selected objects order in the object manager.
Note: Objects has to be in the same level in the object manager.
Default: Clone selected tag(s) to selected object(s).
Default: Clones specific tags from first selected hierarchy to second selected hierarchy.
Hierarcies has to be indetical!
Default: Removes selected tag type from selected objects. If no object selection. Selected tag type will be removed from all objects.
Default: Selects tag(s) of selected object(s). If only tags selected, selects that type of tags from other objects. You can also restrict the tag search with object selection.
Shifts selected tag(s).
Default: Shifts selected tag(s) to the right.
Shift: Shifts selected tag(s) to the left.
Default: Adds a custom python tag for selected object(s) that works like C4D's Align To Spline tag but this one works also with deformed spline.
Default: Adds a custom python tag for selected object(s) that keeps the object on the floor.
Default: Adds a custom python tag for selected object(s) that toggles object's visibility by given frames.
There's some variables you can use: start and end for global start and end frames, prevstart and prevend for preview range start end end frames.
Set frame range with dash (-) and separate different frames and ranges with a comma (,).
Default: Adds a custom python tag for selected object(s) that shows the object only if it is active.
Default: Adds a custom python tag for selected object(s) that shows and hides camera if it is active or not.
Default: Adds a custom python tag for selected object(s) that shows and hides object based on assigned camera.
Default: Adds a custom python tag for selected object(s) that shows the object only when it is animated.
Default: Creates take from selected camera(s) or if no selection for each camera.
Default: Marks selected take(s).
Default: Toggles mark on selected take(s).
Default: Creates take for each selected material assigned to selected object.
Default: Creates matte take from selected materials.
Default: Unmarks selected take(s).
Default: Creates a null object which position is average of selected objects/points.
Extracts 2D tracks from selected motion tracker to null objects.
Default: Extracts only manual tracks.
Shift: Extracts only auto tracks.
Default: Converts relative render paths to absolute paths.
For example: Cinema 4D's native Render Queue does not work with relative render paths, so this scripts helps to convert render paths.
Default: Deletes aturtur folder inside prefs folder, where some of scripts saves user's custom settings.
Shift: Opens the folder location.
Default: Creates a dark null that has no name.
Default: Creates a folder null that keeps your project nice and tidy.
Default: Opens the bug reports folder.
Default: Opens the folder where the project file is saved.
Default: Opens the folder where the project is rendered.
The folder must exist already! Does not support all of the tokens!
Default: Prints to console count of the clones of the selected MoGraph object.
Default: Prints info about selected objects, tags, materials, Xpresso nodes and Redshift nodes.
Default: Toggle selected generator object (enable / disable).
Shift: Toggle next found parent generator object from the default list.
Ctrl: Toggle the root generator object.
Alt: Toggle all parent generators from common list.
Alt+Shift: Force disable.
Alt+Ctrl: Force enable.
Shift+Ctrl: Toggle from custom list.
Alt+Ctrl+Shift: Open textfile to modify custom. You can use hashtag '#' separating comments. Put each generator to separate line!
Highly recommended to assign this script to a keyboard shortcut!
Default: Opens a dialog with different options to create an animation reference stuff (viewport, background and plane).
Viewport option requires and enables 'Full Animation Redraw' in Preferences/View.
Animation's starting point is the current time at the timeline.
Default: Toggle opacity of safeframes in viewport.
Shift: Set a custom value and color.
Note: The color pickers in modal dialogs are currently broken in C4D R25, hopefully Maxon will fix this bug someday...
Default: Toggle ground grid visibility in the active viewport.
Shift: Toggle in all viewports.
Default: Opens a dialog where you can select a preset to change viewport color. Alt+Ctrl+Shift: Open textfile to modify custom. Use hashtag '#' separating preset name. Put each color code to separate line!
load_shelf_tool.py
load_tamplate.py
More information some day...
If you find these scripts useful, consider to supporting the project and keeping it up and running: Tip jar.
If you have any script ideas, you can DM me at Twitter.