FORUMS: list search recent posts

Remove all shape layers in selected composition

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Arun Chaudhary
Remove all shape layers in selected composition
on Jul 21, 2017 at 2:31:01 pm

After effects, script remove all shape layers in selected composition
any idea? how can do this
Thanks.


Return to posts index

Jim Scott
Re: Remove all shape layers in selected composition
on Jul 21, 2017 at 6:06:12 pm

I don't know how to create a script, if that's what you're asking, but if you just want to remove all shape layers: Enter "shape" in the search window above the layers in the Timeline panel. Drag to select them all (don't use "select all")... delete. Clear the search window by clicking the X and the remaining layers will be displayed.



Return to posts index

Arun Chaudhary
Re: Remove all shape layers in selected composition
on Jul 22, 2017 at 4:55:37 am

Thank you, Jim Scott, for your reply but this is not work in my case i have 500 hundred + comp. so I don,t want open all 1 by1 I want select all comp run script then removed all shapes layer in comp.


Return to posts index


Dave LaRonde
Re: Remove all shape layers in selected composition
on Jul 22, 2017 at 4:30:43 pm

Since there is no way to specify a shape layer in a script or an expression, it has to be done by hand. Sorry.

Dave LaRonde
Promotion Producer
KGAN (CBS) & KFXA (Fox) Cedar Rapids, IA


Return to posts index

Walter Soyka
Re: Remove all shape layers in selected composition
on Jul 23, 2017 at 11:50:32 am

Here's a quick script that will remove all shape layers in the selected comps in a project (or in the active comp if no selection is made).

Back up your project file first and use this at your own risk!

function deleteAllShapeLayersInComp(comp) {
// delete all shape layers in the specifed comp

// step through the comp, removing any shape layers as we go
// work backwards from the last layer, because removing later layers won't affect the indices of earlier ones
for(var i = comp.numLayers; i >= 1; i--) {
if (comp.layers[i] instanceof ShapeLayer) comp.layers[i].remove();
}
}


function processProjectSelectionComps(func) {
// go through all selected items in a project. if they're comps, perform the specifed function on them

if (app.project.selection.length > 0) {
for (var i = 0; i < app.project.selection.length; i++) {
if (app.project.selection[i] instanceof CompItem) {
func(app.project.selection[i]);
}
}
}
}


app.beginUndoGroup("Delete All Shape Layers");

if (app.project.selection.length > 0) {
processProjectSelectionComps(deleteAllShapeLayersInComp);
} else if (app.project.activeItem instanceof CompItem) {
deleteAllShapeLayersInComp(app.project.activeItem);
}

app.endUndoGroup();


Walter Soyka
Designer & Mad Scientist at Keen Live [link]
Motion Graphics, Widescreen Events, Presentation Design, and Consulting
@keenlive [twitter]   |   RenderBreak [blog]   |   Profile [LinkedIn]


Return to posts index

Arun Chaudhary
Re: Remove all shape layers in selected composition
on Jul 26, 2017 at 6:10:29 am

Hi, Walter Soyka
I want to say you are legends you make my day you script work fine as I want
Thank you so much


Return to posts index


Arun Chaudhary
Remove all files in a shape layer and add stroke
on Sep 14, 2017 at 1:26:17 pm

Hi,
again I need your help I find a post for Remove all files in a shape layer, John Colombo script works fine for active comp. but I want this script works for selected comp. in a project
and add a stroke in all shape layer stroke width can be set. if it is possible
https://forums.creativecow.net/thread/227/30520
I am very grateful to you
Arun


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]