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 tosccontroller

tosccontroller

Attributes

  • ENGLISH NAME : OSCController
  • NAME : tosccontroller
  • INCLUDE : Texpression
  • PATH : interop/description/tosccontroller.res
  • PLUGIN : interop
  • MAXON online help (may not exist): TOSCCONTROLLER

Elements

ID UI Name Type Parameters Cycle
OSC_TRANSFORM_SMOOTHNESS smoothness REAL
MIN 0.0
MAX 1.0
OSC_TRANSFORM_MOVEMENT_SPEED speed[m/s] REAL MIN
OSC_TRANSFORM_XY_MOVEMENT_METHOD_NAME xymovementmethod STRING  
OSC_TRANSFORM_SET_XY_MOVEMENT_METHOD_NAME set BUTTON  
OSC_TRANSFORM_Z_MOVEMENT_METHOD_NAME zmovementmethod STRING  
OSC_TRANSFORM_SET_Z_MOVEMENT_METHOD_NAME set BUTTON  
OSC_TRANSFORM_TOUCH_METHOD_NAME multitouchmethod STRING  
OSC_TRANSFORM_SET_TOUCH_METHOD_NAME set 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.Osphere)
    tag = obj.MakeTag(c4d.tosccontroller)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.OSC_TRANSFORM_SMOOTHNESS] = 0.1
    tag[c4d.OSC_TRANSFORM_MOVEMENT_SPEED] = 0.1
    tag[c4d.OSC_TRANSFORM_XY_MOVEMENT_METHOD_NAME] = "Hello World"
    tag[c4d.OSC_TRANSFORM_Z_MOVEMENT_METHOD_NAME] = "Hello World"
    tag[c4d.OSC_TRANSFORM_TOUCH_METHOD_NAME] = "Hello World"
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetFloat(c4d.OSC_TRANSFORM_SMOOTHNESS,0.1)
    bc.SetFloat(c4d.OSC_TRANSFORM_MOVEMENT_SPEED,0.1)
    bc.SetString(c4d.OSC_TRANSFORM_XY_MOVEMENT_METHOD_NAME,"Hello World")
    bc.SetString(c4d.OSC_TRANSFORM_Z_MOVEMENT_METHOD_NAME,"Hello World")
    bc.SetString(c4d.OSC_TRANSFORM_TOUCH_METHOD_NAME,"Hello World")

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../interop/description/tosccontroller.h"
void SampleFunction()
{
    BaseDocument *pDoc = GetActiveDocument();
    BaseObject *pObject = BaseObject::Alloc(Osphere);
    pDoc->InsertObject(pObject);
    pDoc->StartUndo();
    pDoc->AddUndo(UNDOTYPE_NEW,pObject);
    pDoc->EndUndo();
    pDoc->StartUndo();
    BaseTag *pTag = pObject->MakeTag(tosccontroller);
    pDoc->AddUndo(UNDOTYPE_NEW,pTag);
    pDoc->EndUndo();
    pObject->Message(MSG_UPDATE);
    
    //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;
    pTag->SetParameter(DescID(OSC_TRANSFORM_SMOOTHNESS),GeData(0.1),flags);
    pTag->SetParameter(DescID(OSC_TRANSFORM_MOVEMENT_SPEED),GeData(0.1),flags);
    pTag->SetParameter(DescID(OSC_TRANSFORM_XY_MOVEMENT_METHOD_NAME),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(OSC_TRANSFORM_Z_MOVEMENT_METHOD_NAME),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(OSC_TRANSFORM_TOUCH_METHOD_NAME),GeData("Hello World"),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetFloat(OSC_TRANSFORM_SMOOTHNESS,0.1);
    bc->SetFloat(OSC_TRANSFORM_MOVEMENT_SPEED,0.1);
    bc->SetString(OSC_TRANSFORM_XY_MOVEMENT_METHOD_NAME,"Hello World");
    bc->SetString(OSC_TRANSFORM_Z_MOVEMENT_METHOD_NAME,"Hello World");
    bc->SetString(OSC_TRANSFORM_TOUCH_METHOD_NAME,"Hello World");
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.OSC_TRANSFORM_SET_XY_MOVEMENT_METHOD_NAME)
c4d.CallButton(tag,c4d.OSC_TRANSFORM_SET_Z_MOVEMENT_METHOD_NAME)
c4d.CallButton(tag,c4d.OSC_TRANSFORM_SET_TOUCH_METHOD_NAME)

C++

DescriptionCommand dc;
dc.id = DescID(OSC_TRANSFORM_SET_XY_MOVEMENT_METHOD_NAME);             
pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);

DescriptionCommand dc; dc.id = DescID(OSC_TRANSFORM_SET_Z_MOVEMENT_METHOD_NAME); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc; dc.id = DescID(OSC_TRANSFORM_SET_TOUCH_METHOD_NAME); pTag->Message(MSG_DESCRIPTION_COMMAND, &dc);