Posts

Showing posts with the label nuke python tips

connectCamera script for nuke

Image
connectCamera python script for nuke connectCamera script helps users to connect with any camera from anywhere in their nuke script. When you run this script it will find all the Camera's from the script, pops a window to choose the desired "Camera" from the list. When you hit connect this script it will create a "Dot" node and connect with the selected camera. Also, add the selected camera name to the Dot. Example video: Download the script: https://github.com/satheeshvfx/Nuke_python_codes/blob/master/connectCamera.py Raw code: ### connect camera v1.0 ### connects user selected camera using a Dot node anywhere from the script ### for bugs and reports satheesrev@gmail.com ### thanks to Wouter Gilsing for helping out to make this happen import nuke def connectCamera(): ###getting list of camera's available in the script cameraNames = ' '.join([n.name() for n in nuke.allNodes('Camera2')]) if ...

lockNode for nuke

Image
lockNode.py Locking the nodes knobs (sliders) inside nuke very long waited future. It is requested many time with foundry but i don't think they going to add this unique future. So i have decided to create a python code for this function. Her is the solution. This code allow user to lock the nodes knob. Once you lock the knobs, then you cant modify any sliders until you un-lock the knobs. This will save you from any accident changes. Hope this will help you guys. Latest version support to write the info to your nuke script. So it will always locked if you close your nuke script and re-open it. I have used some cheat method to keep the node locked while user save their nuke script. I have tested many times and haven't faced any issues. Let me know if you faced any issues. steps: right mouse click on node property panel. You will get options 'lock_knobs' and 'unlock_knobs'. Select 'lock_knobs'. This code will lock will the knobs and...

shuffleAlpha.py

Image
shuffleAlpha Usually we use shuffle node to extract matte's from ID pass. For to do this we add a shuffle node and select the channel which need to be alpha channel.   This script will simplify this work, Its pop-up a panel (window)  called "selectChannel to shuffle" and you should choose your channel and click ok. This script will automatically done the above job. shuffleAlpha script also label the node like (red-->Alpha).  Added extra future called "to All channel". By default "to All channel" is unchecked, If you select your channel and hit ok it will give you below result. (This script keep other channels black rather then "alpha" channel) I used to work like this, Because off work-flow optimisation. For more information about nuke work-flow optimisation tips.... nuke-workflow-optimisation-tips With "to All channel" checked result: Also shuffleAlpha.py will label the shuffle node according to your select...