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 Omspin

Omspin

Attributes

  • ENGLISH NAME : X-ParticlesSpinModifier
  • NAME : Omspin
  • INCLUDE : Obase
  • PATH : res/description/omspin.res
  • PLUGIN : X-Particles
  • MAXON online help (may not exist): OMSPIN

Elements

ID UI Name Type Parameters Cycle
XMSI_SPIN_ENABLED Enabled BOOL  
XMSI_SPIN_MODE Mode LONG  
SPIN_MODE_INDEP Independent
SPIN_MODE_ACTION Action-Controlled
XMSI_SPIN_OPERATION Operation LONG  
XMSI_SPINOP_SPIN Spin
XMSI_SPINOP_ROT Rotate
XMSI_SPIN_VALUE SpinAmount VECTOR
UNIT DEGREE
STEP 1.0
MIN -45.0
MAX 45.0
XMSI_SPIN_INCR IncrementSpin BOOL  
XMSI_SPIN_INCR_VALUE IncrementValue VECTOR
UNIT DEGREE
STEP 0.1
MIN -45.0
MAX 45.0
XMSI_SPIN_INCR_CLAMP ClampSpin BOOL  
XMSI_SPIN_INCR_CLAMP_VALUE ClampTo VECTOR
UNIT DEGREE
STEP 1.0
MIN -45.0
MAX 45.0
XMSI_SPIN_RANDOMISE RandomizeSpin BOOL  
XMSI_SPIN_RANDOM_UNIDIRECT Unidirectional BOOL  
XMSI_SPIN_RANDOM_VALUES RandomSpinValue VECTOR
UNIT DEGREE
STEP 1.0
MIN -45.0
MAX 45.0
XMSI_ROT_MODE RotationMode LONG  
XMSI_ROT_MODE_ABSOLUTE Absolute
XMSI_ROT_MODE_RELATIVE Relative
XMSI_ROT_MODE_FACE_CAMERA FaceCamera
XMSI_ROT_MODE_FACE_OBJECT FaceObject
XMSI_ROT_FACEOBJECT Object LINK  
XMSI_ROT_ROTATION Rotation VECTOR UNIT
XMSI_ROT_USETIME UseTime BOOL  
XMSI_ROT_TIME Time BASETIME  
XMSI_SPIN_GROUP Groups IN_EXCLUDE
NUM_FLAGS 2
INIT_STATE 3
SEND_SELCHNGMSG 1
SCALE_V
IMAGE_01_ON 1009316
IMAGE_01_OFF 1009320
IMAGE_02_ON 300000231
IMAGE_02_OFF 300000230

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.Omspin)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    obj[c4d.XMSI_SPIN_ENABLED] = True
    obj[c4d.XMSI_SPIN_MODE] = c4d.SPIN_MODE_INDEP
    obj[c4d.XMSI_SPIN_OPERATION] = c4d.XMSI_SPINOP_SPIN
    obj[c4d.XMSI_SPIN_VALUE] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMSI_SPIN_INCR] = True
    obj[c4d.XMSI_SPIN_INCR_VALUE] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMSI_SPIN_INCR_CLAMP] = True
    obj[c4d.XMSI_SPIN_INCR_CLAMP_VALUE] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMSI_SPIN_RANDOMISE] = True
    obj[c4d.XMSI_SPIN_RANDOM_UNIDIRECT] = True
    obj[c4d.XMSI_SPIN_RANDOM_VALUES] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMSI_ROT_MODE] = c4d.XMSI_ROT_MODE_ABSOLUTE
    obj[c4d.XMSI_ROT_ROTATION] = c4d.Vector(1.0,1.0,1.0)
    obj[c4d.XMSI_ROT_USETIME] = True
    
    #Second way, using the base container.
    bc = obj.GetDataInstance()
    bc.SetBool(c4d.XMSI_SPIN_ENABLED,True)
    bc.SetInt32(c4d.XMSI_SPIN_MODE,c4d.SPIN_MODE_INDEP)
    bc.SetInt32(c4d.XMSI_SPIN_OPERATION,c4d.XMSI_SPINOP_SPIN)
    bc.SetVector(c4d.XMSI_SPIN_VALUE, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.XMSI_SPIN_INCR,True)
    bc.SetVector(c4d.XMSI_SPIN_INCR_VALUE, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.XMSI_SPIN_INCR_CLAMP,True)
    bc.SetVector(c4d.XMSI_SPIN_INCR_CLAMP_VALUE, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.XMSI_SPIN_RANDOMISE,True)
    bc.SetBool(c4d.XMSI_SPIN_RANDOM_UNIDIRECT,True)
    bc.SetVector(c4d.XMSI_SPIN_RANDOM_VALUES, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.XMSI_ROT_MODE,c4d.XMSI_ROT_MODE_ABSOLUTE)
    bc.SetVector(c4d.XMSI_ROT_ROTATION, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.XMSI_ROT_USETIME,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../res/description/omspin.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Omspin);
    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(XMSI_SPIN_ENABLED),GeData(true),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_MODE),GeData(SPIN_MODE_INDEP),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_OPERATION),GeData(XMSI_SPINOP_SPIN),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_VALUE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_INCR),GeData(true),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_INCR_VALUE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_INCR_CLAMP),GeData(true),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_INCR_CLAMP_VALUE),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_RANDOMISE),GeData(true),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_RANDOM_UNIDIRECT),GeData(true),flags);
    pObject->SetParameter(DescID(XMSI_SPIN_RANDOM_VALUES),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMSI_ROT_MODE),GeData(XMSI_ROT_MODE_ABSOLUTE),flags);
    pObject->SetParameter(DescID(XMSI_ROT_ROTATION),GeData(Vector(1.0,1.0,1.0)),flags);
    pObject->SetParameter(DescID(XMSI_ROT_USETIME),GeData(true),flags);
    pObject->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pObject->GetDataInstance();
    bc->SetBool(XMSI_SPIN_ENABLED,true);
    bc->SetInt32(XMSI_SPIN_MODE,SPIN_MODE_INDEP);
    bc->SetInt32(XMSI_SPIN_OPERATION,XMSI_SPINOP_SPIN);
    bc->SetVector(XMSI_SPIN_VALUE, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(XMSI_SPIN_INCR,true);
    bc->SetVector(XMSI_SPIN_INCR_VALUE, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(XMSI_SPIN_INCR_CLAMP,true);
    bc->SetVector(XMSI_SPIN_INCR_CLAMP_VALUE, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(XMSI_SPIN_RANDOMISE,true);
    bc->SetBool(XMSI_SPIN_RANDOM_UNIDIRECT,true);
    bc->SetVector(XMSI_SPIN_RANDOM_VALUES, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(XMSI_ROT_MODE,XMSI_ROT_MODE_ABSOLUTE);
    bc->SetVector(XMSI_ROT_ROTATION, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(XMSI_ROT_USETIME,true);
    pObject->Message(MSG_UPDATE);                                                      
}