and don't forget the RegExp plugin on the CG Soup site. the docs actually
explain the rudiments of using RegExp, so even i understand the basics...
http://www.cg-soup.com/tools/ ... it's the second tool on the page.
maggie
-----Original Message-----
From: owner-xsi(at)Softimage.COM [mailto:owner-xsi(at)Softimage.COM]On Behalf
Of kim aldis
Sent: July 26, 2005 2:56 PM
To: XSI(at)Softimage.COM
Subject: RE: duplicate symmetry
Don't you just love regular expressions? The great thing about them is
no-one understands them. Oh the POWER!!!
> -----Original Message-----
> From: owner-xsi(at)Softimage.COM
> [mailto:owner-xsi(at)Softimage.COM] On Behalf Of brad
> Sent: 26 July 2005 19:45
> To: XSI(at)Softimage.COM
> Subject: Re: duplicate symmetry
>
> The script below will do what you need using Regular
> Expressions:
> (http://msdn.microsoft.com/library/default.asp?url=/library/en
> -us/script56/html/js56jsgrpregexpsyntax.asp)
>
> // Strips numbers off end of name
> // Swaps leftStr and rightStr from the beginning of input
> object names function NameSymmetry(inColl, leftStr, rightStr) {
> // verify input args and set defaults
> if(!inColl) inColl = Selection;
> if(!leftStr) leftStr = 'Left';
> if(!rightStr) rightStr = 'Right';
>
> for(var e = new Enumerator(inColl); !e.atEnd(); e.moveNext()){
> var nm = e.item().name;
>
> // Strip off end numbers
> nm = nm.replace(/[\d]*$/,'');
>
> var leftRE = new RegExp('^' + leftStr);
> var rightRE = new RegExp('^' + rightStr);
>
> // Test for leftStr
> if(nm.match(leftRE)){
> nm = nm.replace(leftRE, rightStr);
> }
>
> // Test for rightStr
> else if(nm.match(rightRE)){
> nm = nm.replace(rightRE, leftStr);
> }
> e.item().name = nm;
> }
> }
>
>
> -------Original Message-------
> > if you duplicate symmetry a skeleton structure with the
> word Right in
> > it, it will become RightNNN1.
> > Is there something that make is easy to rename the new
> structure so
> > it replace the word Right with Left and removes the 1 on the end?
> >
> > cheers,
> > Carl
> >
> >
> > ---
> > Unsubscribe? Mail Majordomo(at)Softimage.COM with the
> following text in body:
> > unsubscribe xsi
> >
> -------Original Message-------
> ---
> Unsubscribe? Mail Majordomo(at)Softimage.COM with the following
> text in body:
> unsubscribe xsi
>
>
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi
--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.323 / Virus Database: 267.9.5/58 - Release Date: 25/07/2005
---
Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body:
unsubscribe xsi