SCRATCH v9.1 - After Effects / Nuke - Bridges


GENERAL

The SCRATCH to After Effects / Nuke - bridge (S2AE and S2N) is a way to seamlessly exchange media back and forth SCRATCH and the corresponding applications. Open a shot in The Foundry's Nuke directly from a SCRATCH timeline, work on the composite and automatically load the rendered result as a version back into your timeline. Or open a timeline shot in Adobe's After Effects, create various matte-plates, automatically load those back into the SCRATCH timeline and use them in your SCRATCH grade.

(for SCRATCH v9.0 info open one of these links: S2AE and S2N)

SETUP

As of version 9.1 the setup of the bridges has been automated, with only a few optional manual steps to complete the After Effects round-trip function. The easiest way to setup the bridge is to use the Enhance SCRATCH Experience setup function.

This dialog will open automatically the first time after you installed SCRATCH but you can also open it by clicking the Setup button in the SCRATCH startup screen (right lower menu).

This function automatically detects if you have Nuke or After Effects installed on your system and creates a so called Custom Command button in SCRATCH and places the round-trip scripts in the user/data folders with the respective applications. Note that you can also manually setup the custom commands / bridges through the Custom Command setup tab in the SCRATCH System Settings. In the last paragraph of this section the manual steps are listed.

Once the Custom Commands have been created they are available from the Construct Tool menu as well as in the Player (right click) command menu and using Quick Key: Ctrl + F1-F8 (the exact Function-key depending on how many other custom Commands you have setup).

 

ADDITIONAL MANUAL SETUP AFTER EFFECTS

To enhance the round-trip with After Effects there are a couple of steps to consider.

Enable [Allow Scripts to Write Files and Access Network]

To be able to send rendered media to SCRATCH, you have to enable the settings Enable Allow Scripts to Write Files and Access Network, which you can find in After Effects >> Preferences >> Scripting & Expression dialog.

Scratch2AfterFX menu

In the Windows Menu in After Effects, you will find at the bottom the Scratch2AfterFX-UI. This menu is used to render a Composition and send it directly back into SCRATCH; either to the Tray or or to the Timeline (in the same slot as the source shot).

IMPORTANT: Use the Scratch2AfterFX-UI and not the Render button from the Render Queue menu.

You can enter an annotation (by default ‘From After Effects’) and set the color note for the rendered shot as it will appear back in SCRATCH. Note that this menu is dockable, so you can access it esily on your next AfterEffect session.

After Effect Output Template

It is recommended that you use an output template to render media back to SCRATCH. If the S2AE function detects a template called 'scratch', it will use that to render the results that are send back to SCRATCH. For the current version of the script it is recommended to use Prores4444 as interop-format. File-sequence files will currently not load back automatically into SCRATCH. To create and output template:

  • go to Edit - Templates - Output ModulesType,
  • in Settings Name enter ‘scratch’,
  • Click on Edit… button,
  • Select Quicktime as Format,
  • in Format Options, select Prores4444,
  • in Channels, set RGB + Alpha.

ADDITIONAL MANUAL SETUP NUKE

You can adjust the default S2N setup by adding additional command line parameters with the Custom Command in the corresponding tab in the System Settings dialog. The following additional parameter are available:

  • -nc runs Nuke in Non Commercial Mode
  • -x runs Nuke in X Mode
  • -ncx runs Nuke in Non Commercial and X Mode
  • -warn disables popup Messages when a Nuke instance is already open.
  • -cmd generate only Nuke Composition file and folder structure but does not run Nuke Application.
  • -path ‘$media/custom/path’ set a custom path as default location for Nuke compositions. Using the ‘$media’ will use the Media Folder set into the Scratch project

