Got a MacBook Pro 13

I lately got interested in iOS app development. So got this macbook.

You can checkout the detailed review here.

Basic Nuke Scripts

# To get the name of  single selected Node:

nuke.selectedNode().name()

# To get the name of all selected Nodes:

for i in nuke.selectedNodes():
    print i.name()

# To get the particular type of nodes:

for n in nuke.allNodes('Blur'):
    print n.name()

# To get the dependent input node:

myNode = nuke.toNode('Blur1')
for k in nuke.dependentNodes(nuke.INPUTS,myNode):
    print k.name()

# To get nodes from the Group node:

myGroup = nuke.toNode('Group1')
for l in nuke.allNodes('Blur',group =myGroup):
    print l.name()
myGroup = nuke.toNode('Group1')
for j in myGroup.selectedNodes():
    print j.name()</span>

# To set auto label for creating nodes:

def showFocal():
    n = nuke.thisNode()
    label = '%s\nfocal %s' %(n.name(),n['focal'].value())
    return label
nuke.addAutolabel(showFocal,nodeClass = 'Camera2')

# To set autolabel  for the particular node

nuke.toNode('Camera1')['autolabel'].setValue('showFocal()')

# To set autolabel for the selected nodes

nuke.selectedNode()['autolabel'].setValue('showFocal()')

# To set position for creating nodes:

nuke.nodes.NoOp(xPos=100,Ypos=100,label="100/100")
marker = nuke.nodes.Dot()
marker.setXYpos(0)

# To zoom the workflow nodes:

nuke.zoom(0) #to fit in thenode graph

nuke.zoom(3,node.Xpos,nodeYpos)

# Create Message Dialog box:

nuke.message('Hello World")

# To show the Channel box of the Node:

def showChannels():
    return '\n'.join(nuke.thisNode().channels())
nuke.display('showChannels()',nuke.selectedNode(),'Node Channel')

# To Change the label of selected Nodes

txt = nuke.getInput('change Label','new label')
if not txt == None:
    for n in nuke.selectedNodes():
        n.knob('label').setValue(txt)

# To Change the tile_color of selected Nodes

col = nuke.getColor()
glcol = nuke.getColor()
if not col == 'None':
    for n in nuke.selectedNodes():
        n.knob('tile_color').setValue(col)

# To get the details from notepad to Sticky note Node

dir = 'D:/...' # Location of the file Directory
filePath = nuke.getFilename('Get Details','*.txt *.xml',dir)
if not filePath == None:
    file = open(filePath,'r')
    content = file.read()
    file.close()
htmlstr = '&lt;img src = "D:/..."&gt;' # Location of the image Directory
nuke.nodes.StickyNote(label =htmlstr + '\n' + content , note_font_size=20)

Some Fabulous Quotes to Be Happy…

“Being happy doesn’t mean that everything is perfect. It means that you’ve decided to look beyond the imperfections.”

“We come to love not by finding a perfect person, but by learning to see an imperfect person perfectly”

“Happiness is the meaning and the purpose of life, the whole aim and end of human existence”

“Be happy. It’s one way of being wise.”

“Love is when the other person’s happiness is more important than your own.”

“Tears are words when the heart can’t express”

“Sit down and put down everything that comes into your head and then you’re a writer. But an author is one who can judge his own stuff’s worth, without pity, and destroy most of it.”

“I have the simplest tastes. I am always satisfied with the best.”

“Be yourself; everyone else is already taken.”

“Our deepest fear is not that we are inadequate. Our deepest fear is that we are powerful beyond measure. It is our light, not our darkness, that frightens us most. We ask ourselves, ‘Who am I to be brilliant, gorgeous, talented, and famous?’ Actually, who are you not to be? You are a child of God. Your playing small does not serve the world. There is nothing enlightened about shrinking so that people won’t feel insecure around you. We were born to make manifest the glory of God that is within us. It’s not just in some of us; it’s in all of us. And when we let our own light shine, we unconsciously give other people permission to do the same. As we are liberated from our own fear, our presence automatically liberates others.”  – Nelson Mandela

“If you want happiness for an hour — take a nap.
If you want happiness for a day — go fishing.
If you want happiness for a month — get married.
If you want happiness for a year — inherit a fortune.
If you want happiness for a lifetime — help someone else.

Another Command to get filename in the Nuke Read Node

The main advantage of this command is that ,we can connect any input Read node [Example. Read1 or Read3 or Read4.,].it will give correct filename from the Read node.No need to specify the name of the Read Node.

[file tail [file rootname [metadata input/filename]]]

Here,
Metadata is a set of information about an image embedded in the image file.This may include the image’s original bit depth,width and height etc.,

How to get Filename without Directory path & extension from Read Node in Nuke?

Wanna Test!

Step1 : Pick the Text Node from the Draw Menu.

Step2 : Connect image Read Node into Text Node.

Step3 : Type the following Command on Message Field at Text Node.
[file tail [file rootname [value  readNodeName.file] ] ]

Here,
We should specify the name of the Read Node.

file tail – For Remove Directory Path.

file rootname – For Remove Extension.

Example : [file tail [file rootname [value Read1.file] ] ]

7 ways to figure out your passions

1. Maximize your health. Eat well. Get some exercise. Get away from any and all situations that are emotionally holding you back. Get plenty of sleep. Without these pieces in place, it will be hard for you to open up to new opportunities and directions.

2. Ask lots of questions. If you come across something of interest to you, ask. Follow up with more questions until you’re satisfied – at least for the moment. Research interesting topics online. Do things like a “Wikipedia stumble” – start at a general topic you’re thinking about, then click on whatever article in Wikipedia that’s most interesting to you – and keep reading and following links.

3. Ignore what’s “cool.” Remember the idea that you should stop trying to impress other people? It comes through big time here. If you enjoy it, it doesn’t matter what others think. Don’t be afraid to dive into something that seems exciting to you over a fear that others might find it “dorky.” Their label says more about them than it does about the activity.

4. Dabble in everything. If something seems interesting, try it. You might not find it enjoyable or you might find it fascinating. It’s often hard to tell the difference until you dive in. For example, having a garden might seem interesting, but until you try it, it’s hard to tell whether it’s just conceptually interesting to you (but not necessarily in practice) or something that you truly enjoy.

5. When something piques your interest, dig in. You try it. You like it. So try it again. And again. There are many things that seem quite fun on the first shot, but grow boring quickly as you hit “the dip” (where the newness wears off but you’re not very good at it). If you’re passionate about something, you won’t mind that dip.

6. Associate with others that share this growing passion of yours. Look for events in your area where people might be involved with this interest. Look for groups online where people are talking about this activity. Join in, share your thoughts, and ask questions. Nothing’s better for fostering a growing interest than a group of like-minded people.

7. If it dries up, don’t push it. True passions are sustaining – you’ll keep coming back to them because you want to. If you no longer want to engage in it, don’t make yourself. Just back away and find another path. You may find yourself returning in the future, or you may find yourself on a completely different path.

You’ll know your passion when you find it. It’ll ring inside of you like a hammer hitting a church bell. It’ll consume your thoughts and your activities, even if you’re not very good at it yet. You’ll get up each morning excited to do more.