-
Notifications
You must be signed in to change notification settings - Fork 24
Applying Data
The Apply
macro is the magic that makes the lines move. However, each
track requires slightly different settings, and there are a lot of
different options that can be set. This documentation discusses what the
options are supposed to do, what the options actually do, and when you
may want to use them.
Before the Apply
macro is run, all of the lines that need to move with
the tracking data should be selected. The length of the selection is the
start frame of the earliest line to the end frame of the last line.
Commented lines are not counted as part of the selection and do not affect its start or end times.
Say you have a script with lines that have the following start and end frames:
1. Start: 13 End: 21
2. Start: 15 End: 33
3. Start: 99 End: 134
If all three lines or lines one and three are selected, the resulting collection will range from frame 13 to 134, 121 frames in length.
Alternately, if lines one and two are selected, the resulting collection will range from frame 13 to 33, 20 frames in length.
The first time you run the Apply
macro, the main window will look like
this:
Since there's a lot going on in this window, the options will be described in detail, row-by-row.
The data box is where the tracking data needs to go. As the label helpfully indicates, either the tracking data can be directly pasted into the box, or the full path to a file containing the tracking data can be provided.
For the sake of convenience, if the clipboard contains text that looks like tracking data, it will automatically parse it to see if it matches the selected line collection. If the data matches, it will be automatically placed into the data box.
If data is found on the clipboard, the label at the top of the window
will change to give the user a status message. The default shown is
displayed if the clipboard does not contain tracking data. If the
tracking data matches the line selection, the label will display Data is the correct length.
If the data does not match the line selection, the label will display an error message. For example, if the tracking data on the clipboard contains 22 frames of data but the selected lines only amount to 15 frames, the message would be:
Data was the wrong length. Exp: 15 Act: 22
Exp
is the expected number of frames (that is, the number of frames in
the selected lines), and Act
is the actual number of frames in the
motion data.
The x
checkbox specifies if the horizontal movement of the provided
tracking data should be applied to the selected lines.
The y
checkbox specifies whether or not the vertical movement of the
provided tracking data should be applied to the selected lines.
If any of the selected lines do not have the \pos
tag, Aegisub-Motion
will calculate the default position of the line and insert that value.
Note: the \move
tag is completely ignored by Aegisub-Motion. Even
if a line has the \move
tag present but not \pos
, Aegisub-Motion
will calculate its default position and use that. No effort is made to
remove the \move
tag, so the resulting lines may not display properly
Specifies if the movement of the provided tracking data should be
applied to the line's \org
, the perspective and rotation origin.
The default value of the line's \org
tag is the same as the line's
position, so the \org
tag is not inserted into the line if it is
missing. Instead, the origin option is ignored.
If only one of x
or y
position movement are selected, the origin
will only be moved in whichever direction is the selected one. In the
case that neither are selected, the Origin
option does nothing.
Note: origin movement does not work properly with tracking rotation. This is theoretically purely a problem with the math and may be fixed eventually.
Specifies if the position values that will be applied to the lines should be taken directly from the tracking data.
This option most likely should not be used with signs that take multiple lines, as it will cause the resulting lines to all be placed on top of each other. This is an advanced usage feature and most likely you do not want to use it if you aren't sure.
Without Absolute
enabled, Aegisub-Motion calculates the difference
between the line's position and the position given by the tracking data.
This difference is used to maintain the relative position of the line as
it moves.
The big box containing the number at the right of the row controls how many decimal places the output values are rounded to. Due to the low precision of the subtitle renderers, this should never need to go higher than 2. However, the range is variable from 0–5.
This rounding box affects the output of \pos
, \org
, \clip
and
\iclip
.
Specifies if the scale information from the tracking data should be applied to the selected lines. If enabled, the width and height of the output lines will be affected.
Any line that is missing either \fscx
or \fscy
tags will have them
inserted at the beginning of the line using the values from the line's
style.
Multiple different \fscx
and \fscy
tags may be present in a single
line.
Note that because Mocha Pro does not track x- and y-scale of the line separately, there is no option to apply x and y scaling separately.
Specifies if the scale information from the tracking data should be applied to the outline of the selected lines.
Any line that is missing the \bord
tag will have it inserted at the
beginning of the line using values from the line's style, unless the
style's value is 0. Because scaling is applied multiplicatively, an
outline of 0 will always remain 0.
\xbord
and \ybord
will also be processed.
Note: this option will do nothing if Scale
is disabled.
Specifies if the scale information from the tracking data should be applied to the shadow of the selected lines.
Any line that is missing the \shad
tag will have it inserted at the
beginning of the line using values from the line's style, unless the
style's value is 0. Because scaling is applied multiplicatively, a
shadow of 0 will always remain 0.
\xshad
and \yshad
will also be processed.
Note: this option will do nothing if Scale
is disabled.
Specifies if the scale information from the tracking data should be applied to the blur of the selected lines.
Due to layout constraints, the Blur
checkbox is in the row below the
rest of the scaling options.
If a line does not contain the \blur
tag, nothing will happen to it.
\be
is not used, because it only supports integer values and is
generally a lot less useful than \blur
anyway.
Note: while this function uses the exact same mathematics as the other scaling functions, there have been reports that blur does not visually scale linearly, so the results may not look quite correct.
Due to the low precision of the subtitle renderers, this should never need to go higher than 2. However, the range is variable from 0–5.
This rounding box affects the output of \fscx
, \fscy
, \bord
,
\xbord
, \ybord
, \shad
, \xshad
, \yshad
, and \blur
.
Specifies if the rotation information from the tracking data should be applied to the rotation of the selected lines.
Any line missing the \frz
tag will have it inserted at the beginning
of the line using the value from the line's style.
Note: does not work properly with Origin
currently.
Like the position and scaling options, two decimal places of accuracy for rotation should be plenty in most cases. However, if the origin of rotation is sufficiently far away, more decimal places of accuracy may make a difference. As with the others, the range is variable from 0–5.