The first time S2N command is executed, the ‘s2nuke_settings.py’ file is generated. This file also contains a number of settings that you adjust to change the behavior of the S2N function.

  • S_S2N_OUTPUT_PATH = "#media/s2n_roundtrip" // This is the default folder for rendering. With #media, it will use the ‘Media Path’ set inside the Scratch project
  • I_NUKE_START_MODE = 1 // 0 = starts Nuke application, 1 = xmode, starts NukeX application
  • B_MESSAGE_ALERT = 1 // Allow to display popup Message when a Nuke instance is already open, and the composition settings are are through the for copy paste [0= off / 1=on]
  • B_NUKE_CMD = 0  // 0 = Open Nuke session comp or 1 = Generate one .nk file per shot
  • B_RENDER_TRAY   // 0 = Send shot into Tray, 1= Send shot into Timeline slot.  This setting can be overriden inside Nuke compositions, with the ‘ScratchMetadata’ node

USING THE BRIDGE

Send a shot

To execute S2AE or S2N either use the custom command button in the Tools menu in the Construct or the right click command menu in the Player. Note that from the Timeline in the Construct you can select multiple shots before clicking the custom command.

In After Effects

After clicking the command, After Effects starts automatically, loads the selected shots and create a composition based on SCRATCH Timeline settings and adds this composition to the render queue with the proper filename. The composition is saved to file so it can be reopened at a later time if needed.

Next, you can work the shot(s) in After Effects and when done you render the through the UI panel that you have setup earlier. The Scratch2AfterFX-UI contains 2 buttons:

  • Render & Send to Tray: this loads the rendered shot into a SCRATCH Tray, called AfterEffects.
  • Render & Send to Timeline: this loads the shot as a version into the same slot as the source shot.

In Nuke

S2N generates a '.nk' Nuke composition with 2 regions.

  • IN contains the clip loaded from Scratch and a TimeClip node to get framerange properly adjusted.
  • OUT group contains a node ‘ScratchMetadata’ and a Write node already set. (don’t place any node between ScratchMetadata and Write_Send_To_Scratch, the script won’t generate properly xml data after rendering)

The ScratchMetadata section in the OUT region allows you to change certain settings for the render and sending back to SCRATCH.

  • Xml Export can be set to:
    • Timeline slot will send the shot as a new version loaded into the same slot of a Scratch Timeline.
    • Tray will send the shot into the Tray named ‘Nuke’
  • Note changes the content of the note attached to the new generated clip.
  • Color code changes the color of the note sent into Scratch
Multi-shot support

When multiple clips are selected in SCRATCH when activating S2N, all the clips are imported and sorted in the same order as in the SCRATCH timeline.

Generate only Nuke compositions

When the setting B_NUKE_CMD is enabled, S2N creates only a .nk file. This can be used in combination with multi selection as to quickly create an ‘.nk’ files for each clip in a Timeline. A popup message is displayed when the function is done.
 


Return in SCRATCH

Depending on the option you used in After Effects or Nuke for rendering out the shot, it will show up differently in SCRATCH:

  • Render to Timeline. You are notified that a new shot is ready to load by the project name in the project tree turning blue as well as the project Refresh button turning blue. Click the Refresh button and the new shot is loaded in the correct slot in the Construct.
  • Render to Tray. You are notified with the Tray button turning blue. You will find the new shot in the AfterEffects / Nuke Tray.

Re-Send a shot

Any rendered shot that is loaded back in SCRATCH has its ReelID flagged as ‘FromAFX’ / 'FromNuke' as well as contains a custom metadata called AfterFxComposition / NukeComposition where the name of the source composition is stored. If the shot is sent again to AfterEffects or Nuke, it will open the existing composition rather than creating a new one.

Misc

For Windows only. Note that in certain cases when using a high DPI display for starting AfterEffects from the S2AE bridge (which starts AfterFX.com, not AfterFX.exe), you have to create a file called ‘AfterFX.com.manifest’. For more information about this see: https://www.danantonielli.com/adobe-app-scaling-on-high-dpi-displays-fix/.


Posted - Thursday, March 28, 2024 8:05:48 PM
https://www.assimilatesupport.com/akb/KnowledgebaseArticle51027.aspx