Wednesday, February 26, 2014

connectMultipleMask

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 to target node. This script will connect selected nodes mask input to target node. It will do nothing if no mask input nodes.

check ref image:


connect multiple nodes masks input to target node. Make sure your selecting the target node at last. Select the nodes need to connect and then shit+select the target node. If select with mouse drag function make sure to select the target node at last. Then hit the short-cut key. Bang!!!!  all your nodes mask input connected with target node.

Hope this will help you friends.,

Download:

connectMultipleMask.py


Raw Code:


'''
@author: satheesh-R
for bugs and reports,,  mail - satheesrev@gmail.com
'''

### connect multiple nodes masks input to target node. Make sure your selecting the target node at last.
### Select the nodes need to connect and then shit+select the target node. If select with mouse drag function make sure to select the target node at last.
### Then hit the short-cut key. Bang!!!!  all your nodes mask input connected with target node.

import nuke

def connectMultipleMask():
    try:
        selNode = nuke.selectedNode()
    except ValueError: # no node selected
        pass
    selCheck = selNode.optionalInput()
    if selCheck > 0:
        for node in nuke.selectedNodes():
            min_inputs = node.minInputs()
            if min_inputs > 2:
                node.setInput(2, selNode)
            if min_inputs == 2:
                node.setInput(1, selNode)
            if min_inputs == 1:
                pass
    if selCheck == 0:
        for node in nuke.selectedNodes():
            min_inputs = node.minInputs()
            if min_inputs > 2:
                node.setInput(2, selNode)
            if min_inputs == 2:
                node.setInput(1, selNode)
            if min_inputs == 1:
                pass







Sunday, February 16, 2014

multiMatte

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".

Values are clamped So no worries about negative values Which i found other tools.

Tested with 6.3, 7.0 and 8.0.

Example:


Hope this will help you friends..,


Download:
multiMatte_v1.0

sample nuke script:
multiMatte sample script




scale up and down cornerpin node

global scale up and down cornerpin This script help you to global scale up or down the selected cornerpin. Recently i had situation to ...