Dear Ferdinand,
Thank you so much. I've found it tricky to navigate the API reference. Being able to get a pointer to the object parameter through drag and drop is a game changer for me!!
Dear Ferdinand,
Thank you so much. I've found it tricky to navigate the API reference. Being able to get a pointer to the object parameter through drag and drop is a game changer for me!!
Dear friends,
I'm wanting to generate a large number of splines to animate their form and shape.
I'd like to do this with code so I have point-level control over all splines.
I have been able to create the tracer object and connect to 3 nulls.
However I can't see how I can set other properties such as the spline Type [Linear, Cubic...] and the Intermediate Points property.
Many thanks
Andy
I'm an artist but can program a little.
def main():
# Create a MoGraph Tracer object
tracer = c4d.BaseObject(1018655)
# Insert the Tracer object into the document
doc.InsertObject(tracer)
# Create a cube to trace
null_1 = c4d.BaseObject(c4d.Onull)
null_2 = c4d.BaseObject(c4d.Onull)
null_3 = c4d.BaseObject(c4d.Onull)
null_1.SetName("pt1");
null_2.SetName("pt2");
null_3.SetName("pt3");
newPos = c4d.Vector(100, 100, 0)
null_1.SetRelPos(newPos);
newPos = c4d.Vector(100, 200, 0)
null_3.SetRelPos(newPos);
# Insert the cube into the document
doc.InsertObject(null_1)
doc.InsertObject(null_2)
doc.InsertObject(null_3)
# Create an InExcludeData object and add the null objects to it
in_ex_data = c4d.InExcludeData()
in_ex_data.InsertObject(null_1, 1)
in_ex_data.InsertObject(null_2, 1)
in_ex_data.InsertObject(null_3, 1)
tracer[c4d.MGTRACEROBJECT_OBJECTLIST] = in_ex_data
tracer[c4d.MGTRACEROBJECT_MODE] = c4d.MGTRACEROBJECT_MODE_LINK
c4d.EventAdd()
# Execute main()
if __name__=='__main__':
main()