Expressions/Scripts/Presets

Moderator: Paul Tuersley

 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

pt_ShiftLayers

Fri Jun 11, 2004 7:04 pm

This script can be used to shift or stagger any selected layers in time.

Download pt_ShiftLayers from aescripts.com

Image

To run it as a dockable panel, place the script in a folder called ScriptUI Panels, inside AE's Scripts folder. If there is no ScriptUI Panels folder in the Scripts folder, you'll need to create one. When you restart AE, you'll be able to select the script from the Windows menu.

The script requires After Effects CS3 or greater.
Last edited by Paul Tuersley on Sun Mar 13, 2005 2:19 am, edited 1 time in total.
 
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Wed Oct 27, 2004 1:29 pm

Hi Paul,

Is it possible to modify this script so that it can offset the selected layers by a defined amount?

so for example I can take 5 layers that all start at frame zero and offset them 5 frames so that layer 1 starts at frame 0, layer 2 starts at frame 5, layer 3 starts at frame 10, etc.

I know there is a Sequence Layers Keyframe assistant that can kind of do this, but it sequences the layers from in point to out point instead of a user defined duration..


thanks

lloyd

ps.. i'll definitely buy you a beer if this is possible :D
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Stagger Selected Layers

Sun Nov 07, 2004 11:21 am

On Lloyds suggestion, I've adapted my Shift Selected Layers script into this one that lets you stagger the in-points of all selected layers.
 
Paul Hill
Posts: 7
Joined: Mon Apr 30, 2007 4:44 am
Location: Bristol UK

Mon Apr 30, 2007 6:41 am

I'm having a problem with this script. I'm trying to use it with After Effects 7 Pro on Windows XP Pro.

When the script is run the palette window opens and I am able to select options from the list of four. However, I am unable to click on the two main buttons. They do not even highlight. I am also unable to enter an amount into the frames/seconds box.

It seems especially odd as I have tried the similar Shift Selected Layers script and it works fine.

I've contacted Paul Tuersley and he will have a look to see if there is any obvious reason for this fault. However, it would be helpful if anyone using Windows could try this script out or mention if they have had the same problem.

Thanks.
 
nab
Posts: 203
Joined: Tue Nov 29, 2005 3:00 am
Location: Royan
Contact:

Mon Apr 30, 2007 10:35 pm

There is a little overlap between the two panels that causes trouble on the Windows version.
Remove the second panel or make it bigger (within a bigger palette as well).
I'm sure Paul (T.) will fix it easily. :wink:
 
Paul Hill
Posts: 7
Joined: Mon Apr 30, 2007 4:44 am
Location: Bristol UK

Tue May 01, 2007 7:41 am

Thanks nab. I don't really know much about scripting but after fiddling for a while I worked out the values I had to change.

My alterations are in bold. (Please note this isn't the entire script, just the relevant section)

// main script

// build the palette
var shiftLayersPalette = new Window("palette", "Stagger Selected Layers");
shiftLayersPalette.bounds = [400,300,605,445];

var topPanel= shiftLayersPalette.add("panel", [5,5,200,65], "Stagger Selected Layers");
var currentRB = topPanel.add("radiobutton", [10, 15, 190, 35], "Stagger from current time marker.");
var originalRB = topPanel.add("radiobutton", [10, 35, 190, 55], "Stagger from original in-points.");

var bottomPanel = shiftLayersPalette.add("panel", [5,64,200,115], "");
var framesRB = bottomPanel.add("radiobutton", [10, 5, 190, 25], "Stagger time in frames.");
var secondsRB = bottomPanel.add("radiobutton", [10, 25, 190, 45], "Stagger time in seconds.");

var staggerInput = 1;
currentRB.value = true;
framesRB.value = true;

framesRB.onClick = on_framesButton_click;
secondsRB.onClick = on_secondsButton_click;

var text_input = shiftLayersPalette.add("edittext", [10, 120, 45, 140], staggerInput);
var offsetType = shiftLayersPalette.add("statictext", [50, 124, 90, 145], "frames");
text_input.onChange = on_textInput_changed;

var aboutButton = shiftLayersPalette.add("button", [90,120,120,140], "?");
var shiftButton = shiftLayersPalette.add("button", [127,120,190,140],"Stagger");
aboutButton.onClick = on_aboutButton_click;
shiftButton.onClick = mainShiftFunction;

// display the palette.


Now it works a treat on Windows. All credit to Paul T for creating it in the first place. It's very handy.
 
User avatar
lloydalvarez
Enhancement master
Posts: 460
Joined: Thu Jun 17, 2004 9:27 am
Location: New York City, NY
Contact:

Re: Stagger Selected Layers

Mon Jan 12, 2009 4:42 pm

Hey Paul,

The palette doesn't draw properly on CS3 or CS4 mac either..
Attachments
Picture 2.png
s
Picture 2.png (24.36 KiB) Viewed 24247 times
 
Paul Tuersley
Topic Author
Posts: 704
Joined: Sat Jun 05, 2004 7:59 am
Location: London, UK

Re: Shift Selected Layers

Sun Jan 25, 2009 8:41 am

I've posted an update that works correctly in CS3/4. I've merged the shift and stagger functions into one script and made it work as a dockable panel. Check the first post in this topic for the download link.

Paul
 
pecijackson
Posts: 8
Joined: Tue Jan 31, 2012 12:23 am

Re: pt_ShiftLayers

Wed Feb 01, 2012 1:59 am

thanks sir. this forum really make something handy for us AE user. wondering if i can make such a script to contribute. maybe someday. thanks. :D

Who is online

Users browsing this forum: No registered users and 2 guests