niic
09-26-2009, 06:54 PM
Hi guys,
I am wondering if anyone has any suggestions on how I can capture an existing curves construction and put that it into Mel so I can rebuild it via a script. I'm creating my own autoRigger for some creatures and trying to build up my puppet controllers through the script.
I can find out the CV location easy enough through getAttr "curve1.cv
2; but I am unsure how to then work out the knot vector of each cv.
At the moment I have my curve looking like this:
curve -n myCurve -d 3 -p 0 0 0.632721 -p 0 0 0 -p 0 -0.223701 -0.0926597 -p 0 -0.31636 -0.31636 -p 0 -0.223701 -0.540061 -p 0 0 -0.632721 -p 0 0.223701 -0.540061 -p 0 0.31636 -0.31636 -p 0 0.223701 -0.0926597 -p 0 0 0 -p 0 -0.223701 -0.0926597 -p 0 0.223701 -0.540061 -p 0 0 -0.632721 -p 0 -0.223701 -0.540061 -p 0 0.223701 -0.0926597;
closeCurve -ch 1 -ps 0 -rpo 1 -bb 0.5 -bki 0 -p 0.1;
Problem is I don't want it to be smooth. I am trying to get each vert to be cubic so it gives me a hard corner! So I need to set the -k knot values? I'm just not sure how I work that out.
At the moment when I try and work out the knots I am getting the below error so im not understanding the way to do it correctly.
//Error: Knot vector is too short. Must have length (#CVs + degree - 1)
Thanks for any help guys! Much appreciated.
Nick.
I am wondering if anyone has any suggestions on how I can capture an existing curves construction and put that it into Mel so I can rebuild it via a script. I'm creating my own autoRigger for some creatures and trying to build up my puppet controllers through the script.
I can find out the CV location easy enough through getAttr "curve1.cv
2; but I am unsure how to then work out the knot vector of each cv.
At the moment I have my curve looking like this:
curve -n myCurve -d 3 -p 0 0 0.632721 -p 0 0 0 -p 0 -0.223701 -0.0926597 -p 0 -0.31636 -0.31636 -p 0 -0.223701 -0.540061 -p 0 0 -0.632721 -p 0 0.223701 -0.540061 -p 0 0.31636 -0.31636 -p 0 0.223701 -0.0926597 -p 0 0 0 -p 0 -0.223701 -0.0926597 -p 0 0.223701 -0.540061 -p 0 0 -0.632721 -p 0 -0.223701 -0.540061 -p 0 0.223701 -0.0926597;
closeCurve -ch 1 -ps 0 -rpo 1 -bb 0.5 -bki 0 -p 0.1;
Problem is I don't want it to be smooth. I am trying to get each vert to be cubic so it gives me a hard corner! So I need to set the -k knot values? I'm just not sure how I work that out.
At the moment when I try and work out the knots I am getting the below error so im not understanding the way to do it correctly.
//Error: Knot vector is too short. Must have length (#CVs + degree - 1)
Thanks for any help guys! Much appreciated.
Nick.
