Cool Flex C4D Script

demo of the flex script for c4d
demo of the flex script for c4d

December 2022, MIT License.

The script is completely free, you can correct any mistakes in the code or optimize it, but cannot re-sell it.

Installation

  1. Download the zip archive and extract it.
  2. Open Cinema4d and go to Extensions > User Scripts > Script Folder
  3. Place the coolflex.py  in that folder.
  4. Close and Re-Open Cinema4d, and go to Extensions > User Scripts, coolflex.py should appear.
  5. Dock it somewhere and you are good to go!
  6. Optional – If you select coolflex.py in the Script Manager, you should see ”Load Icon”, you can load the .tif icon I added to make it look nicer in your UI.

Limitations

It is a relatively simple script, so don’t expect crazy crazy stuff from it.

Make sure that, in the object manager, the plane geometry is placed before any other flex rectangles, to ensure a smooth preview.

I feel like it could be useful for a lot of motion designers, so I’m just sharing a tool that I use all the time, for free.

The “code injection from the script to the tag” is a copy pasta from another script I had. (Bendchain by CuriousAnimalLimited)

How to Use

Create a plane geometry that is directly facing either the X, Y or Z axis.

You can add subdivisions to your plane, but do not go too crazy with them. The script is capped at 50 instances anyway. (You can modify it in the code directly).

Make modifications to your plane by fusing faces together or sliding edges.

Make sure that:

  • All of the faces are quadrangles (You can check at the top left of the viewer, if it says that there are still N-Gons in your plane)
  • All of the faces are looking like actual rectangles (If a face is looking skewed or slanted, it will look weird)

If you plan to animate it, I recommend selecting all of the faces then disconnecting them. 

  • Right-Click > Disconnect lil gear icon > Uncheck Preserve groups > Disconnect
  • Use a Pose-Morph tag on your plane to Animate the points.

Your geometry should be prepped, you just need to choose between Global Flex or Individual Flex.

  • Global Flex: The script will create the controls for all of the rectangles in your Plane user data.
  • Individual Flex: The script will create controls for every single rectangles, they will be placed in each rectangle python tag.

Global Flex is default, to go in Individual Flex, simply hold Alt when clicking on the script.

 

A tutorial is coming up really soon, hit me up on twitter @tibolasticot if you have troubles making it work!