C4D Programming

Developing plugins and scripts for CINEMA 4D

Month: September, 2012

Creating a new plugin project in Visual Studio

by .

For the newbies among our fellow readers, here is a complete step by step walkthrough for creating a new plugin project in Microsoft Visual Studio. The screenshots show Visual Studio 2005, but it still works exactly the same way in Visual Studio 2010.
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 »

Initializing member variables in the constructor

by .

As you might know, it is good practice to leave no variables uninitialized. If you wrote a struct or class, all its members should have a defined initial state, which is usually set in the struct’s or class’s constructor.
Read the rest of this entry »

Function parameters as references

by .

Performance can be increased by using references instead of copying values as function arguments.
Read the rest of this entry »

VisualStudio plugin: Rename VS window title

by .

This is a handy little free plugin for Visual Studio. It will make VS display not only the name of the currently open project, but also the path to the project file (up to a certain level which can be defined). Very helpful when working with several instances of VS simultaneously.
Read the rest of this entry »

VisualStudio Plugin: Indent Guides

by .

Do you sometimes get lost if your code is very nested with lots of scopes? The free plugin Indent Guides helps a lot!
Read the rest of this entry »

Goes without saying: Crash safety

by .

CINEMA 4D is known for its stability. While other 3D packages sometimes tend to randomly crash on you several times a day, CINEMA 4D runs stable and does not crash very often.

When you develop plugins for CINEMA 4D, you want to add functionality without making the whole application instable.
Read the rest of this entry »

Pages: 1 2 3 4

Hide Description elements

by .

Using the NodeData::GetDDescription() we can add, hide or modify elements in the Description of a BaseList2D object.

Here we show how to hide (or unhide) an element. This is useful if certain description elements should only be visible if the user selected a certain option.
Read the rest of this entry »

Range Mapping

by .

You might know the Range Mapper node in Xpresso. A very handy tool to map one value range to another, optionally applying a spline curve. Here is how you can do the same in C++.
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

Xcode 3.2.6 on OS X 10.7 or 10.8

by .

Even if you still have an Xcode 3.2.6 installer rotting in your archive, you won’t be able to install it on OS X Lion or Mountain Lion. The installer just refuses to install.
Read the rest of this entry »

Plugin crashes on Mac in R13 and R14

by .

With the release of the latest R13 service update, some plugins started crashing on OS X. When R14 was released, the problem got worse. A lot of plugins crashed on OS X, either immediately when CINEMA 4D was started, or when a window or dialog was closed.
Read the rest of this entry »

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 »