Python Resources and You
"Never be afraid to try something new. Remember that a lone amateur built the Ark. A large group of professionals built the Titanic." — Dave Barry
Diving In
Jumping into the unknown is always a scary and difficult proposition but almost always rewarding. Just remember the first time you opened up that 3D program. You kept aimlessly pressing buttons that appeared to do nothing. All of the sudden, a cube or sphere popped up on screen and you kept clicking on it but nothing would happen. The only button you knew worked was Quit. The sheer terror of the unknown! At least that was my story. By the way, Sheer Terror is a great hardcore band!
After a while, once you understood how it all worked, 3D was not all that bad! That simple cube started to actually look more like a real world object after pushing and pulling some points! To top it off, you even started throwing in some Z-Brush detail galore for good measure!
If you’re trying to jump into writing Cinema 4D Python scripts and plug-ins, you no doubt have noticed there is not much out there to guide the way. Sure, there are plenty of Python learning resources but few specifically aimed towards using the Cinema 4D Python API (Application Programming Interface). If you’re just starting out and have little or no programming experience, an API is a tough thing to chew through. The APIs are mostly written by developers and for developers. The other problem you will face is that the C4D API documentation needs some work to say the least. However, I am sure this will improve with time.
Getting Started
The best way to get started writing Python scripts and plug-ins for Cinema 4D or any application for that matter, is to actually learn some basic Python. More importantly, learning a bit about programming fundamentals. Yes I know, fundamentals are not glamorous, let’s just jump into the cool stuff, right? This way can work too! If you have the stomach, motivation, and dedication you can actually build stuff without knowing much of what is going on. You basically just copy and paste snippets of code from various resources and tweak away until you get the desired outcome. In the process, you will learn a thing or two on how all the parts create the whole. There will come a point, however, where you will need to fill in the knowledge gaps if you want to move further ahead and create more complex and robust scripts/programs.
This is the thing, once you learn the underlying principles, learning the syntax of most programming languages is the easy part. Once you understand how to assemble programs using various libraries or pieces of code and program flow, jumping to another language is not all that hard. Take for instance learning 3D as an example again. Once you learn about X, Y, Z, navigating in 3D space and the terminology associated with 3D you can migrate to another 3D package quite easily. Obviously, I’m simplifying things and glossing over details but same concept works with compositing basics. Once you have the fundamentals under your belt, it doesn’t matter whether you use Nuke or Fusion. Yes, you have to learn the nuances of each program but that’s usually not your biggest obstacle.
Python, believe it or not, is one of the easier programming languages to learn. Now, “easier” does not necessarily mean easy if you have never written a line of code in your life before but among the various programming languages, Python is quite easy to pick up. The great thing about learning Python is that a plethora of software packages provide a Python API! Nuke, Houdini, Maya, RealFlow, Vue, and of course Cinema 4D to name a few. Moreover, Python provides a gentle introduction to core programming concepts. You can build some really sophisticated software with Python. It equips you with a strong foundation if you move up to other languages such as C++, Java, objective-C, etc.
I’ve compiled a list of resources that I have found helpful in learning Python. This is coming from a designer’s point of view. If your goal is to be a developer, create a new sorting algorithm, or you already know Python then some of this stuff is probably not suited for you. This is aimed more towards artists who have no or little programming experience and want to learn a bit of Python but not necessarily want to be immersed in development.
If you are serious about learning Python, I encourage you to study some of the following resources and be persistent. Python is a great tool to have under your belt. One last note, you will read about installing IDEs and all kinds of fancy software to get started but don't worry about any of that for now. Python and a simple text editor is all you need. Do not use Word! If you are on Mac OS X, then you are all set. Just open up the Terminal.app. On Windows, just install Python if you don't have it already installed, and open up a command prompt. If you need a text editor, download Text Wrangler for Mac OS X or ConTEXT if you are on Windows. Both are freeware but use what suits your taste.
I’ll update this list as I find new resources.
Beginner
Learning to Program
Great general intro to programming with examples in Python and JavaScript.
A Beginner’s Python Tutorial
Also great for beginners with no prior programming experience.
Learn Python The Hard Way
A book intended for people who have no coding chops to build up their skills before starting a more detailed book.
The New Boston Python Videos
Interesting character who teaches really well. If you prefer videos, try these out.
Invent Your Own Computer Games with Python
Introductory material while you build games. Great for understanding logic and the flow of a program.
Lynda.com - Python 3 Essential Training
These are decent but move rather quick and assume you have prior programming experience.
A Byte of Python
Haven't read this one but often gets recommended.
Beginner's Guide to Python
Helpful beignner's guide from the official Python web site.
Python in RealFlow
Geared towards RealFlow but Python basics still very applicable.
A guide to Python Namespaces
Great introduction to understanding Python Namespaces.
Structure and Interpretation of Computer Programs
More on the academic side of computer science but with reading material using python.
A Gentle Introduction to Programming Using Python
Some good handouts and reading material from MIT OCW.
Intermediate
Building Skills in Python
A Programmer's Introduction to Python
Google's Into to Python Class
Google has a quick intro for folks with programming experience.
Dive Into Python
Great resource! Always gets recommended for beginners but I think it’s more appropriate for intermediate users.
Python.org Tutorial
The official Python docs tutorial. Some of this assumes prior programming knowledge.
Introduction to Computer Science and Programming
Course from the MIT OCW.
Python for Cinema 4D
Plugin Cafe Forums
Developer forum where you can find answers from bright minds.
C4D Python API Documentation
Official documentation for the Python API
Smart-Page.net
Some really neat and advanced Python stuff you can peruse and pull apart.
CG Rebel
Some really great intro material on the Cinema 4D Python API.
Python/C4DSDK
Helpful wiki with links to other great Python resources.
Cineversity
You need a paid membership to access some of the video tutorials.
CG Talk
There is of course the infamous CGTalk forums.





