May 21, 2019

My SendTo_FFmpeg scripts, the big update

Updated my SendTo_FFmpeg scripts today.

It's getting much better:

  • A few new presets
  • Now all of the scripts (except external audio and mux) support multiple file selection.
  • Global settings for all batches in sendtoffmpeg_settings.cmd file (includes path to FFmpeg, verbosity level and end pause, descriptive names option in the next commit)
Just a reminder. SendTo_FFmpeg is a set of windows batches for effortless and free video transcoding. It's a set of tools I develop mainly for myself and it saves me tons of time every day. To use it, go to SendTo_FFmpeg scripts github page. Read the description and click "Clone or download" button.

Add current layer(s) info to your After Effects renders

Sometimes you need to include current layer(s) information to your renders, so they could be identified by a viewer or yourself or just for debugging purposes. Here's how.

1. Create an empty text layer
2. Unfold its properties to Text -> Source Text
3. Click its stopwatch while pressing Alt (it enables the expression for the Source Text)
4. Paste this expression:
So your layer should look like this: 

5. You're done. Adjust the text layer's size, font, color and position to your preferences as usual. This expression creates text with your composition name and current layer(s) numbers. If you do not want it to be included in the actual render, use Layer -> Guide Layer option

Or if there's more than one layer active at current time:

This expression takes in account all the layers below itself, so to include all of comp layers make this text layer the topmost.
The expression can be slow if you have some huge amount of layers in your comp.

It's also very easy to get the layers names instead of their numbers. Here's the version for it:

Mar 14, 2019

Adding "Select Parent" command to Cinema 4D

1. Run the script manager, menu Script ➩ Script Manager (Extensions ➩ Script manager in R21)
2. Choose Python (for C4D below R20)
3. Start new script, menu File ➩ New File
4. Paste the code into the code field
as shown on the picture
5. You can render (current viewport) or load the icon for your script using File ➩ Render or File ➩ Load Icon
6. Save your new script File ➩ Save the script
7. Push the Shortcut button on the bottom right, assign your own key
8. Save your C4D config

You're done

Jan 13, 2019

Nudging a layer by a fraction of frame

When working with audio in After Effects I often find it difficult to sync the sound with a desired precision because all layers are snapped to frame length. But it's possible using AE scripting. You can save this as a separate script or (like me) use it with ft-Toolbar.
var comp = app.project.activeItem;
var lr = comp.selectedLayers[0];
if (comp.selectedLayers.length > 0) {
    var frl = comp.frameDuration;
    app.beginUndoGroup("Layer Nudge");
    lr.startTime += frl/4;
} else alert("Select a layer");
This code will nudge your selected layer by 1/4 of a frame length forward.
If you use ft-Toolbar (or similar extension) put the previous code as a main Javascript function. And for the modified (Ctrl +Click for instance) use the copy of it with a change of the sign in the line:
    lr.startTime -= frl/4;
It nudges the layer into the opposite direction. Or if you need a different precision, just change the divider /4.

You can find more useful AE scripts in my GiHub repository

Happy aftereffecting :)