autoCrop_MB v3.7

This location is for Registered Users Only.
Perhaps you need to login or register.
Contributor: Jack Hughes
This script sets the bounding box tight to an analysed stream.
11.0, 10.5, 10.0, 9.0 or later
15 Mar 2019


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!

The autoCrop_MB 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.

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

autoCrop MB v3.5


Add the following to your after placing in to your .nuke folder.

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


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, custom or input (if available). If you choose 'custom' please enter the start and end frames.
4) Choose the layer to run the script on. Alpha is best if you have one.
5) Click 'crop to format' if you would like to only analyse the format area and nothing outside it.

Happy Bounding Boxing!


autoCrop_MB v3.7
- Ability to add to BBox after you've run the script.  Helpful if your adding the crop somewhere else in your script and adding motion blur for example.

add to BBox

autoCrop_MB v3.6
- 'crop to format' checkbox now working correctly.

autoCrop_MB v3.5
- Increments removed.
- GUI layout adjusted.
- The ability to select a custom frame range added.
- The GUI is now not running the from the nukescripts folder. The auto crop function is built in to autoCrop_MB.
- Added the ability to analyse outside the format area.

autoCrop_MB v2.3
- First upload.

Jack Hughes
Magic Beans VFX Ltd

Please login in order to download these files.


0 # Philippe HUBERDEAU 2017-09-06 16:31
It's a pity that we can't doing this without baking it.
Like in the reconcile3D node with the "calculate output live" check box. ( or like in fusion )
It's been years that i wait for the option but it seems that it won't arrive.
Is there only me that is interested by this ?
0 # Jack Hughes 2017-11-08 11:33
I guess it's the computing power that's the problem. It would have to be calculated on the fly.
0 # Philippe HUBERDEAU 2020-09-07 16:30
It's really basic calculations, easier than reconcile3D and far easier than vectorblur for instance.
0 # Ruben Lorås 2022-02-09 16:02
To make it work in Nuke 13, just replace print nuke.message('P lease selected a node to run autoCrop_MB on...')
with print(nuke.message('P lease selected a node to run autoCrop_MB on...'))

You have no rights to post comments

We have 2839 guests and 119 members online