Center Custom Editable Spline Axis via C.O.F.F.E.E. Script in C4D
This post has already been read 3169 times!
Although there is a cool Magic Center plugin which center axis of a polygon or a spline you may still want to learn how to use that function in order to use on your own projects…
To start our project we need to create a sample spline, it would be text or etc., press C to convert it into an editable spline.
Then we’re going to create a null to apply our xpresso tag. You may add xpresso tag by right clicking on your null and select Cinema 4D Tags – Xpresso.
You should add Bounding Box node, C.O.F.F.E.E. node and your sample spline’s object node (you can simply drag and drop your spline into your xpresso editor.)
Insert “object” output from your spline object node and connect it to Bounding Box’s object port. It will give information about spline’s size which will be necessary on our C.O.F.F.E.E. script.
Now click on your C.O.F.F.E.E. node and add refobjname (Link), boxmin (Vector), boxmax (Vector), boxsize (Vector) input ports. Enter the code below and the code will do rest automatically…
You may download example file;