Anchor SNIPER User Guide v1.0

Download as pdf or txt
Download as pdf or txt
You are on page 1of 7

Page 1 of 7

by Video Narco
Manual for version 1.0

Table of Contents
Introduction……………………………….. Page 1
Installation ………………………………… Page 1
Uninstallation…………………………….. Page 2
Basic Usage………………………………… Page 3
Tools Basic Usage………………………. Page 3
Fixed Target Buttons..………………… Page 4
Custom Target Buttons………………. Page 4
Target Options…………………………... Page 5
Tools: Null Parent………….…………… Page 6
Tools: Split Masks………….…………… Page 6
Tools: Crop Layer……………………..... Page 6
Settings……………………………………... Page 6
Additional Support……………………... Page 7

Introduction
Anchor SNIPER is an After Effects script that lets you quickly and accurately set the location
of a layer's anchor point.

Supported layer types: Bitmap, Vector, Text, Shape and Video layers (with support for 3D
switch enabled for these layer types as well).

Compatibility: After Effects CC 2014 and up.

Installation
Copy the AnchorSNIPER.jsxbin file to the After Effects ScriptUI Panel folder based on your
Operating System.

Mac:
Applications/Adobe After Effects <version>/Scripts/ScriptUI Panels

Windows:
C:\Program Files\Adobe\Adobe After Effects <version>\Support Files\Scripts\ScriptUI Panels

To run the script in After Effects, select from the top menu Window -> Anchor SNIPER
Page 2 of 7

Important: You must enable the option


to Allow Scripts to Write Files and Access Enable
Network in Edit -> Preferences for the
script to run properly.

In After Effects CC 2019+ this option is in:

Edit -> Preferences -> Scripting &


Expressions

In After Effects CC 2018 and lower:

Edit -> Preferences -> General

Uninstalltion
To completely remove the script simply delete the AnchorSNIPER.jsxbin file.
Page 3 of 7

Basic Usage
1. Select the layers whose anchor Fixed Target Buttons
point you wish to relocate (in
an active composition).
2. Set the different options using
the four checkboxes (right side
of the interface). These options Help & Settings
are independent of each other
and can be mixed and matched
as desired, allowing for a total
of sixteen combinations. Options
3. Click on any of the nine Fixed
Target buttons or the Custom Custom Target Buttons
Target button to relocate the
selected layers' anchor point.

Tools Section
General Info
• Anchor SNIPER calculations are based on the current frame of the active comp's
timeline.
• If the Anchor Point parameter of a layer already has keyframes, a new keyframe will
be created at the current time. Existing animation keyframes earlier or later in the
timeline will be automatically adjusted to the new anchor point location.

Tip: This script uses a detailed scanning process


of a layer’s alpha channel (this option is turned
on by default). This process is significantly
more accurate when the project’s Color Bit-
Depth is set to 16 bits or higher.

Tools Section Basic Usage


The lower section of the interface contains three separate tools that can significantly speed
up the workflow of any AE user. See the specific help section of each tool for additional
details. These tools are:

Null Parent – This tool creates a new null parent layer at the selected target instead of
moving the anchor point. This feature is disabled in trial mode.

Split Masks – This tool creates a duplicate of the selected layer for each mask it has and
copies one of the masks to the new duplicate layer.

Crop Layer – This tool pre-composes a layer and automatically crops the new pre-comp to
the area of the layer's non-transparent pixels.
Page 4 of 7

Fixed Target Buttons


Each of the nine Fixed Target buttons lets you move the anchor
point to layer’s exact center or along its edges. The new target
location is determined using the current setting of the four option
checkboxes (see Target Options section on page 4).

Usage with the Null Parent tool


After clicking the Null Parent tool button, clicking any of the Fixed
Target buttons will create a null layer parent for the selected layer
at the selected location. This is instead of moving the anchor point. Once a null layer parent
is created the Fixed Target buttons revert to their normal behavior. You can manually cancel
the Null Parent mode by clicking the Null Parent button a second time (the button’s text will
say “Cancel”).

Custom Target Buttons


Below the Fixed Target buttons are the three Custom Target
buttons. These let you move a layer’s anchor point to any desired
location you choose in the composition viewer. When this feature
is used, only these two options apply: Move Layer and Group
Layers. The other two options (Use Layer’s Alpha and Use Comps Bounds) are ignored.
To set a Custom Target for a selected layer’s anchor point first click the left most Custom
Target button. This will create a temporary target layer and automatically lock any other
layers on the Timeline. Additionally, the Anchor SNIPER’s interface will become disabled
except for the OK and Cancel Custom Target buttons. Then, using After Effects’ Move tool,
drag the Anchor SNIPER’s target layer to a desired location in the composition viewer. To
approve the new location and move the anchor point click the OK button (green check
mark). To cancel the operation, click the cancel button (red X mark). After clicking either the
OK or Cancel buttons, the temporary target layer will be automatically removed and all other
layers will return to their previous locked status.

Specific options
Move Layer: If this option is enabled, after clicking the OK button both the anchor point and
the layer itself will move to the new selected location. This is equivalent to manually creating
a new null layer parent for the layer, moving the Null and then deleting it.

Group Layers: This option is only relevant if the Move Layer option is turned on. When Move
layers is turned on and group layers is turned off, all selected layers are moved to the exact
same position, stacked on top of each other. If move layers is turned on and Group Layers is
turned on, the selected layers move as a single object and are centered around the chosen
new location.

