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_matrix

Omograph_matrix

Attributes

  • ENGLISH NAME : MatrixObject
  • NAME : Omograph_matrix
  • INCLUDE : Obasemogen
  • PATH : mograph/description/omograph_matrix.res
  • PLUGIN : mograph
  • MAXON online help (may not exist): OMOGRAPH_MATRIX

Elements

ID UI Name Type Parameters Cycle
MGMATRIXOBJECT_MODE Generate LONG  
MGMATRIXOBJECT_MODE_MATRIX MatricesOnly
MGMATRIXOBJECT_MODE_TP ThinkingParticles
MGMATRIXOBJECT_PARTICLE_GROUP TPGroup LINK  
MGMATRIXOBJECT_PARTICLE_BLENDFOLLOW Follow REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
MGMATRIXOBJECT_PARTICLE_BLENDDIRECT Constrain REAL
UNIT PERCENT
MIN 0.0
MAX 100.0
CUSTOMGUI REALSLIDER
MGMATRIXOBJECT_TPPRIORITY ParticlePriority LONG  
MGMATRIXOBJECT_TPPRIORITY_BEFORE BeforeEffectors
MGMATRIXOBJECT_TPPRIORITY_AFTER AfterEffectors

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_matrix)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.MGMATRIXOBJECT_MODE] = c4d.MGMATRIXOBJECT_MODE_MATRIX
    obj[c4d.MGMATRIXOBJECT_PARTICLE_BLENDFOLLOW] = 0.1
    obj[c4d.MGMATRIXOBJECT_PARTICLE_BLENDDIRECT] = 0.1
    obj[c4d.MGMATRIXOBJECT_TPPRIORITY] = c4d.MGMATRIXOBJECT_TPPRIORITY_BEFORE
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetInt32(c4d.MGMATRIXOBJECT_MODE,c4d.MGMATRIXOBJECT_MODE_MATRIX)
    bc.SetFloat(c4d.MGMATRIXOBJECT_PARTICLE_BLENDFOLLOW,0.1)
    bc.SetFloat(c4d.MGMATRIXOBJECT_PARTICLE_BLENDDIRECT,0.1)
    bc.SetInt32(c4d.MGMATRIXOBJECT_TPPRIORITY,c4d.MGMATRIXOBJECT_TPPRIORITY_BEFORE)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../mograph/description/omograph_matrix.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omograph_matrix);
    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(MGMATRIXOBJECT_MODE),GeData(MGMATRIXOBJECT_MODE_MATRIX),flags);
    pObject->SetParameter(DescID(MGMATRIXOBJECT_PARTICLE_BLENDFOLLOW),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGMATRIXOBJECT_PARTICLE_BLENDDIRECT),GeData(0.1),flags);
    pObject->SetParameter(DescID(MGMATRIXOBJECT_TPPRIORITY),GeData(MGMATRIXOBJECT_TPPRIORITY_BEFORE),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetInt32(MGMATRIXOBJECT_MODE,MGMATRIXOBJECT_MODE_MATRIX);
    bc->SetFloat(MGMATRIXOBJECT_PARTICLE_BLENDFOLLOW,0.1);
    bc->SetFloat(MGMATRIXOBJECT_PARTICLE_BLENDDIRECT,0.1);
    bc->SetInt32(MGMATRIXOBJECT_TPPRIORITY,MGMATRIXOBJECT_TPPRIORITY_BEFORE);
    pObject->Message(MSG_UPDATE);                                                      
}