View Full Version : How could i modify a spline at the sub object level
05-05-2009, 03:28 PM
I'd like to create a circle convert it to an editable spline (i know how to do that at least) and than grab all the segments and rotate them or move them around?
Anyone could point me in the right direction?
Thanks for your time.
Splines are pretty poorly exposed!
Lookup SplineOps in the helpfile. Important to note that the modifier should be the current one in the modifier panel and that the right subobject level is needed for most of the commands. Coding it resambles actually pressing the buttons. I wouldn't be surprised that these are actually UIaccessor commands wrapped in a "convinient" interfaces... but I don't know... It's not going to be pretty I can tell you!
05-05-2009, 05:08 PM
poorly? :o editable splines are pretty much completely accessible.
you'd probably have to do any 'rotating' of segments yourself (by moving the knots and their vectors), depending on what you mean by 'rotate'.
Really...:blush: It's been a long time, I once tried to build a toolkit for splines and gave up in desperation and really never looked back... hmmm, glossing over the help indeed seems there's a lot covered... but still it's weird you got to have the spline and modpanel open.
Please ignore my earlier post!
05-05-2009, 06:37 PM
well, granted, when using Edit Spline and such you do run into some odd situations.. not too dissimilar from the various Edit Mesh and Edit Poly bits and pieces that essentially rely on the modifier itself rather than their underlying code..
Guibou - have a peek at GetKnotPoint, SetKnotPoint and the methods near there for the in/out vectors of each knot (if the segment is not linear).
05-05-2009, 09:25 PM
Thanks a lot guys for your responses.
After a few test i found that, for what i needed to do, it was simpler to create a shape with the orientation that i want, not bothering with how it looks. Then create another one oriented with the way i want it visually, "addAndWeld" it to the first one and just deleting the first shape.
It seems to work fine for now. I'll put it more into practice and see if i get any problems with it. What i'm looking for is to create control shapes for a rig while having them aligned correctly but visually looking better for the user, so they seem to relate more with what they control.
Thanks for your time guys and let me know if you find that i'm making things more complicated than they should be. Peace
05-05-2009, 09:25 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.