Creating a fracture Object in COFFEE [SOLVED]

On 03/01/2015 at 03:54, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   R16 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;

Hi everybody,
first of all, happy new year to all.

I have been trying to find something about the fracture object in the SDK, basically how to create one in COFFEE, but there seems to be nothing at all.

Could you point me to the right direction?
BTW, I don't want to use a CallCommand.


On 03/01/2015 at 06:45, xxxxxxxx wrote:

Hi T 😉

A happy new year to you as well.

Basically, you use the ID you would use in a CallCommand to create the object. So if the Script Log
gives you

CallCommand(1018791); // Fracture

You can use this code instead to create the object without a CallCommand() and insert it manually.

var obj = AllocObject(1018791);
doc->InsertObject(obj, NULL, NULL);

And in Python

import c4d
obj = c4d.BaseObject(1018791)


On 03/01/2015 at 06:56, xxxxxxxx wrote:

Hey Niklas, thanks for the reply.
I was hoping that something like "Omograph_fracture" would do it.

The ID way is helpful but it always worries me that that number can change some day and then it won't work.
Any idea why mograph objects can't be created by name? (although I guess it's not only Mograph)

Anyway, thanks again.

On 03/01/2015 at 07:06, xxxxxxxx wrote:

Most likely it will not change because that would break compatibility of scene files. But I agree that a 
symbolic name would be much nicer to use instead of the number.

I don't know why there is no ID for it. Interestingly there are  IDs for the parameters (eg.
MGFRACTUREOBJECT_MODE). The IDs seem to be gathered dynamically, so I can't tell why it
is not included. 🙂


On 03/01/2015 at 07:31, xxxxxxxx wrote:

Thank you again...