FORUMS: list search recent posts

sort masks by name

COW Forums : Adobe After Effects

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Brice Martin
sort masks by name
on Jan 15, 2018 at 4:18:20 pm

Hello,

i need help, i need to sort masks by name...
> I try the script rd: kinda Sorta but it onny sort layers not masks...



Any ideas ?

thx

_Brice


Return to posts index

Dave LaRonde
Re: sort masks by name
on Jan 15, 2018 at 7:35:30 pm

That could be a very bad idea depending on the mask modes employed. Sorting could totally screw things up for you.

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


Return to posts index

Walter Soyka
Re: sort masks by name
on Jan 15, 2018 at 9:32:00 pm

This script will sort masks alphabetically on all selected layers in the active comp. As Dave notes, you should be careful; this does have the potential to mess some things up!

Save this block of code as a JSX file and you can sort masks all day long:
// quick script to sort masks by name on all selected layers in the active item

// a comp must be the active item
if (app.project.activeItem instanceof CompItem) {
app.beginUndoGroup("Sort Masks");

// step through the selected layers of the active item
for (var selLayerIndex = 0; selLayerIndex < app.project.activeItem.selectedLayers.length; selLayerIndex++) {
var maskParade = app.project.activeItem.selectedLayers[selLayerIndex].property("ADBE Mask Parade");

// bubble-sort the masks by name (case-insensitive)
for (var i = 1; i <= maskParade.numProperties; i++) {
for (var j = 1; j <= maskParade.numProperties - i; j++) {
if (maskParade(j).name.toLowerCase() > maskParade(j+1).name.toLowerCase())
maskParade(j+1).moveTo(j);
}
}
}
app.endUndoGroup();
} else alert("Select one or more layers to sort masks.");


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


Brice Martin
Re: sort masks by name
on Jan 16, 2018 at 8:47:32 am

GREAT THX Walter !!
Exactly what i search !


Return to posts index

Brice Martin
Re: sort masks by name
on Jan 26, 2018 at 11:10:43 am

Hello,
it's me again.

I have a lot of masks (pencil illustration) and i want to make a stroke effetcs from bottom left.
> is it possible to sort them by position (from bottom left to top right) ?

Thanks


Return to posts index

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