Message 1 of 5
Link object by name then run command
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello, all Hope you are having a good day. I have a mel script that will take a selected curve and apply stitching to it. What I want to be able to do is loop the command by selecting all of the stitch geo and all of the curves. Then have the script apply the command to the curve and stitch of the same suffix: example stich_004 and PolyCurve_004. I'm not sure how to go about that. I know how to add them to a list but how can I say I only want the pairs with the same numbering? Also sidenote how would I add a proper suffix to a rename script?
seam2Curve
global proc seam2curve ()
{
string $geeseam[] = `ls -sl`;
createCurveWarp;
applyPresetToSelectedNodes "curveWarp2" "" "" "sofa_chair_stich" 1;
select $geeseam;
toggleVisibilityAndKeepSelection `optionVar -query toggleVisibilityAndKeepSelectionBehaviour`;
select -cl ;
}
seam2curve ()
rename script:
string $geerename[] = `ls -sl`;
for( $x=000; $x < size ($geerename) ;$x++ ) {
rename $geerename[$x] ("polyToCurve_" + $x);
}
Thank you for all your help!