Jun 10, 2019

A few words on email notifications in your workflow

I recently took time to set up my UPS notifications to myself through email. I couldn't stop just there and now my UPS, my system, my renders etc, they all send me notifications to my email. This is really neat thing to have.

You will need a way to access you transmitting email account through simple smtp (not all services offer simple smtp access) or you can (what I did) set up a local smtp server on your machine, there's a nice and free one called hMail Server (you'll need your own domain or dynamic dns service for it). The most powerful thing is that you can set up emails to be sent for literally everything happening with your system, cause there's a way to send custom messages right from windows PowerShell script.

It can be done in just one command line but I use this simple extended (more human readable) script:

$EmailTo = "mail@gmail.com"
$EmailFrom = "me@example.com"
$Subject = "topic"
$Body = "Hi"
$SMTPServer = "mail.example.com"
$SMTPMessage = New-Object System.Net.Mail.MailMessage($EmailFrom,$EmailTo,$Subject,$Body)
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer, 25)
$SMTPClient.EnableSsl = $false $SMTPClient.Credentials = New-Object System.Net.NetworkCredential("me@example.com", "smtp password"); $SMTPClient.Send($SMTPMessage)

You save it as a simple text file, change the extension to .ps1 and use the command like

Call “E:\mydocs\sendemail.ps1”

to send the message to yourself. You can make plenty of them and add to windows Task Scheduler for each system event you want to be aware of.

If you interested I can make more extended tutorial for setting up your hMail server and configuring your domain’s DNS for it. Or you just DuckDuckGo for it, there’s already plenty of info online.

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 :)