Thread: print selected nodes name to write node

Reply to Thread
Results 1 to 2 of 2
  1. #1 print selected nodes name to write node 
    Join Date
    Aug 2006
    Location
    India
    Posts
    246
    [python {nuke.script_directory()}]/snapShots/[string trim [file tail [value root.name]] .nk]

    This will give the current script path to my write node. I want add my selected nodes name end of the above's result. How to achieve this.
    Failure is not an option.. But failure has to be an option...
    ____________________
    My Nuke Tutorial page
    Reply With Quote  

  2. #2  
    Join Date
    Aug 2006
    Location
    India
    Posts
    246
    Here is the code. some one make it work.

    a = nuke.selectedNode()
    name = a.name()
    print name

    def snapShot ():
    w = nuke.createNode("Write")
    w.setName("tempWrite")
    w['file'].setValue("[python {nuke.script_directory()}]/snapShots/[string trim [file tail [value root.name]] .nk]+[name]_%04d.jpg")
    w['_jpeg_quality'].setValue(1)
    w['_jpeg_sub_sampling'].setValue(2)
    snapShot()
    Failure is not an option.. But failure has to be an option...
    ____________________
    My Nuke Tutorial page
    Reply With Quote  

Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

     

Similar Threads

  1. version number of script in write node and text node?
    By julesvm in forum NUKE from The Foundry
    Replies: 1
    Last Post: February 25th, 2012, 12:56 PM
  2. print into node's label using python ?
    By metaclay in forum NUKE from The Foundry
    Replies: 3
    Last Post: March 26th, 2011, 02:16 PM
  3. oncreate() to call last selected node.
    By metaclay in forum NUKE from The Foundry
    Replies: 0
    Last Post: February 7th, 2011, 08:49 AM
  4. selected node loads in property panel?
    By julesvm in forum NUKE from The Foundry
    Replies: 6
    Last Post: April 9th, 2010, 10:34 AM
  5. selected node - small problem
    By Stringkeeper in forum NUKE from The Foundry
    Replies: 1
    Last Post: February 2nd, 2008, 07:39 AM
Bookmarks
Bookmarks
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts