C4D Programming

Developing plugins and scripts for CINEMA 4D

Tag: Python

Automatically add tags at last position on creation

by .

Usually, when the user attaches a new tag to an object using the “Tags” menu in the Object Manager, the new tag is always added as first element to the object’s tag list.

For some tags, however, it would make sense to rather add them to the end of the object’s tag list. Especially if those tags should ‘layer’ their effects on top of each other (e.g. like multiple texture tags).

If you want your tag to be added to the end of the tag list automatically when it is being created, this article will tell you how.
Read the rest of this entry »

NodeData – what is it good for?

by .

If you’re new to programming for CINEMA 4D, you might have wondered what’s the deal with NodeData and its derivatives (e.g. ObjectData, TagData, ShaderData, et cetera).
When you are writing a plugin object, which is a BaseObject, why do you have to derive your plugin class from ObjectData instead of BaseObject? What is the connection between NodeData and the GeListNode derivatives (BaseObject, BaseTag, BaseShader, et cetera)?
In this article, you’re going to find out.
Read the rest of this entry »

Non-recursive hierarchy iteration

by .

In this article we’ll take a look at how to crawl through a hierarchy of objects in CINEMA 4D, without using a recursion.
Read the rest of this entry »

Accessing and Changing Importers/Exporters Settings

by ypuech

Retrieving and modifying a scene loader/saver options is usually needed when developing a batch importer/exporter.
Read the rest of this entry »

Vectors: GetLength() vs. GetLengthSquared()

by .

There are a lot of situations where you need to get the length of a vector. For example, if you want to measure the distance between two objects. But there are also a lot of situations where you don’t need the actual length of the vector, because maybe you just want to find out which vector is the shortest. For example, if you want to determine which object – out of a group of objects – is closes to a given position; a common task if you deal with particle systems where particles have to interact with their closest neighbors.
Read the rest of this entry »

R14.014 SDK released

by .

On September 7th 2012, MAXON has released the first version of the C++ and Python SDK documentation for R14. Both can be downloaded from the PluginCafé website.

PluginCafé download page

Recursive hierarchy iteration

by .

In this article we’ll take a look at how to recursively crawl through a hierarchy of objects in CINEMA 4D. Starting with a very basic and simple function, we will extend the functionality step by step until we have a function that can do anything with a hierarchy, using callback functions.
Read the rest of this entry »