This a great little script that can help to optimise your comp tree by setting the Bounding Box in an image stream.
Selecting the node your want to set the Bounding Box on. Hit ‘X’ (to start the Script Command window) and change the script language to Python. Then enter the following…
nukescripts.autocrop(first=None, last=None, inc=None, layer=&amp;quot;rgba&amp;quot;)
Nuke will run the CurveTools AutoCrop function, copy the autocropdata in to a Crop node and then delete the CurveTool. Genius!
‘first’ and ‘last’ refer to the frame range you want to analyse. If NONE is set it will use the Project Settings. ‘inc’ is the increment. ‘layer’ is the layer or layers you want to analyse. It’s good to set it to ‘a’ (alpha) for any premulted CG you receive so you can be sure your getting all the data down stream.
I’ve created an python script to help with running this command. It can be downloaded from Nukepedia.
Here’s a great video from The Foundry on understanding the Bounding Box…