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 tdeltamush

tdeltamush

Attributes

  • ENGLISH NAME : DeltaMushTag
  • NAME : tdeltamush
  • INCLUDE : Texpression
  • PATH : deltamush/description/tdeltamush.res
  • PLUGIN : deltamush
  • MAXON online help (may not exist): TDELTAMUSH

Elements

ID UI Name Type Parameters Cycle
ID_TDELTAMUSH_WEIGHT Strength REAL
CUSTOMGUI REALSLIDER
MINSLIDER 0.0
MAXSLIDER 100.0
STEP 0.05
UNIT PERCENT
ID_TDELTAMUSH_SMOOTH_ITERATION Iterations LONG
CUSTOMGUI LONGSLIDER
MIN 0
MINSLIDER 0
MAXSLIDER 200
STEP 1
ID_TDELTAMUSH_PREV_SMOOTH SmoothView REAL
CUSTOMGUI REALSLIDER
MINSLIDER 0.0
MAXSLIDER 100.0
STEP 0.05
UNIT PERCENT
ID_TDELTAMUSH_TANGENT_TYPE TangentMode LONG  
ID_TDELTAMUSH_TANGENT_A Edge
ID_TDELTAMUSH_TANGENT_B NeighbourPoints
ID_TDELTAMUSH_TANGENT_C Polygon
ID_TDELTAMUSH_TANGENT_UV BasedOnUVs
ID_TDELTAMUSH_WEIGHT_TYPE SmoothType LONG  
ID_TDELTAMUSH_WEIGHT_FIX Fixed
ID_TDELTAMUSH_WEIGHT_PROPORTIONAL Proportional
ID_TDELTAMUSH_WEIGHTMAP_ONOFF Active BOOL  
ID_TDELTAMUSH_WEIGHTMAP StrengthMap LINK  
ID_TDELTAMUSH_PIN_CORNER PinBorderPoints BOOL  
ID_TDELTAMUSH_AFFECTMORPH AffectMorphs BOOL  
ID_TDELTAMUSH_OBJECT_INITIAL Initialize BUTTON  
ID_TDELTAMUSH_OBJECT_RESTORE Release 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.tdeltamush)
    doc.InsertObject(obj)
    c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
    
    #You can set parameters two different ways. 
    #First way              
    tag[c4d.ID_TDELTAMUSH_WEIGHT] = 0.1
    tag[c4d.ID_TDELTAMUSH_SMOOTH_ITERATION] = 1
    tag[c4d.ID_TDELTAMUSH_PREV_SMOOTH] = 0.1
    tag[c4d.ID_TDELTAMUSH_TANGENT_TYPE] = c4d.ID_TDELTAMUSH_TANGENT_A
    tag[c4d.ID_TDELTAMUSH_WEIGHT_TYPE] = c4d.ID_TDELTAMUSH_WEIGHT_FIX
    tag[c4d.ID_TDELTAMUSH_WEIGHTMAP_ONOFF] = True
    tag[c4d.ID_TDELTAMUSH_PIN_CORNER] = True
    tag[c4d.ID_TDELTAMUSH_AFFECTMORPH] = True
    
    #Second way, using the base container.
    bc = tag.GetDataInstance()
    bc.SetFloat(c4d.ID_TDELTAMUSH_WEIGHT,0.1)
    bc.SetInt32(c4d.ID_TDELTAMUSH_SMOOTH_ITERATION,1)
    bc.SetFloat(c4d.ID_TDELTAMUSH_PREV_SMOOTH,0.1)
    bc.SetInt32(c4d.ID_TDELTAMUSH_TANGENT_TYPE,c4d.ID_TDELTAMUSH_TANGENT_A)
    bc.SetInt32(c4d.ID_TDELTAMUSH_WEIGHT_TYPE,c4d.ID_TDELTAMUSH_WEIGHT_FIX)
    bc.SetBool(c4d.ID_TDELTAMUSH_WEIGHTMAP_ONOFF,True)
    bc.SetBool(c4d.ID_TDELTAMUSH_PIN_CORNER,True)
    bc.SetBool(c4d.ID_TDELTAMUSH_AFFECTMORPH,True)

if __name__=='__main__':
    main()
             

C++

#include "c4d.h"
#include "../deltamush/description/tdeltamush.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(tdeltamush);
    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(ID_TDELTAMUSH_WEIGHT),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_SMOOTH_ITERATION),GeData(1),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_PREV_SMOOTH),GeData(0.1),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_TANGENT_TYPE),GeData(ID_TDELTAMUSH_TANGENT_A),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_WEIGHT_TYPE),GeData(ID_TDELTAMUSH_WEIGHT_FIX),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_WEIGHTMAP_ONOFF),GeData(true),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_PIN_CORNER),GeData(true),flags);
    pTag->SetParameter(DescID(ID_TDELTAMUSH_AFFECTMORPH),GeData(true),flags);
    pTag->Message(MSG_UPDATE);            

    //Second way, using the base container.
    BaseContainer *bc =     pTag->GetDataInstance();
    bc->SetFloat(ID_TDELTAMUSH_WEIGHT,0.1);
    bc->SetInt32(ID_TDELTAMUSH_SMOOTH_ITERATION,1);
    bc->SetFloat(ID_TDELTAMUSH_PREV_SMOOTH,0.1);
    bc->SetInt32(ID_TDELTAMUSH_TANGENT_TYPE,ID_TDELTAMUSH_TANGENT_A);
    bc->SetInt32(ID_TDELTAMUSH_WEIGHT_TYPE,ID_TDELTAMUSH_WEIGHT_FIX);
    bc->SetBool(ID_TDELTAMUSH_WEIGHTMAP_ONOFF,true);
    bc->SetBool(ID_TDELTAMUSH_PIN_CORNER,true);
    bc->SetBool(ID_TDELTAMUSH_AFFECTMORPH,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.ID_TDELTAMUSH_OBJECT_INITIAL)
c4d.CallButton(tag,c4d.ID_TDELTAMUSH_OBJECT_RESTORE)

C++

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

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