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 Omograph_cloner

Omograph_cloner

Attributes

  • ENGLISH NAME : ClonerObject
  • NAME : Omograph_cloner
  • INCLUDE : Obasemogen
  • PATH : mograph/description/omograph_cloner.res
  • PLUGIN : mograph
  • MAXON online help (may not exist): OMOGRAPH_CLONER

Elements

ID UI Name Type Parameters Cycle
MGCLONER_MODE Clones LONG  
MGCLONER_MODE_ITERATE Iterate
MGCLONER_MODE_RANDOM Random
MGCLONER_MODE_BLEND Blend
MGCLONER_MODE_SORT Sort
MGCLONER_FIX_CLONES ResetCoordinates BOOL  
MGCLONER_FIX_TEXTURE FixTexture LONG  
MGCLONER_FIX_TEXTURE_OFF Off
MGCLONER_FIX_TEXTURE_STRAIGHT Straight
MGCLONER_FIX_TEXTURE_ALTX AlternateX
MGCLONER_FIX_TEXTURE_ALTY AlternateY
MGCLONER_VOLUMEINSTANCES_MODE InstanceMode LONG  
MGCLONER_VOLUMEINSTANCES_MODE_NONE Instance
MGCLONER_VOLUMEINSTANCES_MODE_RENDERINSTANCE RenderInstance
MGCLONER_VOLUMEINSTANCES_MODE_RENDERMULTIINSTANCE Multi-Instance
MGCLONER_MULTIINSTANCE_DRAW_MODE ViewportMode LONG ANIM
MGCLONER_MULTIINSTANCE_DRAW_MODE_NONE Off
MGCLONER_MULTIINSTANCE_DRAW_MODE_POINTS Points
MGCLONER_MULTIINSTANCE_DRAW_MODE_CUBE Matrix
MGCLONER_MULTIINSTANCE_DRAW_MODE_BBOX BoundingBox
MGCLONER_MULTIINSTANCE_DRAW_MODE_FULL Object
MGCLONER_SEED Seed LONG MIN
MGCLONER_ANIMATIONMODE AnimationMode LONG  
MGCLONER_ANIMATIONMODE_PLAY Play
MGCLONER_ANIMATIONMODE_LOOP Loop
MGCLONER_ANIMATIONMODE_FIXED Fixed
MGCLONER_ANIMATIONMODE_FIXEDLOOP FixedLoop

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.Omograph_cloner)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MGCLONER_MODE] = c4d.MGCLONER_MODE_ITERATE
    obj[c4d.MGCLONER_FIX_CLONES] = True
    obj[c4d.MGCLONER_FIX_TEXTURE] = c4d.MGCLONER_FIX_TEXTURE_OFF
    obj[c4d.MGCLONER_VOLUMEINSTANCES_MODE] = c4d.MGCLONER_VOLUMEINSTANCES_MODE_NONE
    obj[c4d.MGCLONER_MULTIINSTANCE_DRAW_MODE] = c4d.MGCLONER_MULTIINSTANCE_DRAW_MODE_NONE
    obj[c4d.MGCLONER_SEED] = 1
    obj[c4d.MGCLONER_ANIMATIONMODE] = c4d.MGCLONER_ANIMATIONMODE_PLAY
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.MGCLONER_MODE,c4d.MGCLONER_MODE_ITERATE)
    bc.SetBool(c4d.MGCLONER_FIX_CLONES,True)
    bc.SetInt32(c4d.MGCLONER_FIX_TEXTURE,c4d.MGCLONER_FIX_TEXTURE_OFF)
    bc.SetInt32(c4d.MGCLONER_VOLUMEINSTANCES_MODE,c4d.MGCLONER_VOLUMEINSTANCES_MODE_NONE)
    bc.SetInt32(c4d.MGCLONER_MULTIINSTANCE_DRAW_MODE,c4d.MGCLONER_MULTIINSTANCE_DRAW_MODE_NONE)
    bc.SetInt32(c4d.MGCLONER_SEED,1)
    bc.SetInt32(c4d.MGCLONER_ANIMATIONMODE,c4d.MGCLONER_ANIMATIONMODE_PLAY)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/omograph_cloner.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omograph_cloner);
    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(MGCLONER_MODE),GeData(MGCLONER_MODE_ITERATE),flags);
    pObject->SetParameter(DescID(MGCLONER_FIX_CLONES),GeData(true),flags);
    pObject->SetParameter(DescID(MGCLONER_FIX_TEXTURE),GeData(MGCLONER_FIX_TEXTURE_OFF),flags);
    pObject->SetParameter(DescID(MGCLONER_VOLUMEINSTANCES_MODE),GeData(MGCLONER_VOLUMEINSTANCES_MODE_NONE),flags);
    pObject->SetParameter(DescID(MGCLONER_MULTIINSTANCE_DRAW_MODE),GeData(MGCLONER_MULTIINSTANCE_DRAW_MODE_NONE),flags);
    pObject->SetParameter(DescID(MGCLONER_SEED),GeData(1),flags);
    pObject->SetParameter(DescID(MGCLONER_ANIMATIONMODE),GeData(MGCLONER_ANIMATIONMODE_PLAY),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(MGCLONER_MODE,MGCLONER_MODE_ITERATE);
    bc->SetBool(MGCLONER_FIX_CLONES,true);
    bc->SetInt32(MGCLONER_FIX_TEXTURE,MGCLONER_FIX_TEXTURE_OFF);
    bc->SetInt32(MGCLONER_VOLUMEINSTANCES_MODE,MGCLONER_VOLUMEINSTANCES_MODE_NONE);
    bc->SetInt32(MGCLONER_MULTIINSTANCE_DRAW_MODE,MGCLONER_MULTIINSTANCE_DRAW_MODE_NONE);
    bc->SetInt32(MGCLONER_SEED,1);
    bc->SetInt32(MGCLONER_ANIMATIONMODE,MGCLONER_ANIMATIONMODE_PLAY);
    pObject->Message(MSG_UPDATE);                                                      
}