C4D Programming

Developing plugins and scripts for CINEMA 4D

Tag: C++

The CYCLEBUTTON CustomGUI

by .

Have you ever wondered how to create and use those pretty Description elements that are a combination of a LONG cycle and a command button?

The Character object offers them for component selection. They let you choose an option from a list, perform an action by clicking on it, and they can display icons and look cool. The SDK documentation does not really say anything about that element, but this article will show you how to make use of it.
Read the rest of this entry »

Compiling 64 Bit plugins in Visual C++ Express

by .

Many people, especially developers who write free plugins, or hobbyists, use only the free Visual C++ 2010 Express for their Windows builds. However, that version of C++ does not support 64 Bit builds.

There is an easy solution for this, and many people already know it. But since the questions comes up from time to time, here is how to get Visual C++ 2010 Express to build for 64 Bit, too.
Read the rest of this entry »

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 »

Licensing Plugins – Part V – Possible extensions

by .

Writing a plugin that extends the functionality of CINEMA 4D is often only the first step towards a finished product. At one point or another during the work on your plugin you will have to spend some thought a proper license system.

This fifth article shows some possible extensions we can make to the license system to make it more flexible and more comfortable to use.
Read the rest of this entry »

Licensing Plugins – Part IV – The license generator

by .

Writing a plugin that extends the functionality of CINEMA 4D is often only the first step towards a finished product. At one point or another during the work on your plugin you will have to spend some thought a proper license system.

This fourth article shows how to write a license generator, that will create keys we can use to unlock the plugin.
Read the rest of this entry »

Licensing Plugins – Part III – License integration

by .

Writing a plugin that extends the functionality of CINEMA 4D is often only the first step towards a finished product. At one point or another during the work on your plugin you will have to spend some thought a proper license system.

This third article shows how to integrate a license check in your plugin, using the license class that we created in part II.
Read the rest of this entry »

Licensing Plugins – Part II – License implementation

by .

Writing a plugin that extends the functionality of CINEMA 4D is often only the first step towards a finished product. At one point or another during the work on your plugin you will have to spend some thought a proper license system.

This second article shows the implementation of a custom license class that can be used to validate a given license key against the customer’s information.
Read the rest of this entry »

Treeview made simple – Part 2 – Folding & Selections

by franz3d78

In this article we will improve TreeView with Folding and Selection that is quite easy.
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 »

TreeView made simple – Part 1

by franz3d78

In this article we will learn something about GUI and in particular about TreeView in a real life example.
Read the rest of this entry »

Drawing a spline in the viewport

by .

In this article we show a handy function for drawing a spline in the viewport.
Read the rest of this entry »

Drawing text in the viewport

by .

In this article we show a handy function for drawing text in the viewport.
Read the rest of this entry »

2D viewport drawing using a SceneHook

by .

If you wrote a plugin that draws stuff in the viewport before, you might remember running into some difficulties.
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 »