How do i create a mel script for creating joints on the cvs of a curve


#1

How do i create a mel script for creating joints on the cvs of a curve ?


#2

The question is too open. This is a forum for programming questions, not necessarily for people doing your homework (if you are asking for one), which means questions more specific than “how do I do something from scratch with absolutely no details provided” doesn’t usually go a long way.
What did you get stuck on? Did you try anything at all yourself?
Any reasons why you can’t just use spline IK and then delete off the IK operator and just keep the chain?


#3

I know you said mel, but this might give you a few clues anyway…


import pymel.core as pm
crv = pm.PyNode('curve1') # assuming I have a curve called "curve1"
pm.select(clear=True)
for idx in range(crv.numCVs()):
    pos = crv.cv[idx].getPosition(space='world')
    jnt = pm.joint()
    jnt.setTranslation(pos, space='world')

David

@Raffaele: I didn’t see your post until after I wrote this. I get your point. People should do some homework and ask more specific questions when they get stuck.


#4

Im not a mel scripter thats why i came to people i knew had the answers . I don’t know my way around mel etc .


#5

I created ik spline systems frequently when rigging ,currently following some tutorials . Needed away to get that repetitive task done faster so i could focus on the functions . And im asking no one to do my homework , i was asking for help with some thing i didn;t know how to do .DJx did that part , thanks .