Copy link to clipboard
Copied
Hi,
Each time I convert an Ai file into shape layer it changed it name with an extra word 'Outlines' with it. I dnt want it. manullay removing it from many layers is so waste of time. How can I get rid of it. Thank you
This script removes the last word from the name of each selected layer:
var proj = app.project;
var thisComp = proj.activeItem;
var selectedLayers = thisComp.selectedLayers;
app.beginUndoGroup("remove last word");
for (var i = 0; i < selectedLayers.length; i++) {
selectedLayers[i].name = selectedLayers[i].name.split(' ').slice(0, -1).join(' ')
}
app.endUndoGroup();
@Suraiya A The code that @Airweb_AE listed will remove the last work of each selected layer.
1. Copy the code from here into a code or text editer (like notepad, VS Code, etc.) and save the file with the extension .jsx
Make sure you put the file someplace you can find it for the next step.
2. In After Effects select the layers you want to script to affect.
3. Choose File > Scripts > Run Script File
4. Navigate to where you saved the file and double-click it to run.
This will remove the last word
...Copy link to clipboard
Copied
It hasn't happened to me before. Which version of After Effects are you using? Also, what type of object are you trying to import from Illustrator?
Copy link to clipboard
Copied
Ae version 24. simple stroke, shape etc from illustrator. I am not only alone. I have seen tutorials on youtube, ppl also have faced this problem. and they change the name manually. I did change it manually so long, but Today I lose my temper and posted here.
Copy link to clipboard
Copied
I have attached the total process. Kindly check Please. Thank you.
Copy link to clipboard
Copied
@Mohammad.Harb the poster was referring to the way Ae adds the word outlines to the end of a layer when you convert an imported vectore layer into an After Effects Shape layer. It always appends the name with the word Outlines.
Copy link to clipboard
Copied
This script removes the last word from the name of each selected layer:
var proj = app.project;
var thisComp = proj.activeItem;
var selectedLayers = thisComp.selectedLayers;
app.beginUndoGroup("remove last word");
for (var i = 0; i < selectedLayers.length; i++) {
selectedLayers[i].name = selectedLayers[i].name.split(' ').slice(0, -1).join(' ')
}
app.endUndoGroup();
Copy link to clipboard
Copied
😮 😮 😮 Oh no!! There is a script for it!!! 😮 where do I have to write it! 😮 😮 😮
Thank you so much!!! 😮 😮 😮
Please tell me where do I have to write it!
Copy link to clipboard
Copied
When you're performing repetitive tasks, you can use a script to automate the process.
Normally, you just need to save the code in a JSX file, for example: "remove_last_word.jsx",
and then run the script by going to File > Scripts > Run Script File...
However, over time, you might end up with lots of snippets like this one that perform various tasks, and in that case, it would be better to use a script manager to easily search for and run your scripts.
I just found a free one that looks good.
Copy link to clipboard
Copied
Thank you so much. I was feeling so helpless. Thank you so much again.
Copy link to clipboard
Copied
@Suraiya A The code that @Airweb_AE listed will remove the last work of each selected layer.
1. Copy the code from here into a code or text editer (like notepad, VS Code, etc.) and save the file with the extension .jsx
Make sure you put the file someplace you can find it for the next step.
2. In After Effects select the layers you want to script to affect.
3. Choose File > Scripts > Run Script File
4. Navigate to where you saved the file and double-click it to run.
This will remove the last word.
Though on a side note, unless you need one of the features only available to native AE shape layers converting from an imported vector graphic into a native one is rarely necessary.
Copy link to clipboard
Copied
Thank you so much.