On 26/08/2015 at 11:18, xxxxxxxx wrote:
As an exercise I am trying to duplicate the Destination X Rail spline of a MoSpline, after changing its width.
So far I wasn't able to create a duplicate of the spline with the new offset/width, I just get the original one as if it is ignoring it is being modified by the MoSpline.
Any ideas with way to go? I was looking into GetCache(), but I wanted to ask first in case is something way more simpler.
Thanks in advance!
from c4d import gui
#Welcome to the world of Python
def main() :
#Create clone of original Spline
oSp = op.GetClone()
#Create 2nd Spline
sSp = oSp.GetClone()
mS = c4d.BaseObject(440000054)
#Assign splines and width
mS[c4d.MGMOSPLINEOBJECT_MODE] = 1
mS[c4d.MGMOSPLINEOBJECT_SOURCE_SPLINE] = oSp
mS[c4d.MGMOSPLINEOBJECT_DEST_RAILX] = sSp
mS[c4d.MGMOSPLINEOBJECT_SPLINE_WIDTH] = 100
#Add to Scene
#Clone new Spline from rail
rSp.SetName("New spline from rail X")