Posts

Showing posts from 2014

rippleEditOnOff

rippleEditOnOff.py
Hi nukers i have created this little code for my friend request. I'm decided to share this code with you. Hope this will help you friends.

This code toggle on - off ripple edit mode in nuke. Select your roto shape and run the hot-key. This will really help full while edit rotoshape inside nuke. Here im using alt+q as keyboard shortcut. But you can use your combination of key's.

rippleEditOnOff.py work with nukes roto and rotopaint node. Tested several time and working fine. If you have any bugs or reports mail to satheesrev@gmail.com



Original Code:

### created by satheesh-r, Oct 2014.
### To toggle on & off nuke roto, rotopaint nodes ripple edit function.
### for bugs & reports: satheesrev@gmail.com

import nuke

def rippleEditOnOff():
    selNode = None
    try:
      selNode = nuke.selectedNode()
    except ValueError:  # no node selected
      pass
    getValue = selNode['toolbar_ripple'].value()
    if getValue == False:
        selNode['toolbar_…

extract selected roto shapes

Image
extractSelectedShapes.py
This script extract selected roto shapes from selected roto, rotopaint node in nuke. Usually we use to do, copy the desired roto shapes and then create a new roto node and paste the shapes. If roto node contain baked tracker info, then we copy paste the entire roto node and then delete unwanted shape's from pasted roto node.

I have created extractSelectedShapes script to make this process automatically. Tested several times and working with nuke 6, 7, 8 versions. This code also work with roto shapes imported from silhouette and mocha.

How to use:

Select the roto shapes need to extract make sure your roto node selected.


Run the script. This script will prompt you to choose the output method. User can extract the selected shapes into one roto node or each shape into separate node.



If user choose single this code copy paste selected shapes into single roto node.


Master roto node remain same.



If user choose each, this code create multiple roto node and copy p…

Inbetweener for silhouette

Image
Inbetweener

Silhouette don't have the very use-full keyboard short-cut for jump half-way between frames like other software's have (nuke). In nuke you can jump half way through between key frames and frames by hitting 'alt+arrow' keys. But this future is missing inside silhouette.

One of my friend requested me to write script for jumping half way through between frames inside silhouette. Also he mentioned this will going to be more use-full for roto artists. So I have created this scripts months ago and like to share with public. Hoping this will help you friends.

This is what this script will do....


Keyboard short-cuts:

alt+x for forward.
alt+z for backward.


Tested several months. Working fine with Silhouette v5 plus, v4 plus not tested in previous versions.

For bugs and reports - satheesrev@gmail.com.

download scripts:

inbetweener


Installation:
download the scripts and Copy paste it into....

Linux:  /opt/SilhouetteFX/silhouette v5.1/resources/scripts/
you have to chan…

extractAlpha.py

Image
extractAlpha.py
Usually we use "Shuffle" node to extract alpha from ID mattes. Some of us use "Expression" node to do the same thing. Some time we need to use basic maths function in "Expression" node to get exact matte. This code create 'Expression' node and feed the value from the window. It also clamp the value. So no need to worry about the clamp issue.

Example maths function: r, (r+b)-g, (r+g+b), (r-g)

This code will pop-up small window like below image.,



User can select maths function from the list of drop-down menu. Most of the maths function's are pre-defined and stored on the UserChoice menu. This code allow user to feed their custom maths function. If user feed anything on custom math field this code will take the code and feed the info into the expression node.

Below video will explain how the function works:




Hope this will help you friends.,

Download:  https://drive.google.com/file/d/0BzfeLEFhrh44WFRjU1lYLU1fODQ/edit?usp=sharing

n…

connectMultipleMask

Image
connectMultipleMask.py
Nuke having its won short key for connecting selected multiple nodes input into one target node. It is underedit menu. Goto edit --> node --> splay first will do the job. There are three more combination of shot keys with 'U'. Check with each one and enjoy. Thanks to Frank Rueter to give the information.

Even-though nuke don't have short-cut key for connect multiple selected nodes 'Mask' input to target node.

Tried with 'splayLast to A' 'splayFirst to A', But it connect single input nodes mask input to target node and fails with 2 or more inputs node.

check ref image:


Because splay short-cuts are working based on input order. Its not considering optional inputs. If input 0 is none it will connect 0 to target and so one so forth with other inputs :). Hmmmmm  good ya..

Yup then how to connect all selected nodes 'mask' input to target node with single click ?

Here is the script for connect multiple nodes mask input…

multiMatte

Image
multiMatte v1.0
Today i searched my old hard drive and found some of my old tool's created for EYEON FUSION. Start to recreate those tools for nuke. multiMatte is my first tool.

Searched with google and found some multiMatte gizmo for nuke. Tryed everything But those tools are not working perfectly. So i decided to recreate the tool myself. Here is the multiMatte v1.0.


This gizmo allowing you to create matte from 9 channels. r,g,b,a,c,m,y, luma and black.

matteColor drop down menu allowing you choose the channels. Matte erode fine will expand and shrink the output matte (used some cool tech for erode the matte)

un-check bbox when input don't have bounding box. Otherwise matte erode will introduce bounding box and expand it. 

Expanding mask control tab allow user to invert the mask channel and blur the mask input.


By-default this gizmo output only converted alpha channel and remove other channels for efficiency. User can change the output method to "alpha to rgba".

Export Maya camera and Objects to Nuke

Image
Export Maya camera and Objects to Nuke
Exporting Maya Camera and Objects to Nuke is really night-mare. Using .fbx file format will fail most of the time. Scene not align perfectly, meshes not displaying properly, Camera missing the key-frames, etc. Reason for this is both the software's handling Cameras in different manner.

There are several scripts available for exchanging data's between mayaToNuke. Each one having their plus and minuses. I found a clever python script to do the data exchange successfully. I done some custom with the original script and used it several time with out any failure.


I created a new maya scene for tutorial purpose with animated camera and couple of objects.

Maya to nuke traditional export method:

Step-1: Selected all the objects and Camera.
Step-2: Go to  file---> Export Selection....



step-3: Go to Edit Presets and Change fbx format to fbx2010.


step-4: Export Selection and save it as a .fbx file.

step-5: Added ReadGeo node and import the save…