Here you will find documentation on all the descriptions that Cinema 4D currently has. You can list them Alphabetically, by Type or Plugin . The sample Python and C++ code is automatically generated and in some cases may not be 100% correct. If something doesn't work then please refer to the official Cinema 4D SDK documentation for more information.

IDs and information for Oxpfractal

Oxpfractal

Attributes

  • ENGLISH NAME : X-ParticlesFractalGenerator
  • NAME : Oxpfractal
  • INCLUDE : Obase
  • PATH : res/description/oxpfractal.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OXPFRACTAL

Elements

ID UI Name Type Parameters Cycle
XMFA_FRACTAL_ENABLED Enabled BOOL  
XMFA_FRACTAL_EMITTER FractalEmitter LINK  
XMFA_FRACTAL_GRIDSIZE Size REAL
UNIT METER
MIN 1.0
MINSLIDER 1.0
MAXSLIDER 500.0
CUSTOMGUI REALSLIDER
XMFA_FRACTAL_GRIDRES Resolution LONG
MIN 1
MINSLIDER 1
MAXSLIDER 1000
CUSTOMGUI LONGSLIDER
XMFA_FRACTAL_ITERATIONS Max.Iterations LONG
MIN 1
MINSLIDER 1
MAXSLIDER 20
CUSTOMGUI LONGSLIDER
XMFA_FRACTAL_POWER Power REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
XMFA_FRACTAL_SPHEREMULT SphereMultiplier REAL
UNIT REAL
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 10.0
CUSTOMGUI REALSLIDER
XMFA_FRACTAL_THRESHOLD Min.Threshold REAL
UNIT METER
STEP 0.01
MIN 0.0
MINSLIDER 0.0
MAXSLIDER 2.0
CUSTOMGUI REALSLIDER
XMFA_FRACTAL_JULIA JuliaSet BOOL  
XMFA_FRACTAL_CVALUE JuliaC-Value VECTOR
UNIT REAL
MIN -100.0
MAX 100.0
XMFA_HELP_BUTTON BITMAPBUTTON  
XMFA_BUTTON_RESET ResettoDefaults BUTTON  
XMFA_BUTTON_SAVE_PRESET SavePreset... BUTTON  
XMFA_BUTTON_LOAD_PRESET LoadPreset... BUTTON  

Example Code

The following code does not use the correct values when setting the data. You should check directly in C4D for the correct values that you should use in place of the ones that are shown. This code is just to show you how to access the values for getting and setting the parameters.

Python

import c4d
from c4d import gui
def main():
    obj = c4d.BaseObject(c4d.Oxpfractal)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMFA_FRACTAL_ENABLED] = True
    obj[c4d.XMFA_FRACTAL_GRIDSIZE] = 0.1
    obj[c4d.XMFA_FRACTAL_GRIDRES] = 1
    obj[c4d.XMFA_FRACTAL_ITERATIONS] = 1
    obj[c4d.XMFA_FRACTAL_POWER] = 0.1
    obj[c4d.XMFA_FRACTAL_SPHEREMULT] = 0.1
    obj[c4d.XMFA_FRACTAL_THRESHOLD] = 0.1
    obj[c4d.XMFA_FRACTAL_JULIA] = True
    obj[c4d.XMFA_FRACTAL_CVALUE] = c4d.Vector(1.0,1.0,1.0)
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMFA_FRACTAL_ENABLED,True)
    bc.SetFloat(c4d.XMFA_FRACTAL_GRIDSIZE,0.1)
    bc.SetInt32(c4d.XMFA_FRACTAL_GRIDRES,1)
    bc.SetInt32(c4d.XMFA_FRACTAL_ITERATIONS,1)
    bc.SetFloat(c4d.XMFA_FRACTAL_POWER,0.1)
    bc.SetFloat(c4d.XMFA_FRACTAL_SPHEREMULT,0.1)
    bc.SetFloat(c4d.XMFA_FRACTAL_THRESHOLD,0.1)
    bc.SetBool(c4d.XMFA_FRACTAL_JULIA,True)
    bc.SetVector(c4d.XMFA_FRACTAL_CVALUE, c4d.Vector(1.0,1.0,1.0)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/oxpfractal.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Oxpfractal);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDO_NEW,pObject);
    pDoc->EndUndo();
    EventAdd(EVENT_FORCEREDRAW);
    
    //You can set parameters two different ways. 

    //First way              
    //Some objects do not store all their data in the container. You need to use GetParameter()/SetParameter() instead. 

    DESCFLAGS_SET flags = DESCFLAGS_SET_PARAM_SET;
    pObject->SetParameter(DescID(XMFA_FRACTAL_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_GRIDSIZE),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_GRIDRES),GeData(1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_ITERATIONS),GeData(1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_POWER),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_SPHEREMULT),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_THRESHOLD),GeData(0.1),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_JULIA),GeData(true),flags);
    pObject->SetParameter(DescID(XMFA_FRACTAL_CVALUE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMFA_FRACTAL_ENABLED,true);
    bc->SetFloat(XMFA_FRACTAL_GRIDSIZE,0.1);
    bc->SetInt32(XMFA_FRACTAL_GRIDRES,1);
    bc->SetInt32(XMFA_FRACTAL_ITERATIONS,1);
    bc->SetFloat(XMFA_FRACTAL_POWER,0.1);
    bc->SetFloat(XMFA_FRACTAL_SPHEREMULT,0.1);
    bc->SetFloat(XMFA_FRACTAL_THRESHOLD,0.1);
    bc->SetBool(XMFA_FRACTAL_JULIA,true);
    bc->SetVector(XMFA_FRACTAL_CVALUE, c4d.Vector(1.0,1.0,1.0);
    pObject->Message(MSG_UPDATE);                                                      
}
             

Buttons

This node has buttons. Buttons can manually be executed by calling the following code

Python

c4d.CallButton(obj,c4d.XMFA_HELP_BUTTON)
c4d.CallButton(obj,c4d.XMFA_BUTTON_RESET)
c4d.CallButton(obj,c4d.XMFA_BUTTON_SAVE_PRESET)
c4d.CallButton(obj,c4d.XMFA_BUTTON_LOAD_PRESET)

C++

DescriptionCommand dc;
dc.id = DescID(XMFA_HELP_BUTTON);             
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(XMFA_BUTTON_RESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XMFA_BUTTON_SAVE_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(XMFA_BUTTON_LOAD_PRESET); pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);