Quantcast
Viewing all articles
Browse latest Browse all 12845

AICC - Find/replace specific layer name aspects

Hi all,

 

I create a lot of 2D vector assets for animation (some characters can run into the 100's of layers), and need some help with scripting in order to speed up my process.

 

As with most animations, the animator needs specific layer names to relate to specific objects. My general layer naming conventions are as follows: Charactername_Asset_Direction_Orientation, e.g. OLDMAN_Eyeball_R_PR (R denoting Right, PR denoting the character is facing Profile Right).

 

Since my animators are unable to simple flip an existing rigged characters of one facing direction to use for the inverse, I am found having to make duplicate character assets wherein I flip them in AI, and have to rename them all. It'd be easy if it were just changing all instances of PR to PL, but I also need to change the Orientation of the object (Left hands become Right hands, etc).

 

I have tried editing scripts wherein the code looks for all instances of _R_, and replaces them with a symbol, repeats the process for all instances of _L_, then replaces those symbols with their intended L or R. No dice, I keep coming up with broken code.

 

I'd prefer the ability to Find/Replace all instances of _R_ and _L_ independent of Finding/Replacing _PR and _PL, as sometimes the layer name convention calls for a slight shift in protocol. Happy to run 2 scripts, one after the other, but I'm not having any luck on my end.

 

Any help out there?

 

Thanks!!

- C


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>