Saturday, September 28, 2013

superCrop

sCrop.py

Nuke's crop node missing the future of select a region and crop. So i found little cheat way to achieve this.  This little script get the value from ROI and set the value to selected crop node.

Step - 1:
Add  a crop node.

Step - 2:
Enable ROI draw mode by " alt+w "

Step - 3:
Choose your region using mouse drag on Viewer. Disable the ROI by " shift+w "
( currently 'roi' enable or disable is not accessible via python, So we have to disable it by manually )


Step - 4:
Run this code.


Video example:
 


Hope this will help you friends...


python code:


import os, math, nuke

def sCrop():
    sel = None
    try:
      sel = nuke.selectedNode()
    except ValueError:  # no node selected
      pass

    if sel is not None:
        ### getting value from ROI
        roiXY = nuke.activeViewer().node().roi()
        crpX = roiXY['x']
        crpY = roiXY['y']
        crpT = roiXY['t']
        crpR = roiXY['r']
        ### assigning value to Crop
        sel['box'].setValue(crpX, 0)
        sel['box'].setValue(crpT, 1)
        sel['box'].setValue(crpR, 2)
        sel['box'].setValue(crpY, 3)
    else:
      nuke.message('No Crop selected')
sCrop()

Sunday, September 15, 2013

nuke particle templates

Nuke particle Templates

Hi nuker's this page dedicated for nuke particle templates. I will keep update this page with different nuke particle template's. Enjoy.... 

1. sparks ( welding sparks)


This is simple sparks, you can manipulate as per your need.

Download:
sparks_v01.nk

Monday, September 9, 2013

Nuke 7.0 roto shapes to Nuke 6.0 - 6.3

Nuke 7.0 roto shapes to Nuke 6.0 - 6.3

Hi friends today i faced a problem with nuke roto shapes because of version-up. I done roto with nuke 7.0 and my friend need it for nuke 6.3. I just rendered as image sequence and send it to him. Everything is fine.  But the edit has changed later and frames extended at beginning of the shot.

So i searched with google and found a solution. Thank you foundry!!! always artist friendly..

They already have solution for this. They documented this with release notes. You can find this nuke 7.0v1 release notes page no 8.

If you want Nuke 7 scripts to load in Nuke 6, use the convertToNuke6 or
convertDirectoryToNuke6 Python functions when running Nuke 7 in
terminal only mode.
Here is the step to convert nuke7 rotoshape to nuke 6 rotoshape.

Save your roto-shapes into new nuke file and save it into separate folder.

step 01.

open terminal and redirect to nuke7 installed DIR.

step 02.

Run nuke terminal mode.
for windows: Nuke7.0 -t
for Linux: ./Nuke7.0 -t
for OSX: ./Nuke7.0 -t    ( if this wrong let me know )

step 03.
enter below line and hit enter

import nuke.rotopaint

step 04.

enter below code with your nuke7 roto-shape file name and destination file name.
nuke.rotopaint.convertToNuke6 ("Nuke 7 rotofile", "destination file")

Example:

nuke.rotopaint.convertToNuke6("/home/satheesh/Desktop/rotoConvert/Test_nuke7_roto_v01.nk", "/home/satheesh/Desktop/rotoConvert/Test_nuke6_roto.nk")

For Nuke 8.0 above users:

Open the script which contain roto shapes in nuke 7.0v01(above) and save it as nuke script. Ignore all the warnings raised by nuke 7+. Now follow above steps.
( Nuke 7 doesn’t support open spline. So to avoid any error make sure your script don’t have open spline )

Now you can open the rotoshapes into nuke 6.0 - 6.3. While you import this into nuke first time. 

Nuke will through some error like below image




Just ignore this error and enjoy....  Hope this will help you friends.



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