Oxpconstraints
Attributes
-
ENGLISH NAME : X-ParticlesConstraints
-
NAME : Oxpconstraints
-
INCLUDE : Obase
-
PATH : res/description/oxpconstraints.res
-
PLUGIN : X-Particles
-
MAXON online help (may not exist): OXPCONSTRAINTS
Elements
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.Oxpconstraints)
doc.InsertObject(obj)
c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
#You can set parameters two different ways.
#First way
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH] = True
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_MINRADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE] = c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAK] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAK_ABS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST] = True
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_DIST_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_BREAK] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_CUSTOM] = True
obj[c4d.XPCONSTRAINTS_CUSTOM_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_COMPRESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_COMPRESS] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_BREAK_COMPRESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS_RATE] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_EXPAND] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_BREAK] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_RATE] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_COLLIDE] = True
obj[c4d.XPCONSTRAINTS_CONNECT_COLLIDE_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_COLLIDE_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_PP_FORCES] = True
obj[c4d.XPCONSTRAINTS_FORCES_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_PP_ATTRACTION_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_FORCE_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_PP_ATTRACTION] = 0.1
obj[c4d.XPCONSTRAINTS_PP_ATTRACTION_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_PP_ATTRACTION_DIST] = 0.1
obj[c4d.XPCONSTRAINTS_PP_ATTRACTION_FALLOFF] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_PP_REPULSION] = 0.1
obj[c4d.XPCONSTRAINTS_PP_REPULSION_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_PP_REPULSION_FALLOFF] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_VISCOSITY] = True
obj[c4d.XPCONSTRAINTS_VISCOSITY_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_RATE] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_CONTRACT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_EXPAND] = 0.1
obj[c4d.XPCONSTRAINTS_FRICTION] = True
obj[c4d.XPCONSTRAINTS_FRICTION_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_STATIC] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_KINETIC] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_PP_FRICTION_FALLOFF] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_SURFT] = True
obj[c4d.XPCONSTRAINTS_SURFT_GROUP_ONLY] = True
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_WEIGHT] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_LIMIT] = 1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_INNER] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_RADIUS] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM] = c4d.XPCONSTRAINTS_PARAM_NONE
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MIN] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MAX] = 0.1
obj[c4d.XPCONSTRAINTS_CONNECT_SURFT_THRESHOLD] = 0.1
obj[c4d.XPCONSTRAINTS_PP_SURFT_FALLOFF] = c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT
obj[c4d.XPCONSTRAINTS_ADVANCED_ADAPT_SUBFRAMES] = True
obj[c4d.XPCONSTRAINTS_ADVANCED_ADAPT_ITERATIONS] = True
obj[c4d.XPCONSTRAINTS_ADVANCED_RELAX] = 0.1
#Second way, using the base container.
bc = obj.GetDataInstance()
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_BIRTH,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_WEIGHT,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_BIRTH_ONLY,True)
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_BIRTH_LIMIT,1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_MINRADIUS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_RADIUS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE,c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAK,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_BIRTH_BREAK_ABS,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_PP_DIST,True)
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_DIST_WEIGHT,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_RADIUS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_BREAK,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_CUSTOM,True)
bc.SetBool(c4d.XPCONSTRAINTS_CUSTOM_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_WEIGHT,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_RADIUS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_COMPRESS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_COMPRESS,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_BREAK_COMPRESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS_RATE,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_EXPAND,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_BREAK,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_RATE,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_CONNECT_COLLIDE,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_COLLIDE_STIFFNESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_COLLIDE_WEIGHT,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_PP_FORCES,True)
bc.SetBool(c4d.XPCONSTRAINTS_FORCES_GROUP_ONLY,True)
bc.SetInt32(c4d.XPCONSTRAINTS_PP_ATTRACTION_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FORCE_WEIGHT,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_PP_ATTRACTION,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_PP_ATTRACTION_RADIUS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_PP_ATTRACTION_DIST,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_PP_ATTRACTION_FALLOFF,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetFloat(c4d.XPCONSTRAINTS_PP_REPULSION,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_PP_REPULSION_RADIUS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_PP_REPULSION_FALLOFF,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetBool(c4d.XPCONSTRAINTS_VISCOSITY,True)
bc.SetBool(c4d.XPCONSTRAINTS_VISCOSITY_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_WEIGHT,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_RADIUS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_RATE,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_CONTRACT,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_VISCOSITY_EXPAND,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_FRICTION,True)
bc.SetBool(c4d.XPCONSTRAINTS_FRICTION_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_WEIGHT,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_FRICTION_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_RADIUS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_STATIC,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_KINETIC,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_PP_FRICTION_FALLOFF,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetBool(c4d.XPCONSTRAINTS_SURFT,True)
bc.SetBool(c4d.XPCONSTRAINTS_SURFT_GROUP_ONLY,True)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_WEIGHT,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_SURFT_LIMIT,1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_INNER,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_RADIUS,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM,c4d.XPCONSTRAINTS_PARAM_NONE)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MIN,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MAX,0.1)
bc.SetFloat(c4d.XPCONSTRAINTS_CONNECT_SURFT_THRESHOLD,0.1)
bc.SetInt32(c4d.XPCONSTRAINTS_PP_SURFT_FALLOFF,c4d.XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT)
bc.SetBool(c4d.XPCONSTRAINTS_ADVANCED_ADAPT_SUBFRAMES,True)
bc.SetBool(c4d.XPCONSTRAINTS_ADVANCED_ADAPT_ITERATIONS,True)
bc.SetFloat(c4d.XPCONSTRAINTS_ADVANCED_RELAX,0.1)
if __name__=='__main__':
main()
C++
#include "c4d.h"
#include "../res/description/oxpconstraints.h"
void SampleFunction()
{
BaseDocument *pDoc = GetActiveDocument();
BaseObject *pObject = BaseObject::Alloc(Oxpconstraints);
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(XPCONSTRAINTS_CONNECT_BIRTH),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_MINRADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE),GeData(XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_BREAK),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_BIRTH_BREAK_ABS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_DIST_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_BREAK),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CUSTOM),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CUSTOM_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_COMPRESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_COMPRESS),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_BREAK_COMPRESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS_RATE),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_EXPAND),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_BREAK),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_RATE),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_COLLIDE),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_COLLIDE_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_COLLIDE_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_FORCES),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_FORCES_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_ATTRACTION_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FORCE_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_ATTRACTION),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_ATTRACTION_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_ATTRACTION_DIST),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_ATTRACTION_FALLOFF),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_REPULSION),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_REPULSION_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_REPULSION_FALLOFF),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_VISCOSITY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_VISCOSITY_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_RATE),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_CONTRACT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_VISCOSITY_EXPAND),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_FRICTION),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_FRICTION_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_STATIC),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_KINETIC),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_FRICTION_FALLOFF),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_SURFT),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_SURFT_GROUP_ONLY),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_WEIGHT),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_LIMIT),GeData(1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_INNER),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_RADIUS),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM),GeData(XPCONSTRAINTS_PARAM_NONE),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MIN),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MAX),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_CONNECT_SURFT_THRESHOLD),GeData(0.1),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_PP_SURFT_FALLOFF),GeData(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_ADVANCED_ADAPT_SUBFRAMES),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_ADVANCED_ADAPT_ITERATIONS),GeData(true),flags);
pObject->SetParameter(DescID(XPCONSTRAINTS_ADVANCED_RELAX),GeData(0.1),flags);
pObject->Message(MSG_UPDATE);
//Second way, using the base container.
BaseContainer *bc = pObject->GetDataInstance();
bc->SetBool(XPCONSTRAINTS_CONNECT_BIRTH,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_WEIGHT,0.1);
bc->SetBool(XPCONSTRAINTS_CONNECT_BIRTH_ONLY,true);
bc->SetBool(XPCONSTRAINTS_CONNECT_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_BIRTH_LIMIT,1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_MINRADIUS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_RADIUS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE,XPCONSTRAINTS_CONNECT_BIRTH_BREAKTYPE_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_BREAK,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_BIRTH_BREAK_ABS,0.1);
bc->SetBool(XPCONSTRAINTS_CONNECT_PP_DIST,true);
bc->SetBool(XPCONSTRAINTS_CONNECT_PP_DIST_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_DIST_WEIGHT,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_PP_DIST_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_DIST_RADIUS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_DIST_BREAK,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_DIST_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetBool(XPCONSTRAINTS_CUSTOM,true);
bc->SetBool(XPCONSTRAINTS_CUSTOM_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_WEIGHT,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_CUSTOM_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_RADIUS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_COMPRESS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_COMPRESS,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_BREAK_COMPRESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_COMPRESS_RATE,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_EXPAND,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_BREAK,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_CUSTOM_PLASTIC_RATE,0.1);
bc->SetBool(XPCONSTRAINTS_CONNECT_COLLIDE,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_COLLIDE_STIFFNESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_COLLIDE_WEIGHT,0.1);
bc->SetBool(XPCONSTRAINTS_PP_FORCES,true);
bc->SetBool(XPCONSTRAINTS_FORCES_GROUP_ONLY,true);
bc->SetInt32(XPCONSTRAINTS_PP_ATTRACTION_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FORCE_WEIGHT,0.1);
bc->SetFloat(XPCONSTRAINTS_PP_ATTRACTION,0.1);
bc->SetFloat(XPCONSTRAINTS_PP_ATTRACTION_RADIUS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_ATTRACTION_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetFloat(XPCONSTRAINTS_PP_ATTRACTION_DIST,0.1);
bc->SetInt32(XPCONSTRAINTS_PP_ATTRACTION_FALLOFF,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetFloat(XPCONSTRAINTS_PP_REPULSION,0.1);
bc->SetFloat(XPCONSTRAINTS_PP_REPULSION_RADIUS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_PP_REPULSION_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetInt32(XPCONSTRAINTS_PP_REPULSION_FALLOFF,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetBool(XPCONSTRAINTS_VISCOSITY,true);
bc->SetBool(XPCONSTRAINTS_VISCOSITY_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_WEIGHT,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_VISCOSITY_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_RADIUS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_RATE,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_CONTRACT,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_VISCOSITY_EXPAND,0.1);
bc->SetBool(XPCONSTRAINTS_FRICTION,true);
bc->SetBool(XPCONSTRAINTS_FRICTION_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_WEIGHT,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_FRICTION_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_RADIUS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_STATIC,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_KINETIC,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS,0.1);
bc->SetInt32(XPCONSTRAINTS_PP_FRICTION_FALLOFF,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetInt32(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_FRICTION_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetBool(XPCONSTRAINTS_SURFT,true);
bc->SetBool(XPCONSTRAINTS_SURFT_GROUP_ONLY,true);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_WEIGHT,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_SURFT_LIMIT,1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_INNER,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_RADIUS,0.1);
bc->SetInt32(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM,XPCONSTRAINTS_PARAM_NONE);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MIN,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_STIFFNESS_PARAM_MAP_MAX,0.1);
bc->SetFloat(XPCONSTRAINTS_CONNECT_SURFT_THRESHOLD,0.1);
bc->SetInt32(XPCONSTRAINTS_PP_SURFT_FALLOFF,XPCONSTRAINTS_CONNECT_CUSTOM_STIFFNESS_FALLOFF_FLAT);
bc->SetBool(XPCONSTRAINTS_ADVANCED_ADAPT_SUBFRAMES,true);
bc->SetBool(XPCONSTRAINTS_ADVANCED_ADAPT_ITERATIONS,true);
bc->SetFloat(XPCONSTRAINTS_ADVANCED_RELAX,0.1);
pObject->Message(MSG_UPDATE);
}
Buttons
This node has buttons. Buttons can manually be executed by calling the following code
Python
c4d.CallButton(obj,c4d.XPCONSTRAINTS_HELP_BUTTON)
c4d.CallButton(obj,c4d.XPCONSTRAINTS_VIDMAN_BUTTON)
c4d.CallButton(obj,c4d.XPCONSTRAINTS_BUTTON_RESET)
c4d.CallButton(obj,c4d.XPCONSTRAINTS_SAVEPRESET)
c4d.CallButton(obj,c4d.XPCONSTRAINTS_LOADPRESET)
C++
DescriptionCommand dc;
dc.id = DescID(XPCONSTRAINTS_HELP_BUTTON);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(XPCONSTRAINTS_VIDMAN_BUTTON);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(XPCONSTRAINTS_BUTTON_RESET);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(XPCONSTRAINTS_SAVEPRESET);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);
DescriptionCommand dc;
dc.id = DescID(XPCONSTRAINTS_LOADPRESET);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);