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 Tinteraction

Tinteraction

Attributes

  • ENGLISH NAME : InteractionTag
  • NAME : Tinteraction
  • INCLUDE : Tbase
  • PATH : model/description/tinteraction.res
  • PLUGIN : model
  • MAXON online help (may not exist): TINTERACTION

Elements

ID UI Name Type Parameters Cycle
INTERACTIONTAG_ENABLE Enabled BOOL ANIM
INTERACTIONTAG_TWEAKABLE Tweakable BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_SELECT DisableViewportSelection BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_SELECTEDTWEAKMODE WhenSelected LONG
ANIM OFF
SCALE_H
INTERACTIONTAG_SELECTEDTWEAKMODE_INVOKE InvokeOnTransform
INTERACTIONTAG_SELECTEDTWEAKMODE_DISABLE DisableTag
INTERACTIONTAG_SELECTEDTWEAKMODE_ALWAYS AlwaysTweak
INTERACTIONTAG_DISABLEMOVE DisableTransforms BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_HIGHLIGHT HighlightObject BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_HIDE_MOUSE HideMouseOnDrag BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_HIDE_OBJECT HideObject BOOL
ANIM OFF
SCALE_H
INTERACTIONTAG_SCRIPT_LANGUAGE ScriptingLanguage LONG
ANIM OFF
SCALE_H
INTERACTIONTAG_SCRIPT_LANGUAGE_NONE None
INTERACTIONTAG_SCRIPT_LANGUAGE_PYTHON Python
INTERACTIONTAG_SCRIPT_LANGUAGE_COFFEE COFFEE(DisplayOnly)
INTERACTIONTAG_SCRIPT_PY Script STRING
ANIM OFF
PYTHON
CUSTOMGUI MULTISTRING
SCALE_V
SCALE_H
INTERACTIONTAG_SCRIPT_COF Script STRING
ANIM OFF
CUSTOMGUI MULTISTRING
READONLY
SCALE_V
SCALE_H
INTERACTIONTAG_EDIT_SCRIPT EditScript BUTTON ANIM
INTERACTIONTAG_USERIGHTMOUSE UseRightMouseButton BOOL ANIM
INTERACTIONTAG_OBJECT_SELECTED ObjectIsSelected BOOL ANIM
INTERACTIONTAG_OBJECT_HIGHLIGHTED ObjectIsHighlighted BOOL ANIM
INTERACTIONTAG_OBJECT_TWEAKED ObjectIsBeingTweaked BOOL ANIM
INTERACTIONTAG_MOUSE_BUTTON MouseButton LONG ANIM
INTERACTIONTAG_MOUSE_BUTTON_UP None
INTERACTIONTAG_MOUSE_BUTTON_LEFT Left
INTERACTIONTAG_MOUSE_BUTTON_RIGHT Right
INTERACTIONTAG_XMOUSE XMouse LONG ANIM
INTERACTIONTAG_YMOUSE YMouse LONG ANIM
INTERACTIONTAG_MOUSE_PRESSURE PenPressure REAL
ANIM OFF
UNIT PERCENT
MIN 0
MINSLIDER 0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
INTERACTIONTAG_MOUSE_TILT PenTilt REAL
ANIM OFF
UNIT PERCENT
MIN 0
MINSLIDER 0
MAXSLIDER 100.0
CUSTOMGUI REALSLIDER
INTERACTIONTAG_MOUSE_ANGLE PenAngle REAL
ANIM OFF
UNIT DEGREE
INTERACTIONTAG_MOUSE_WHEEL MouseWheel REAL ANIM
INTERACTIONTAG_XPIXELS XPixels LONG ANIM
INTERACTIONTAG_YPIXELS YPixels LONG ANIM
INTERACTIONTAG_MOUSE_TRAVEL MouseTravel REAL ANIM
INTERACTIONTAG_WORLD_DELTA ObjectDelta VECTOR ANIM
INTERACTIONTAG_USEPOLYINFO CalculatePolygonInfo BOOL ANIM
INTERACTIONTAG_LIVEPOLYINFO LiveUpdateDuringDrag BOOL ANIM
INTERACTIONTAG_POLYINFO_HIT Hit BOOL ANIM
INTERACTIONTAG_POLYINFO_HITPOINT HitPoint VECTOR ANIM
INTERACTIONTAG_POLYINFO_POLYGON PolygonIndex LONG
MAX 1000000000
ANIM OFF
INTERACTIONTAG_POLYINFO_EDGE EdgeIndex LONG
MAX 1000000000
ANIM OFF
INTERACTIONTAG_POLYINFO_POINT PointIndex LONG
MAX 1000000000
ANIM OFF
INTERACTIONTAG_POLYINFO_SELECTIONTAG SelectionTag LINK ANIM
INTERACTIONTAG_POLYINFO_SELECTIONTAGINDEX SelectionTagIndex LONG ANIM
INTERACTIONTAG_PROXY_OBJECT ProxyObject LINK ANIM
INTERACTIONTAG_HIGHLIGHT_PROXY HighlightProxyObject BOOL ANIM
INTERACTIONTAG_SELECT_PROXY SelectProxy BOOL ANIM
INTERACTIONTAG_TWEAK_PROXY TransformProxy BOOL ANIM
INTERACTIONTAG_POLYINFO_USETAGPROXY DynamicProxies BOOL ANIM
INTERACTIONTAG_POLYINFO_TAGPROXY TagProxy LINK
ANIM OFF
HIDDEN

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.Tinteraction)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.INTERACTIONTAG_ENABLE] = True
    tag[c4d.INTERACTIONTAG_TWEAKABLE] = True
    tag[c4d.INTERACTIONTAG_SELECT] = True
    tag[c4d.INTERACTIONTAG_SELECTEDTWEAKMODE] = c4d.INTERACTIONTAG_SELECTEDTWEAKMODE_INVOKE
    tag[c4d.INTERACTIONTAG_DISABLEMOVE] = True
    tag[c4d.INTERACTIONTAG_HIGHLIGHT] = True
    tag[c4d.INTERACTIONTAG_HIDE_MOUSE] = True
    tag[c4d.INTERACTIONTAG_HIDE_OBJECT] = True
    tag[c4d.INTERACTIONTAG_SCRIPT_LANGUAGE] = c4d.INTERACTIONTAG_SCRIPT_LANGUAGE_NONE
    tag[c4d.INTERACTIONTAG_SCRIPT_PY] = "Hello World"
    tag[c4d.INTERACTIONTAG_SCRIPT_COF] = "Hello World"
    tag[c4d.INTERACTIONTAG_USERIGHTMOUSE] = True
    tag[c4d.INTERACTIONTAG_OBJECT_SELECTED] = True
    tag[c4d.INTERACTIONTAG_OBJECT_HIGHLIGHTED] = True
    tag[c4d.INTERACTIONTAG_OBJECT_TWEAKED] = True
    tag[c4d.INTERACTIONTAG_MOUSE_BUTTON] = c4d.INTERACTIONTAG_MOUSE_BUTTON_UP
    tag[c4d.INTERACTIONTAG_XMOUSE] = 1
    tag[c4d.INTERACTIONTAG_YMOUSE] = 1
    tag[c4d.INTERACTIONTAG_MOUSE_PRESSURE] = 0.1
    tag[c4d.INTERACTIONTAG_MOUSE_TILT] = 0.1
    tag[c4d.INTERACTIONTAG_MOUSE_ANGLE] = 0.1
    tag[c4d.INTERACTIONTAG_MOUSE_WHEEL] = 0.1
    tag[c4d.INTERACTIONTAG_XPIXELS] = 1
    tag[c4d.INTERACTIONTAG_YPIXELS] = 1
    tag[c4d.INTERACTIONTAG_MOUSE_TRAVEL] = 0.1
    tag[c4d.INTERACTIONTAG_WORLD_DELTA] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.INTERACTIONTAG_USEPOLYINFO] = True
    tag[c4d.INTERACTIONTAG_LIVEPOLYINFO] = True
    tag[c4d.INTERACTIONTAG_POLYINFO_HIT] = True
    tag[c4d.INTERACTIONTAG_POLYINFO_HITPOINT] = c4d.Vector(1.0,1.0,1.0)
    tag[c4d.INTERACTIONTAG_POLYINFO_POLYGON] = 1
    tag[c4d.INTERACTIONTAG_POLYINFO_EDGE] = 1
    tag[c4d.INTERACTIONTAG_POLYINFO_POINT] = 1
    tag[c4d.INTERACTIONTAG_POLYINFO_SELECTIONTAGINDEX] = 1
    tag[c4d.INTERACTIONTAG_HIGHLIGHT_PROXY] = True
    tag[c4d.INTERACTIONTAG_SELECT_PROXY] = True
    tag[c4d.INTERACTIONTAG_TWEAK_PROXY] = True
    tag[c4d.INTERACTIONTAG_POLYINFO_USETAGPROXY] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetBool(c4d.INTERACTIONTAG_ENABLE,True)
    bc.SetBool(c4d.INTERACTIONTAG_TWEAKABLE,True)
    bc.SetBool(c4d.INTERACTIONTAG_SELECT,True)
    bc.SetInt32(c4d.INTERACTIONTAG_SELECTEDTWEAKMODE,c4d.INTERACTIONTAG_SELECTEDTWEAKMODE_INVOKE)
    bc.SetBool(c4d.INTERACTIONTAG_DISABLEMOVE,True)
    bc.SetBool(c4d.INTERACTIONTAG_HIGHLIGHT,True)
    bc.SetBool(c4d.INTERACTIONTAG_HIDE_MOUSE,True)
    bc.SetBool(c4d.INTERACTIONTAG_HIDE_OBJECT,True)
    bc.SetInt32(c4d.INTERACTIONTAG_SCRIPT_LANGUAGE,c4d.INTERACTIONTAG_SCRIPT_LANGUAGE_NONE)
    bc.SetString(c4d.INTERACTIONTAG_SCRIPT_PY,"Hello World")
    bc.SetString(c4d.INTERACTIONTAG_SCRIPT_COF,"Hello World")
    bc.SetBool(c4d.INTERACTIONTAG_USERIGHTMOUSE,True)
    bc.SetBool(c4d.INTERACTIONTAG_OBJECT_SELECTED,True)
    bc.SetBool(c4d.INTERACTIONTAG_OBJECT_HIGHLIGHTED,True)
    bc.SetBool(c4d.INTERACTIONTAG_OBJECT_TWEAKED,True)
    bc.SetInt32(c4d.INTERACTIONTAG_MOUSE_BUTTON,c4d.INTERACTIONTAG_MOUSE_BUTTON_UP)
    bc.SetInt32(c4d.INTERACTIONTAG_XMOUSE,1)
    bc.SetInt32(c4d.INTERACTIONTAG_YMOUSE,1)
    bc.SetFloat(c4d.INTERACTIONTAG_MOUSE_PRESSURE,0.1)
    bc.SetFloat(c4d.INTERACTIONTAG_MOUSE_TILT,0.1)
    bc.SetFloat(c4d.INTERACTIONTAG_MOUSE_ANGLE,0.1)
    bc.SetFloat(c4d.INTERACTIONTAG_MOUSE_WHEEL,0.1)
    bc.SetInt32(c4d.INTERACTIONTAG_XPIXELS,1)
    bc.SetInt32(c4d.INTERACTIONTAG_YPIXELS,1)
    bc.SetFloat(c4d.INTERACTIONTAG_MOUSE_TRAVEL,0.1)
    bc.SetVector(c4d.INTERACTIONTAG_WORLD_DELTA, c4d.Vector(1.0,1.0,1.0)
    bc.SetBool(c4d.INTERACTIONTAG_USEPOLYINFO,True)
    bc.SetBool(c4d.INTERACTIONTAG_LIVEPOLYINFO,True)
    bc.SetBool(c4d.INTERACTIONTAG_POLYINFO_HIT,True)
    bc.SetVector(c4d.INTERACTIONTAG_POLYINFO_HITPOINT, c4d.Vector(1.0,1.0,1.0)
    bc.SetInt32(c4d.INTERACTIONTAG_POLYINFO_POLYGON,1)
    bc.SetInt32(c4d.INTERACTIONTAG_POLYINFO_EDGE,1)
    bc.SetInt32(c4d.INTERACTIONTAG_POLYINFO_POINT,1)
    bc.SetInt32(c4d.INTERACTIONTAG_POLYINFO_SELECTIONTAGINDEX,1)
    bc.SetBool(c4d.INTERACTIONTAG_HIGHLIGHT_PROXY,True)
    bc.SetBool(c4d.INTERACTIONTAG_SELECT_PROXY,True)
    bc.SetBool(c4d.INTERACTIONTAG_TWEAK_PROXY,True)
    bc.SetBool(c4d.INTERACTIONTAG_POLYINFO_USETAGPROXY,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../model/description/tinteraction.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(Tinteraction);
    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(INTERACTIONTAG_ENABLE),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_TWEAKABLE),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SELECT),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SELECTEDTWEAKMODE),GeData(INTERACTIONTAG_SELECTEDTWEAKMODE_INVOKE),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_DISABLEMOVE),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_HIGHLIGHT),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_HIDE_MOUSE),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_HIDE_OBJECT),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SCRIPT_LANGUAGE),GeData(INTERACTIONTAG_SCRIPT_LANGUAGE_NONE),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SCRIPT_PY),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SCRIPT_COF),GeData("Hello World"),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_USERIGHTMOUSE),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_OBJECT_SELECTED),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_OBJECT_HIGHLIGHTED),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_OBJECT_TWEAKED),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_BUTTON),GeData(INTERACTIONTAG_MOUSE_BUTTON_UP),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_XMOUSE),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_YMOUSE),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_PRESSURE),GeData(0.1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_TILT),GeData(0.1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_ANGLE),GeData(0.1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_WHEEL),GeData(0.1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_XPIXELS),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_YPIXELS),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_MOUSE_TRAVEL),GeData(0.1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_WORLD_DELTA),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_USEPOLYINFO),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_LIVEPOLYINFO),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_HIT),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_HITPOINT),GeData(Vector(1.0,1.0,1.0)),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_POLYGON),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_EDGE),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_POINT),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_SELECTIONTAGINDEX),GeData(1),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_HIGHLIGHT_PROXY),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_SELECT_PROXY),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_TWEAK_PROXY),GeData(true),flags);
    pTag->SetParameter(DescID(INTERACTIONTAG_POLYINFO_USETAGPROXY),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetBool(INTERACTIONTAG_ENABLE,true);
    bc->SetBool(INTERACTIONTAG_TWEAKABLE,true);
    bc->SetBool(INTERACTIONTAG_SELECT,true);
    bc->SetInt32(INTERACTIONTAG_SELECTEDTWEAKMODE,INTERACTIONTAG_SELECTEDTWEAKMODE_INVOKE);
    bc->SetBool(INTERACTIONTAG_DISABLEMOVE,true);
    bc->SetBool(INTERACTIONTAG_HIGHLIGHT,true);
    bc->SetBool(INTERACTIONTAG_HIDE_MOUSE,true);
    bc->SetBool(INTERACTIONTAG_HIDE_OBJECT,true);
    bc->SetInt32(INTERACTIONTAG_SCRIPT_LANGUAGE,INTERACTIONTAG_SCRIPT_LANGUAGE_NONE);
    bc->SetString(INTERACTIONTAG_SCRIPT_PY,"Hello World");
    bc->SetString(INTERACTIONTAG_SCRIPT_COF,"Hello World");
    bc->SetBool(INTERACTIONTAG_USERIGHTMOUSE,true);
    bc->SetBool(INTERACTIONTAG_OBJECT_SELECTED,true);
    bc->SetBool(INTERACTIONTAG_OBJECT_HIGHLIGHTED,true);
    bc->SetBool(INTERACTIONTAG_OBJECT_TWEAKED,true);
    bc->SetInt32(INTERACTIONTAG_MOUSE_BUTTON,INTERACTIONTAG_MOUSE_BUTTON_UP);
    bc->SetInt32(INTERACTIONTAG_XMOUSE,1);
    bc->SetInt32(INTERACTIONTAG_YMOUSE,1);
    bc->SetFloat(INTERACTIONTAG_MOUSE_PRESSURE,0.1);
    bc->SetFloat(INTERACTIONTAG_MOUSE_TILT,0.1);
    bc->SetFloat(INTERACTIONTAG_MOUSE_ANGLE,0.1);
    bc->SetFloat(INTERACTIONTAG_MOUSE_WHEEL,0.1);
    bc->SetInt32(INTERACTIONTAG_XPIXELS,1);
    bc->SetInt32(INTERACTIONTAG_YPIXELS,1);
    bc->SetFloat(INTERACTIONTAG_MOUSE_TRAVEL,0.1);
    bc->SetVector(INTERACTIONTAG_WORLD_DELTA, c4d.Vector(1.0,1.0,1.0);
    bc->SetBool(INTERACTIONTAG_USEPOLYINFO,true);
    bc->SetBool(INTERACTIONTAG_LIVEPOLYINFO,true);
    bc->SetBool(INTERACTIONTAG_POLYINFO_HIT,true);
    bc->SetVector(INTERACTIONTAG_POLYINFO_HITPOINT, c4d.Vector(1.0,1.0,1.0);
    bc->SetInt32(INTERACTIONTAG_POLYINFO_POLYGON,1);
    bc->SetInt32(INTERACTIONTAG_POLYINFO_EDGE,1);
    bc->SetInt32(INTERACTIONTAG_POLYINFO_POINT,1);
    bc->SetInt32(INTERACTIONTAG_POLYINFO_SELECTIONTAGINDEX,1);
    bc->SetBool(INTERACTIONTAG_HIGHLIGHT_PROXY,true);
    bc->SetBool(INTERACTIONTAG_SELECT_PROXY,true);
    bc->SetBool(INTERACTIONTAG_TWEAK_PROXY,true);
    bc->SetBool(INTERACTIONTAG_POLYINFO_USETAGPROXY,true);
    pTag->Message(MSG_UPDATE);                                                      
}
             

Buttons

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

Python

c4d.CallButton(tag,c4d.INTERACTIONTAG_EDIT_SCRIPT)

C++

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