Posts

Showing posts with the label nuke tutorilas

autoPinning.py

Image
auto pinning nuke cornerPin  This little code place the cornerPin nodes 4 pin's automatically based on the bbox. If your image dosen't have bbox add a crop node and crop it as per your need. Before: After:   Download: autopinning.py python code: ''' Created on 04-august-2013 @author: satheesh mail - satheesrev@gmail.com ''' import sys import nuke def autoPinning():     selNode = None     try:       selNode = nuke.selectedNode()     except ValueError:  # no node selected       pass     if selNode is not None:     ## auto pin for from         selNode['from1'].setExpression('[value name].bbox.x', 0)         selNode['from1'].setExpression('[value name].bbox.y', 1)         selNode['from1'].clearAnim...

Auto pivot

Image
autoPivot.py Transforming, rotating, skewing and scaling all are happening based on the pivot point in every image editing software. So placing the pivot point in right place will handy to do above things. In nuke... transform node's pivot point set to centre based on the project format by default. If our image is in a part of the format. While doing translate, rotate and scaling this causing some problem. To do uniform scale or rotate we will move the pivot to image centre or image bottom centre by holding " ctrl+mouse click ". But we cant place it exactly in the middle or bottom middle. How to reduce this manual job ? Auto pivot.py will help you to place the pivot to centre of the image or bottom centre of the image by using short-cut keys. Pivot centre after run the script: Pivot bottom centre after run the script: Auto pivot needs "bbox" to perform this action. So keep your bbox set to the image size. This little python script sa...