btw here is the modified script if anybody is also looking for what i was looking .
/*
NAME: oaExtrudeAll.mel
AUTHOR: Oleg Alexander, olegalexander@gmail.com
DATE: September 22, 2005
MODIFIED BY : sagunmanandhar@hotmail.com , Nov14,2009
MODIFIED FOR : Profile curves are also duplicated for independent extrusion control.
DESCRIPTION:
Extrudes a profile curve along multiple path curves.
Will create a duplicate of the profile curve and orient it to the first
path curve in the selection.
It is a good idea to create a library of interesting profile curves to work with.
For best results, create the profile curves in the top view, and center the pivot.
TO USE:
Execute 'oaExtrudeAll' to bring up the UI. Follow the directions.
===========================================================================
*/
//UI
global proc oaExtrudeAll() {
if (`window -query -exists oaExtrudeAllUI`) {
deleteUI oaExtrudeAllUI;
windowPref -remove oaExtrudeAllUI;
}
window
-title "oaExtrudeAll UI"
-resizeToFitChildren true
-sizeable false
oaExtrudeAllUI;
columnLayout -adjustableColumn true -rowSpacing 5;
text "Select the profile curve first, then all the path curves.";
checkBox -value 1 -align "left" -label "Caps" capsCheckbox;
button
-h 30
-l "Extrude All"
-c "oaExtrudeAllProc(`checkBox -q -v capsCheckbox`);"
-ann "Select the profile curve first, then all the path curves.";
showWindow oaExtrudeAllUI;
}
global proc string[] oaExtrudeAllProc(int $caps)
{
string $surfaces[];
string $selected[] = ls -sl;
string $nprof[];
if (size($selected) < 2) error -sl on "You must select at least two curves.";
for ($i = 1; $i < size($selected); $i++)
{
string $mtemp[0]= duplicate $selected[0];
$nprof[$i-1] = $mtemp[0];
select -r $selected[$i];
selectCurveCV first;
vector $firstCVxyz = pointPosition;
pickWalk -d down;
vector $secondCVxyz = pointPosition;
move -ws -rotatePivotRelative ($firstCVxyz.x) ($firstCVxyz.y) ($firstCVxyz.z) $nprof[$i-1];
string $loc_[0] = spaceLocator -p ($secondCVxyz.x) ($secondCVxyz.y) ($secondCVxyz.z);
CenterPivot;
delete aimConstraint -offset 0 0 0 -weight 1 -aimVector 0 1 0 -upVector 0 1 0 -worldUpType "vector" -worldUpVector 0 1 0 $loc\_[0] $nprof[$i-1];
delete $loc_[0];
string $curveShape[0] = listRelatives -s $selected[$i];
int $degree = getAttr ($curveShape[0] + ".degree");
rebuildCurve -kcp 1 -keepRange 0 -d $degree $selected[$i];
string $surface[0] = extrude -ch true -rn false -po 0 -et 2 -ucp 1 -fpt 1 -upn 1 -rotation 0 -scale 1 -rsp 1 -name ($nprof[$i-1] + "\_" + $selected[$i] + "\_extrude") $nprof[$i-1] $selected[$i];
$surfaces[$i - 1] = $surface[0];
if ($caps == 1)
{
//Get the number of spans of the extruded surface
int $spans = getAttr ($surface[0] + ".spansV");
//Select the first isoparm and planar it
select -r ($surface[0] + ".v[0]");
catch (planarSrf -name ($surface[0] + "\_cap1") -ch 1 -d 3 -ko 0 -tol 0.00393701 -rn 0 -po 0);
//Select the second isoparm and planar it
select -r ($surface[0] + ".v[" + $spans + "]");
catch (planarSrf -name ($surface[0] + "\_cap2") -ch 1 -d 3 -ko 0 -tol 0.00393701 -rn 0 -po 0);
//Parent the caps under the extruded surface
parent ($surface[0] + "_cap1") ($surface[0] + "_cap2") $surface[0];
//Turn off inherits transform to avoid double transforms because of history
setAttr ($surface[0] + "_cap1.inheritsTransform") 0;
setAttr ($surface[0] + "_cap2.inheritsTransform") 0;
}
}
select -r $nprof;
return $surfaces;
}
oaExtrudeAll() ;