oncreate() to call last selected node.

Hi , i got a little problem : i select a node and then add my gizmo (so this node’s output will pipe into my gizmo’s input), i want to check that last selected node is. so i add script to my gizmo, i use addoncreate or addonusercreate function, but both grab the wrong nodes :

Code:

def cframerange_oncreate():
        nuke.message(nuke.selectedNode().name())
       
nuke.addOnCreate(cframerange_oncreate,nodeClass='cframerange')


my gizmo is working fine, but the nuke.message() show the wrong node. It’s not the node i selected , but instead it reports node which inside my gizmo.

Does anyone have solution ?

thanx

wanna share my knowledge with you

Hi, this thread is for guys who wanna share some cool techniques that are found of with the world. 🙂

I am very new to nuke and am begining to understand it more and more now.. I have learned couple of cool tricks that i wanna share.

1. Overlapping masks, color correction problem and fixing it.
If you have two masks that are overlapping and you get some strange results where they overlap than what you can do is connect those two beziers with merge node operation multiply – what that does is nearly connects both of them together and making whenever they overlap the one not to be shown.

Drop an a merge node, connect the A pipe to the bezier that should not be shown and connect the b pipe to the other bezier which will controll where the mask will be shown.. (set the operation to multipluy on the merge node.
Now whenever the bezier connected to the A pipe will be shown only where is overlapping with the other bezier that we connected to the B pipe
(if you need more explenation i will post some screenshots.)

2. Pulling the reflections on top of your elements.
Lets say you are working something on a eye and now all your added elements are covering the reflections of the eye which are big factor in the realism at the end..

What we can do is mask the eye where it have reflections, add a grade node and pull everything black in.. you may wanna play with the black point and white point of the grade node(you can as well add a colorcorrection) and pull everything in leaving the reflections only. Now put a merge node with operation (plus) over your elements connected with the grade… that will put the reflections on top of the elements however it will be too bright, now to fix that we can do the very same thing just reversing the operation.. add another merge (over) under the (plus) now add another merge (minus)connected with the grade and connect it with the merge over(over). be careful you need the A pipe from the merge (minus) connected to the original footage and the b pipe connected to the grade.. and now connect the merge (over with the minus pipe)
Done..
It;s pretty much complicated if you need more explenation tell me so i will post some screen shoots.

3. Color correcting with primatte if you need to preserve some colors.
So lets say you wanna keep the reds in the footage but wanna color correct everything else..
Ok select your footage drop in a primatte (make sure is connected to the fore ground) and with opperation set to Select BG color .. click the color pick up and select the color that you wanna preserve. now deselect everything and put in a color correct node.. connect it directly to the footage and now pull the mask node from the color correct node and connect it to directly to the footage… and look in the viewer trough the color correct.. and its done.. now you can color correct everything while preserving the color you masked out.

i need to go now, however i will post some more late.. and i ask you to do the same.

thanks

edit: i have posted in the wrong forum i think.. please move this thread to NUKE from The Foundry … sorry

deinterlace problem

hi i am a beginner of nuke & i have a problem, i am not able to deinterlace a footage in nuke.

Does any1 knows here how to deinterlace the footage in nuke?

thanks in advance….:)

massive + nuke

has anyone tried loading Massive agent positions into nukes 3d space ?

pointcloud based on luminance

is there a way to create a pointcloud histogramm based on luminance like the did in the district9 vid…? they used a custom tool for but maybe there is also a native way..?

here at 4.30 min
http://www.youtube.com/watch?v=upG81s75UD4

Card3D and Project3D not working together

Hi
I’m making some projections, but not being able to use the Card3D node with the Project3D shader – the projection doesn’t work.

Using the exactly same projection with the ScanlineRender works perfectly, but the Card3D is much faster and will save me a lot of render time.

Any tip to make this work?

Is it possible to project textures through the camera without the Project3D shader?

thks
– Raf

NukeTutorials

Add python scripts to the menubar

Hey guys,

I’m trying to add python scripts to the menubar but I’m getting a "userscripts not defined" type of message when I try to run them. Everything else (gizmos and tcl scripts) works fine.

Here is what I added to my init.py file.

Code:

# add path for user custom files
nuke.pluginAddPath("/Volumes/Macintosh HD/Users/tnt2000/Documents/Nuke6.2v2/")

# add path for user installed .gizmo files
nuke.pluginAddPath("/Volumes/Macintosh HD/Users/tnt2000/Documents/Nuke6.2v2/gizmos")

# add path for user installed .tcl files
nuke.pluginAddPath("/Volumes/Macintosh HD/Users/tnt2000/Documents/Nuke6.2v2/tcl")

# add path for user installed icons
nuke.pluginAddPath("/Volumes/Macintosh HD/Users/tnt2000/Documents/Nuke6.2v2/icons")

# add path for user installed python scripts
sys.path.append("/Volumes/Macintosh HD/Users/tnt2000/Documents/Nuke6.2v2/python")


Here is an example of a python scrip I’m trying to add on my menu.py

Code:

# Add Custom menu for scripts
menubar=nuke.menu("Nodes")
m=menubar.addMenu("&Custom/Scripts")

# Add Python scripts to the custom menu
m.addCommand("Toggle PostageStamp on Read", "userscripts.togglePostageStampOnRead()", icon="PostageStamp.png")


Inside …Documents/Nuke6.2v2/python folder I have a __init.py__ file and a subfolder called "userscripts" which is where I keep all python scripts.

Here is an example for the __init.py__ file

Code:

from togglePostageStampOnRead import *


Do u guys have any idea of what I’m doing wrong? I never added python scripts before… not sure if this is the correct procedure.

Cheers

.psd to nuke

sorry if this is a repost, but i couldn’t find anything similar in the threads.

i’ve watched a few tutorials about bring in multilayer photoshop files into nuke. but when i tried it i didn’t quite go according to plan.

i read in the multilayer psd. lets say the example file im using has 4 layers which i name , sky, fg, bg, and middle. at 16bit. when i read in the .psd file into nuke. either using the shuffle or viewer option tabs to see if i can see my layers is how they described it on the tutorials. however i dont get anything like that. even the file describer, the thing which details all the layers available within the viewer just say rgb. its like its flattened my .psd and ignored everything.

i shuffle and try to find anything resembling the layer names i’ve givin my psd. sometime it’ll pop up and when i select it the whole image just goes black?

is this is bug. or am i misunderstanding how to bring in .psd?

cheers
jamie 🙁

Question about lighting !

How I can creating lights interact with my footage ?

Example, one guy hold something in your hands and this is a source of light, how I can project the lights on his body ?

At 1m 12s can explain better what I talk about.
http://www.youtube.com/watch?v=IKChEPCsR10

Thank you.