autoCrop_MB v2.3


 
This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Jack Hughes
A GUI That Runs Nuke's Hidden Crop.py Script.
Requirements:
11.0, 10.5, 10.0, 9.0 or later
Mac
03 May 2017
43

**DESCRIPTION**

The bounding box is a powerful part of Nuke's compositing ethos. It can help make your scripts more efficient and speed up your renders. Anything outside the bounding box will not be considered when applying defocuses and motion blur for example which is a huge time (and CPU) saver!

This python script harnesses the power of a hidden crop.py script.

The crop.py script runs the Auto Crop in a curveTool on a selected node/s and then copies the data into a crop node. It does this automatically.
It will produce an animated bounding box that is tight to the channel you run it on. Only non-zero pixels are kept.

It's particularly useful when you receive CG with no bounding box but can also speed things up when coming out of a ScanlineRender.

autoCrop_MB displays a GUI that runs the hidden crop.py script.

autoCropMB

The GUI asks the user for 'frame range', the 'layer' and the 'increment' to analyse. If running autoCrop_MB on a 'Read' node it is possible to set
the 'frame range' to 'input' instead of 'global'.

 

**INSTALLATION**

Add the following to your menu.py after placing autoCrop_MB.py in to your .nuke folder.

import autoCrop_MB
nuke.menu( 'Nuke' ).addCommand( 'MB Tools/Run Auto Crop on Selected', autoCrop_MB.autoCrop_MB )

 

**USE**

1) Select node/s to run autoCrop_MB on.
2) Choose 'Run Auto Crop on Selected' from the 'MB Tools' menu.
3) Choose the frame range to run the script on - global or input, if available.
4) Choose the layer to run the script on. Alpha is best if you have one.
5) Change the 'increment' to analyse if necessary.

 

**CAVEAT**

The autocrop script will not analyse anything outside the format area. For example, if you have a ScanlineRender with 'overscan' turned on it will not analyse the overscan area in the stream.

Replace line 35 in the crop.py script with the following.  The script is found in the nukescript folder - /Applications/Nuke10.5v1/Nuke10.5v1.app/Contents/MacOS/plugins/nukescripts/crop.py for example).
This will allow for pixels if they are outside the format.

'''operation 0 ROI {input.bbox.x input.bbox.y input.bbox.r input.bbox.t} Layer %s label 'Processing Crop...' selected true''' % (str(layer), ), False)

Happy Bounding Boxing!

Jack Hughes
Magic Beans VFX Ltd
https://magicbeansvfx.wordpress.com

Please login in order to download these files.

You have no rights to post comments

We have 2807 guests and 40 members online