So you might be curious how scripting languages can help you in your production workflow, but you say “Hey, I am a designer…not a coder”. Well, the two don’t necessarily have to be mutually exclusive!
I too once said the same thing! I don’t consider myself a “coder” by any stretch of the imagination, but I realize the power that having a basic knowledge of scripting languages can have in your day-to-day production workflow. Whether you primarily work in AfterEffects, Cinema4D, Maya or many others…you can benefit tremendously from a basic understanding of scripting. Knowing how to code and implement some very basic techniques, you can automate much of what you do as well as open doors to new ways of working.
This article will focus on Python in particular because it works inside of Cinema4D, Maya and Realflow just to name a few. Not too long ago, I found myself getting tired of repeating certain tasks within Cinema4D, so I decided to explore the use of Python. After a couple of months of experimentation and dedication to just figuring it out, I was able to code and use my own plugin…PyDeform. Just a brief background of what the plugin does…it automates the process of adding deformers to your objects inside of Cinema4D. Instead of having to add the deformer as a child of the object..then changing its size and orientation attributes to match the parent object, it all can be done automatically by the plugin. What does this mean? It means that you can work faster and concentrate on what you love…designing!
Now, let’s talk about some resources to get you started. Here are some links that point to some VERY valuable and VERY FREE training resources:
First, and most important, if you want to script in Cinema4D with Python you have to familiarize yourself with the Python SDK for Cinema4D. This documentation will become your best friend and sometimes your nemesis. Some of the documentation is confusing, but trial and error will usually get you where you need to be.
Second, the resources within Cinema4D itself are quite valuable! You can get information about every property that can be modified or controlled with scripting within C4D…directly within the application itself. By going to the “Script>>Script Log” and the “Script>>Console” menus you can get the information you need. The script log will give you a working script of the commands you perform while using the interface of C4D. If you create a Cube and then change its attributes in the Attributes Manager, the Script Log window will create the python code to perform those same functions. This can be a simple way to create small scripts to repeat tasks. As for the Console window, this not only gives you feedback on operations being performed by C4D, but you can click and drag properties from almost any part of C4D into the link field at the bottom of the console and it will show you the name and parameters by which to reference that object. This will help you to call certain functions or properties when you are coding your scripts.
Next, if you are completely new to Python or programming in general, below are some links to free internet resources to begin your journey:
1. Google’s Python Class – The class includes written materials, lecture videos, and lots of code exercises to practice Python coding.
2. An Introduction to Interactive Programming in Python – The primary method for learning the course material will be to work through multiple “mini-projects” in Python.
3. Codeacademy – An introduction to programming in Python.
4. Python.org – The official Python documentation.
Well I think that is a good primer to get everyone started. I know that it seems daunting, but trust me you can do it. I have personally written a handful of workflow scripts that I use almost every day in my work along with the plugin I wrote PyDeform. So get into it and make your work faster and easier!