View Full Version : Snapping CV together... how?
drawallday 03-24-2006, 11:33 PM Maya 5
How do I snap CVs together that all meet at one point. Like for example... snap the top CV row of a NURBS cylinder making a cone shape?
Thanks for your time.
-Michael
|
|
ephemeros
03-25-2006, 07:24 AM
i have made a simple script that does that, it gathers all the points, objects in the middle of the selection, but i'm not home now, i cannot write it here. in this case you might use the artist method: create a cluster with those CVs and go to the channel box and set the cluster scale on x,y,z to 0. :P
the disadvantage of the cluster method is that you'll have that unwanted cluster in history, but it is good when you only model. this applies to most cases. if you want the script, private msg me to post it here (i don't enter very often the forum).
drawallday
03-25-2006, 10:56 AM
ephemeros, thanks. But I remeber doing it without any scripts or cluster. It was something like using "Snap" then dragging the cv row to one direction and all of the cvs automatically collapses together.
Btw, yes I am using this method just for modeling.
vicky_1
03-25-2006, 11:05 AM
Hold down 'v' and move the selected cvs to one point or grid snap ('x') will collapse them to a grid point.
Is this what u want?
yep, do as vicky said, but firstly disable the "Keep Spacing" option for the move tool (hold w then press LMB and untick "keep spacing") ;)
ofcourse if you want a one click manner of aligning, then ephemeros is your friend :D
ephemeros
03-25-2006, 08:18 PM
allright dudes!! \m/
global proc laMijlocAdunarea()
{
string $sel[]=`ls -fl -sl`;
int $i=0;
int $j=0;
int $sz=size($sel);
float $max[]={0,0,0};
float $min[]={0,0,0};
float $tmp[]={0,0,0};
float $cnt[]={0,0,0};
float $val;
$min=eval("xform -a -ws -q -t "+$sel[0]);
$max=eval("xform -a -ws -q -t "+$sel[0]);
for($i=0; $i<$sz; $i++)
{
$tmp=eval("xform -a -ws -q -t "+$sel[$i]);
for($j=0; $j<3; $j++)
{
if($tmp[$j]>=$max[$j])
{
$max[$j]=$tmp[$j];
}
if($tmp[$j]<=$min[$j])
{
$min[$j]=$tmp[$j];
}
}
}
for($j=0; $j<3; $j++)
{
$cnt[$j]=(($min[$j]+$max[$j])/2);
}
for($i=0; $i<$sz; $i++)
{
eval("xform -a -ws -t "+$cnt[0]+" "+$cnt[1]+" "+$cnt[2]+" "+$sel[$i]);
}
}
laMijlocAdunarea;
"la mijloc adunarea" means "gather in the middle.
CGTalk Moderation
03-25-2006, 08:18 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.
vBulletin v3.0.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.