Can I pin CV of a curve?

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Display Modes
  04 April 2013
Can I pin CV of a curve?

I have a bunch of curves that is going to drive nhair. However I’d like to use the “soft modification tool” to do further adjustments to the curves. But I’d want to pin the root of the curves so it doesn’t fly off the head when I use soft modification. Is there any way I can lock or pin the root CV of the curve? (its a cubic nurbs curve)
  04 April 2013
Select some CVs and in the Channel Box click 'CVs (click to show)'. You can select stuff here and go [Channels] > [Lock Selected]. This seems to only work for a single curve at a time though.

Here is a quick (untested :P ) script which *should* work to lock, unlock or toggle the lock status of all selected CVs.

global proc lockCVs(string $lockMode) { 
	string $selectedCVs[] = `ls -sl -fl`;
	if ($lockMode == "lock") {
		for($each in $selectedCVs) {
			setAttr -lock true $each;
			print ("Locked " + $each + " position\n");		
	else if ($lockMode == "unlock") {
		for($each in $selectedCVs) {
			setAttr -lock false $each;
			print ("Unlocked " + $each + " position\n");		
	else if ($lockMode == "toggle") {
		for($each in $selectedCVs) {
			if (`getAttr -lock $each` == 0)
				$tmp = "Locked";
				$tmp = "Unlocked";
			setAttr -lock (!`getAttr -lock $each`) $each;
			print ($tmp +  " " + $each + " position\n");
		error "You must specify \"lock\" \"unlock\" or \"toggle\" as an argument";
  04 April 2013
The soft mod tool can still move the locked CVs. It is not able to translate tho but if I use soft mod , it'll still move
  04 April 2013
Even if I lock length the soft mod tool still able to bypass it. However soft selection seems okay. But soft mod tool is way better for moving a big chunk of curves.

I must have done something wrong to the script. I copy and paste into the script editor then drag it to the shelf. Select a bunch of CVs on multiple curves then click on the newly created button from shelf. It does nothing.

Last edited by HapZungLam : 04 April 2013 at 05:03 PM.
  04 April 2013
oh sorry...for some reason I thought you meant soft selection. The script does seem to work for that, but you need to use an argument eg. 'lockCVs toggle' to toggle the locking for each.

Could you not just remove the CVs from the softmod deformer set?
you could use [curves] > [selection] > [select first CV] to get all the roots.
  04 April 2013
Im just going to use soft selection now. Still works
  04 April 2013
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 01:15 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.