Omospline
Attributes
-
ENGLISH NAME : MoSpline
-
NAME : Omospline
-
INCLUDE : Obase
-
PATH : mograph/description/omospline.res
-
PLUGIN : mograph
-
MAXON online help (may not exist): OMOSPLINE
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.Omospline)
doc.InsertObject(obj)
c4d.EventAdd(c4d.EVENT_FORCEREDRAW)
#You can set parameters two different ways.
#First way
obj[c4d.MGMOSPLINEOBJECT_MODE] = c4d.MGMOSPLINEOBJECT_MODE_BASIC
obj[c4d.MGMOSPLINEOBJECT_GROWMODE] = c4d.MGMOSPLINEOBJECT_GROWMODE_ALL
obj[c4d.MGMOSPLINEOBJECT_GROWTH_START] = 0.1
obj[c4d.MGMOSPLINEOBJECT_GROWTH_END] = 0.1
obj[c4d.MGMOSPLINEOBJECT_GROWTH_OFFSET] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_EXTEND_START] = True
obj[c4d.MGMOSPLINEOBJECT_EXTEND_CURVE_START] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SCALE_START] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SPIRAL_START] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_STEP_START] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SMOOTHED_START] = True
obj[c4d.MGMOSPLINEOBJECT_EXTEND_EXTEND_END] = True
obj[c4d.MGMOSPLINEOBJECT_EXTEND_CURVE_END] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SCALE_END] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SPIRAL_END] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_STEP_END] = 0.1
obj[c4d.MGMOSPLINEOBJECT_EXTEND_SMOOTHED_END] = True
obj[c4d.MGMOSPLINEOBJECT_DISPLAYMODE] = c4d.MGMOSPLINEOBJECT_DISPLAYMODE_LINE
obj[c4d.MGMOSPLINEOBJECT_LENGTH] = 0.1
obj[c4d.MGMOSPLINEOBJECT_LENGTH_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_STEPS] = 1
obj[c4d.MGMOSPLINEOBJECT_SEGMENTS] = 1
obj[c4d.MGMOSPLINEOBJECT_ANGLE_H] = 0.1
obj[c4d.MGMOSPLINEOBJECT_ANGLE_H_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_ANGLE_P] = 0.1
obj[c4d.MGMOSPLINEOBJECT_ANGLE_P_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_ANGLE_B] = 0.1
obj[c4d.MGMOSPLINEOBJECT_ANGLE_B_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_CURVATURE_ORDER] = c4d.MGMOSPLINEOBJECT_CURVATURE_ORDER_YXZ
obj[c4d.MGMOSPLINEOBJECT_CURVE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_CURVE_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_CURVE_STRENGTHMIN] = 0.1
obj[c4d.MGMOSPLINEOBJECT_CURVE_STRENGTHMAX] = 0.1
obj[c4d.MGMOSPLINEOBJECT_CURVE_MAINTAIN] = True
obj[c4d.MGMOSPLINEOBJECT_CURVE_GLOBAL] = True
obj[c4d.MGMOSPLINEOBJECT_BEND] = 0.1
obj[c4d.MGMOSPLINEOBJECT_BEND_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_BEND_STRENGTHMIN] = 0.1
obj[c4d.MGMOSPLINEOBJECT_BEND_STRENGTHMAX] = 0.1
obj[c4d.MGMOSPLINEOBJECT_BEND_MAINTAIN] = True
obj[c4d.MGMOSPLINEOBJECT_BEND_GLOBAL] = True
obj[c4d.MGMOSPLINEOBJECT_TWIST] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TWIST_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_TWIST_STRENGTHMIN] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TWIST_STRENGTHMAX] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TWIST_MAINTAIN] = True
obj[c4d.MGMOSPLINEOBJECT_TWIST_GLOBAL] = True
obj[c4d.MGMOSPLINEOBJECT_WIDTH] = 0.1
obj[c4d.MGMOSPLINEOBJECT_WIDTH_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_TURTLE] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_TURTLE_CONTEXT_IGNORE] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_TURTLE_MODIFIER] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_TURTLE_GROWTH] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_BASEANGLE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_BASESCALE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_BASEMOVE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_BASETROPISM] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_RANDOMISATION] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_RANDOM_SEED] = 1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_ADDMOVE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_ADDANGLE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_ADDSCALE] = 0.1
obj[c4d.MGMOSPLINEOBJECT_TURTLE_GROWANGLE] = True
obj[c4d.MGMOSPLINEOBJECT_TURTLE_GROWSCALE] = True
obj[c4d.MGMOSPLINEOBJECT_TURTLE_GROWMOVE] = True
obj[c4d.MGMOSPLINEOBJECT_SPLINE_MODE] = c4d.MGMOSPLINEOBJECT_SPLINE_MODE_VERTS
obj[c4d.MGMOSPLINEOBJECT_SPLINE_COUNT] = 1
obj[c4d.MGMOSPLINEOBJECT_SPLINE_COUNT_STEP] = 0.1
obj[c4d.MGMOSPLINEOBJECT_SPLINE_WIDTH] = 0.1
obj[c4d.MGMOSPLINEOBJECT_SPLINE_WIDTH_FORMULA] = "Hello World"
obj[c4d.MGMOSPLINEOBJECT_FIELD_MODE] = c4d.MGMOSPLINEOBJECT_FIELD_MODE_INCLUDE
#Second way, using the base container.
bc = obj.GetDataInstance()
bc.SetInt32(c4d.MGMOSPLINEOBJECT_MODE,c4d.MGMOSPLINEOBJECT_MODE_BASIC)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_GROWMODE,c4d.MGMOSPLINEOBJECT_GROWMODE_ALL)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_GROWTH_START,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_GROWTH_END,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_GROWTH_OFFSET,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_EXTEND_EXTEND_START,True)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_CURVE_START,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_SCALE_START,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_SPIRAL_START,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_STEP_START,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_EXTEND_SMOOTHED_START,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_EXTEND_EXTEND_END,True)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_CURVE_END,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_SCALE_END,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_SPIRAL_END,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_EXTEND_STEP_END,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_EXTEND_SMOOTHED_END,True)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_DISPLAYMODE,c4d.MGMOSPLINEOBJECT_DISPLAYMODE_LINE)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_LENGTH,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_LENGTH_FORMULA,"Hello World")
bc.SetInt32(c4d.MGMOSPLINEOBJECT_STEPS,1)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_SEGMENTS,1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_ANGLE_H,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_ANGLE_H_FORMULA,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_ANGLE_P,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_ANGLE_P_FORMULA,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_ANGLE_B,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_ANGLE_B_FORMULA,"Hello World")
bc.SetInt32(c4d.MGMOSPLINEOBJECT_CURVATURE_ORDER,c4d.MGMOSPLINEOBJECT_CURVATURE_ORDER_YXZ)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_CURVE,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_CURVE_FORMULA,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_CURVE_STRENGTHMIN,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_CURVE_STRENGTHMAX,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_CURVE_MAINTAIN,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_CURVE_GLOBAL,True)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_BEND,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_BEND_FORMULA,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_BEND_STRENGTHMIN,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_BEND_STRENGTHMAX,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_BEND_MAINTAIN,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_BEND_GLOBAL,True)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TWIST,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_TWIST_FORMULA,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TWIST_STRENGTHMIN,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TWIST_STRENGTHMAX,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_TWIST_MAINTAIN,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_TWIST_GLOBAL,True)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_WIDTH,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_WIDTH_FORMULA,"Hello World")
bc.SetString(c4d.MGMOSPLINEOBJECT_TURTLE,"Hello World")
bc.SetString(c4d.MGMOSPLINEOBJECT_TURTLE_CONTEXT_IGNORE,"Hello World")
bc.SetString(c4d.MGMOSPLINEOBJECT_TURTLE_MODIFIER,"Hello World")
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_GROWTH,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_BASEANGLE,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_BASESCALE,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_BASEMOVE,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_BASETROPISM,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_RANDOMISATION,0.1)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_TURTLE_RANDOM_SEED,1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_ADDMOVE,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_ADDANGLE,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_TURTLE_ADDSCALE,0.1)
bc.SetBool(c4d.MGMOSPLINEOBJECT_TURTLE_GROWANGLE,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_TURTLE_GROWSCALE,True)
bc.SetBool(c4d.MGMOSPLINEOBJECT_TURTLE_GROWMOVE,True)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_SPLINE_MODE,c4d.MGMOSPLINEOBJECT_SPLINE_MODE_VERTS)
bc.SetInt32(c4d.MGMOSPLINEOBJECT_SPLINE_COUNT,1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_SPLINE_COUNT_STEP,0.1)
bc.SetFloat(c4d.MGMOSPLINEOBJECT_SPLINE_WIDTH,0.1)
bc.SetString(c4d.MGMOSPLINEOBJECT_SPLINE_WIDTH_FORMULA,"Hello World")
bc.SetInt32(c4d.MGMOSPLINEOBJECT_FIELD_MODE,c4d.MGMOSPLINEOBJECT_FIELD_MODE_INCLUDE)
if __name__=='__main__':
main()
C++
#include "c4d.h"
#include "../mograph/description/omospline.h"
void SampleFunction()
{
BaseDocument *pDoc = GetActiveDocument();
BaseObject *pObject = BaseObject::Alloc(Omospline);
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(MGMOSPLINEOBJECT_MODE),GeData(MGMOSPLINEOBJECT_MODE_BASIC),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_GROWMODE),GeData(MGMOSPLINEOBJECT_GROWMODE_ALL),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_GROWTH_START),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_GROWTH_END),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_GROWTH_OFFSET),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_EXTEND_START),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_CURVE_START),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SCALE_START),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SPIRAL_START),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_STEP_START),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SMOOTHED_START),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_EXTEND_END),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_CURVE_END),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SCALE_END),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SPIRAL_END),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_STEP_END),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_EXTEND_SMOOTHED_END),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_DISPLAYMODE),GeData(MGMOSPLINEOBJECT_DISPLAYMODE_LINE),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_LENGTH),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_LENGTH_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_STEPS),GeData(1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SEGMENTS),GeData(1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_H),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_H_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_P),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_P_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_B),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_ANGLE_B_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVATURE_ORDER),GeData(MGMOSPLINEOBJECT_CURVATURE_ORDER_YXZ),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE_STRENGTHMIN),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE_STRENGTHMAX),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE_MAINTAIN),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_CURVE_GLOBAL),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND_STRENGTHMIN),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND_STRENGTHMAX),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND_MAINTAIN),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_BEND_GLOBAL),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST_STRENGTHMIN),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST_STRENGTHMAX),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST_MAINTAIN),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TWIST_GLOBAL),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_WIDTH),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_WIDTH_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_CONTEXT_IGNORE),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_MODIFIER),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_GROWTH),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_BASEANGLE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_BASESCALE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_BASEMOVE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_BASETROPISM),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_RANDOMISATION),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_RANDOM_SEED),GeData(1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_ADDMOVE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_ADDANGLE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_ADDSCALE),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_GROWANGLE),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_GROWSCALE),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_TURTLE_GROWMOVE),GeData(true),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SPLINE_MODE),GeData(MGMOSPLINEOBJECT_SPLINE_MODE_VERTS),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SPLINE_COUNT),GeData(1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SPLINE_COUNT_STEP),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SPLINE_WIDTH),GeData(0.1),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_SPLINE_WIDTH_FORMULA),GeData("Hello World"),flags);
pObject->SetParameter(DescID(MGMOSPLINEOBJECT_FIELD_MODE),GeData(MGMOSPLINEOBJECT_FIELD_MODE_INCLUDE),flags);
pObject->Message(MSG_UPDATE);
//Second way, using the base container.
BaseContainer *bc = pObject->GetDataInstance();
bc->SetInt32(MGMOSPLINEOBJECT_MODE,MGMOSPLINEOBJECT_MODE_BASIC);
bc->SetInt32(MGMOSPLINEOBJECT_GROWMODE,MGMOSPLINEOBJECT_GROWMODE_ALL);
bc->SetFloat(MGMOSPLINEOBJECT_GROWTH_START,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_GROWTH_END,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_GROWTH_OFFSET,0.1);
bc->SetBool(MGMOSPLINEOBJECT_EXTEND_EXTEND_START,true);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_CURVE_START,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_SCALE_START,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_SPIRAL_START,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_STEP_START,0.1);
bc->SetBool(MGMOSPLINEOBJECT_EXTEND_SMOOTHED_START,true);
bc->SetBool(MGMOSPLINEOBJECT_EXTEND_EXTEND_END,true);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_CURVE_END,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_SCALE_END,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_SPIRAL_END,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_EXTEND_STEP_END,0.1);
bc->SetBool(MGMOSPLINEOBJECT_EXTEND_SMOOTHED_END,true);
bc->SetInt32(MGMOSPLINEOBJECT_DISPLAYMODE,MGMOSPLINEOBJECT_DISPLAYMODE_LINE);
bc->SetFloat(MGMOSPLINEOBJECT_LENGTH,0.1);
bc->SetString(MGMOSPLINEOBJECT_LENGTH_FORMULA,"Hello World");
bc->SetInt32(MGMOSPLINEOBJECT_STEPS,1);
bc->SetInt32(MGMOSPLINEOBJECT_SEGMENTS,1);
bc->SetFloat(MGMOSPLINEOBJECT_ANGLE_H,0.1);
bc->SetString(MGMOSPLINEOBJECT_ANGLE_H_FORMULA,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_ANGLE_P,0.1);
bc->SetString(MGMOSPLINEOBJECT_ANGLE_P_FORMULA,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_ANGLE_B,0.1);
bc->SetString(MGMOSPLINEOBJECT_ANGLE_B_FORMULA,"Hello World");
bc->SetInt32(MGMOSPLINEOBJECT_CURVATURE_ORDER,MGMOSPLINEOBJECT_CURVATURE_ORDER_YXZ);
bc->SetFloat(MGMOSPLINEOBJECT_CURVE,0.1);
bc->SetString(MGMOSPLINEOBJECT_CURVE_FORMULA,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_CURVE_STRENGTHMIN,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_CURVE_STRENGTHMAX,0.1);
bc->SetBool(MGMOSPLINEOBJECT_CURVE_MAINTAIN,true);
bc->SetBool(MGMOSPLINEOBJECT_CURVE_GLOBAL,true);
bc->SetFloat(MGMOSPLINEOBJECT_BEND,0.1);
bc->SetString(MGMOSPLINEOBJECT_BEND_FORMULA,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_BEND_STRENGTHMIN,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_BEND_STRENGTHMAX,0.1);
bc->SetBool(MGMOSPLINEOBJECT_BEND_MAINTAIN,true);
bc->SetBool(MGMOSPLINEOBJECT_BEND_GLOBAL,true);
bc->SetFloat(MGMOSPLINEOBJECT_TWIST,0.1);
bc->SetString(MGMOSPLINEOBJECT_TWIST_FORMULA,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_TWIST_STRENGTHMIN,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TWIST_STRENGTHMAX,0.1);
bc->SetBool(MGMOSPLINEOBJECT_TWIST_MAINTAIN,true);
bc->SetBool(MGMOSPLINEOBJECT_TWIST_GLOBAL,true);
bc->SetFloat(MGMOSPLINEOBJECT_WIDTH,0.1);
bc->SetString(MGMOSPLINEOBJECT_WIDTH_FORMULA,"Hello World");
bc->SetString(MGMOSPLINEOBJECT_TURTLE,"Hello World");
bc->SetString(MGMOSPLINEOBJECT_TURTLE_CONTEXT_IGNORE,"Hello World");
bc->SetString(MGMOSPLINEOBJECT_TURTLE_MODIFIER,"Hello World");
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_GROWTH,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_BASEANGLE,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_BASESCALE,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_BASEMOVE,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_BASETROPISM,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_RANDOMISATION,0.1);
bc->SetInt32(MGMOSPLINEOBJECT_TURTLE_RANDOM_SEED,1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_ADDMOVE,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_ADDANGLE,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_TURTLE_ADDSCALE,0.1);
bc->SetBool(MGMOSPLINEOBJECT_TURTLE_GROWANGLE,true);
bc->SetBool(MGMOSPLINEOBJECT_TURTLE_GROWSCALE,true);
bc->SetBool(MGMOSPLINEOBJECT_TURTLE_GROWMOVE,true);
bc->SetInt32(MGMOSPLINEOBJECT_SPLINE_MODE,MGMOSPLINEOBJECT_SPLINE_MODE_VERTS);
bc->SetInt32(MGMOSPLINEOBJECT_SPLINE_COUNT,1);
bc->SetFloat(MGMOSPLINEOBJECT_SPLINE_COUNT_STEP,0.1);
bc->SetFloat(MGMOSPLINEOBJECT_SPLINE_WIDTH,0.1);
bc->SetString(MGMOSPLINEOBJECT_SPLINE_WIDTH_FORMULA,"Hello World");
bc->SetInt32(MGMOSPLINEOBJECT_FIELD_MODE,MGMOSPLINEOBJECT_FIELD_MODE_INCLUDE);
pObject->Message(MSG_UPDATE);
}
Buttons
This node has buttons. Buttons can manually be executed by calling the following code
Python
c4d.CallButton(obj,c4d.MGMOSPLINEOBJECT_TURTLE_PRINT)
C++
DescriptionCommand dc;
dc.id = DescID(MGMOSPLINEOBJECT_TURTLE_PRINT);
pObject->Message(MSG_DESCRIPTION_COMMAND, &dc);