Posts

Showing posts from June, 2012

Import fbx camera

Image
importFbxCamera.py
Import fbx camera script will add a camera node and import the camera data from the fbx file based on selected "ReadGeo" node.
Usually we import our objects into nuke as a .fbx file. After importing the .fbx file will do the same thing for import the camera from the same file.  To do that go to toolbar-->3D-->Camera... check the "read from the file" and then import the .fbx file by clicking file browser.
To get reduce the above timing. I created this small "importFbxCamera" python script. 
Import your object files by "ReadGeo" node in nuke. Select the "ReadGeo" node and run this script.


It will automatically create a "camera" node and import the camera data from the .fbx file and create a backdrop with shot name.


If you have not selected any nodes this script will show a message...    "select ReadGeo node to import camera"



Result:

Your camera will imported into nuke with name.

Download: ht…

python scripts for daily work on nuke

Image
I'm updating regularly this post with "Tiny, Tiny " python scripts for daily uses in nuke.
1. For define roto nodes output.
Usually  we set the roto node output to "alpha" and premultiply to "rgb" for getting the premultiplied output. like below image:


rotoOut python script:
This script will do this work by a single mouse click are a short-cut key.

import nuke def rotoOut():     for s in nuke.selectedNodes():         s['output'].setValue('alpha')         s['premultiply'].setValue('rgb')
save this as rotoOut.py file into your custom python or gizmo DIR.
This script works only selected roto nodes. If you want to make it work with all roto nodes in inside nuke means, youe need to change the 3rd line like this...
import nuke def rotoOut():     for s in nuke.allNodes('Roto'):         s['output'].setValue('alpha')         s['premultiply'].setValue('rgb')
2. Shuffle the image based matt…

change Roto Views to left and right

Image
RotoViewsPanel.py
This little python script will help you lot when working with stereoscopic conversion. While Import roto nodes from silhouette, mocha and other software’s, Imported roto nodes are output the channels only on "Left" view.

Like below image.

 We have to change the roto shapes view on both "left & right" for stereo conversion. To do that, manually select all rotoshapes and set the view on "left - right". This may take lot of time to do this on bigger shots. So how to reduce this manual work. Here is the solution for that.

RotoViewsPanel.py.
This script will pop-up a window for setting the selected or all roto nodes views to left are right only are Both. Run this script on nukes script editor and enjoy.


result:
Hope this script will help you friends.


RotoViewsPanel script:

class RotoViewsPanel(nukescripts.PythonPanel):
    def __init__(self):
        import nuke.rotopaint
        super(RotoViewsPanel,self).__init__('Change views on …