This location is for Registered Users Only.
Perhaps you need to login or register.
11.0, 10.5, 10.0, 9.0, 8.0 or later
Linux, Mac, Windows
I wrote the 'Auto Crop' script to offer the best possible experience when you need to utlizie the curve tool 'auto crop' feature, despite that other solutions have already been offered on nukepedia.
- range - (input/global/custom), Let's you choose the frame range for the Auto Crop
- channels - Select the channel you want to scan and then tick the layers you want the Auto Crop to use for that channel (red/green/blue/alpha)
- overscan - If overscan is ticked, the Auto Crop will scan for pixels outside of the image format if avialable
- add 30 safety pixels - Adds 30 pixles (15px in one direction and 15 on the other) to avoid problems later in comp that can arise in certain situations for images that were cropped on the nearest pixel.
- reconnection - (not listed) After the Auto Crop script is done processing, it will automatically place an animated crop (delete the curve tool) and reconnect any nodes, before or after depending on the selection that you started the script on. (including masks or complex branches bellow)
How to use:
- Select one or more nodes that you want to Auto Crop.
- Run the script
- Choose the range that you want to to scan for the Auto Crop
- Choose the channlel and the layers that you want the Auto Crop to scan in (by default only the alpha layer is selected in rgba, that is if you have an alpha channel, becase usually it's the most efficient layer to scan.)
- Leave the 'overscan' ticked if you want to let the auto crop scan for additional pixles outside the image format if avialable.
- I recommend you leave the 'add additional 30 safety pixles' ticked, to avoid problems later in your comp. Another use of this feature is when you don't have an alpha channel in a CG render and you need to scan the rgb for example, you can safely choose to scan only one layer for efficiency (red or green or blue) and be sure that everything have been scanned properly, even if some of the layers in the last pixles are shorter and are missing data, adding those 30 safety pixles will make sure that you will have everything scanned for every layer, in almost 99.999% of the times. (the 30 safety pixels are added after the prcoession via expression, so they do not hinder performance while scanning)
- Click OK and wait for the process to finish.
How to install:
- Copy the file 'autoCrop.py' to your .nuke directory. (e.g. C:\Users\frank\.nuke)
- Add the following lines in your 'menu.py' (located in your .nuke directory):
scripts_m = nuke.menu('Nuke').addMenu('Scripts')
scripts_m.addCommand('Auto Crop', 'autoCrop.autoCrop()')
- Start Nuke and you can find the script in a menu called 'Scripts' (located in the top in menu in Nuke)
- Scan in background - when i find a solution how to execute the curve tool in the background without interfering with your work.
10 June 2018: Version 1.1
- 'Add 10 safety pixels' now changed to 'Add 30 safety pixles' (15 on the left and 15 on the right). The reason is that the 10 safety pixles were oftenly not enough, especially when you add post motionblur.
- If you entered a single frame, when using the 'custom' frame range option the script would fail - fixed
- The 'Add additional 10 pixles' chekbox was always happening, even if it was not ticked - fixed