IMPORTANT: Since clicking the Custom Target button creates new Timeline layers (though
temporarily) this adds an action to the After Effects history list. Dragging the temporary
target layer and clicking the OK button each add more actions to the history list as well. This
means that if you wish to undo moving the anchor point then you would need to undo three
times or more, depending on how many times you dragged the temporary target layer.
Make sure you click either the OK or Cancel buttons before taking any other action to
automatically remove the temporary layers and return the timeline and the anchor SNIPER
interface to their normal states – so you can continue working normally. This process is due
to an unfortunate limitation of AE User Interface scripting.
Page 5 of 7

Target Options
The checkboxes on the right side of the interface consist of four
options that affect the behavior of the Fixed Target buttons, the
Custom Target button and the Null Parent tool. Each option is
independent. The final target location for the anchor point is
determined using the combination of all four options.

Use Layer’s Alpha


When this option is turned on (default), the Anchor SNIPER script will perform a detailed
scan of the layer’s alpha channel, detecting its actual non-transparent edges. The anchor
point will then be placed accordingly. This scanning process requires rendering the current
frame of the layer in full resolution and its duration depends on how effects-heavy is the
layer and the workstation’s computing power.
When this option is turned off, the anchor point’s location is determined using the original
bounds of the layer, regardless of its content. This process is instantaneous.
Note: This option does not affect the Custom Target buttons.

Use Comp’s Bounds


When this option is turned off (default) the anchor point’s location is determined using the
layer’s own coordinate system regardless of its rotation value. For example, if the layer is
rotated +90 degrees and you click the Top Fixed Target button, the anchor point will actually
move to the center of the edge facing the RIGHT side of the composition -- since now the top
edge of the layer is rotated to face that direction.
If this option is turned on, the anchor point location is determined using the composition’s
coordinate system. Using the same 90 degrees rotated layer from above and clicking the Top
Fixed Target button will place the anchor point at the edge facing the TOP part of the
composition.
Additionally, when turned on, this option limits the new target location of the anchor point
to the bounds of the composition. i.e. layers positioned completely outside of the
composition’s bounds will not be scanned and their anchor point will be placed at the center
of the composition.
Note: This option does not affect the Custom Target buttons.

Move Layer
When this option is turned on, instead of moving the anchor point, the layer position value is
changed (the layer moves) in accordance with the Fixed Target button pressed.

When this option is turned on and you select a Custom Target then after clicking the OK
button both the anchor point and the layer itself will move to the new selected location. This
is equivalent to manually creating a new null layer parent for the layer, moving the null, then
deleting it.

Group Layers
When this option is turned on, all selected layers are treated as a single object and the
anchor point of all layers is placed in the same location, according to their combined area.
When using a Custom Target with the Move Layer option turned on, the Group Layers option
also becomes relevant. When Move Layer is turned on and Group Layers is turned off, all
selected layers are moved to the exact same position, stacked on top of each other. If Move
Layer is turned on and Group Layers is turned on, the selected layers move as a single object
and are centered around the chosen new anchor location.
Page 6 of 7

Null Target
This tool temporarily changes the behavior of the main Anchor
SNIPER interface. Every option and button still behave in the
same way but instead of moving the layer's anchor point, a new
Null Layer is created at the desired target location and the
selected layer is automatically parented to it. Once the new null
layer is created the main Anchor SNIPER interface reverts to its
normal behavior. To revert to the normal behavior without creating a new Null parent click
the same Null Target button again – the text on the button will be “Cancel”.

Split Masks
This tool creates a duplicate of the selected layer for each mask
it has and copies only one of the masks to the new duplicated
layer. The original selected layer's video switch is then disabled.
This tool skips layers with one or zero masks. Additionally, this
tool ignores masks that are set in “None” mask mode.

Crop Layer
This tool pre-composes a layer and automatically crops the new
pre-comp to the area of the layer's non-transparent pixels at the
current frame. The pre-comping uses the "Leave all attributes"
method except for any masks on the layer. All Masks are moved
into the pre-comped layer before cropping.

Settings
Anchor SNIPER's Settings panel can be accessed by
hovering over the top right "hamburger" icon and
selecting "Settings…" from the revealed fly menu.

Toggle Layer Controls on Custom Target Selection


When clicking the Custom Target button, a temporary
target layer is created in the timeline which allows you to choose a new location for the
anchor point. To make this layer easier to relocate the composition viewer’s layer control
gizmos are temporarily toggled (off presumably). When you click either the OK or Cancel
buttons the layer controls' visibility is toggled back. Due to a limitation of AE scripting, the
layer controls can only be toggled and not specifically turned off. You can disable automatic
hiding of the layer controls by disabling this option.

Center Anchor Point After Cropping Layer


If this very useful setting is turned on, a layer’s anchor point is automatically centered after
the Crop Layer tool button in pressed.
Page 7 of 7

Small User Interface Fixed Target Buttons


Enable this option to reduce the size of the
Anchor SNIPER interface. This will change
most text into icons and is recommended
for experienced users who wish to save on
screen real-estate.
After setting this option you need to close Help & Settings
the script’s panel and restart it.

Show Tools Panels


If you wish to save on screen real-estate
Options
even further you can completely hide the
Tools section by disabling this option. Custom Target Buttons

Hide Background Texture Image

Enable this option to hide the background


camouflage texture image in anchor
SNIPER’s interface. Tools Section

Additional Support
For additional resources, updates and support visit http://aescripts.com

You might also like