Thread: copy paste nodes within group node

Reply to Thread
Results 1 to 2 of 2
  1. #1 copy paste nodes within group node 
    Join Date
    Jan 2008
    Posts
    41
    import nuke
    import re


    shapesPath = nuke.getFilename("Choose Silhouette Shapes...", "*.nk", "", "", "", multiple = True)


    for i in shapesPath:
    currNode = nuke.nodePaste(i)
    currNode.knob('selected').setValue(True)
    each = nuke.expandSelectedGroup()
    for nn in each:
    if not (re.search("Output",nn.name()) or re.search("over",nn.name())):
    if (nn.Class() == "Group"):
    aa = nuke.toNode(nn.name())
    aa.knob('selected').setValue(True)
    eack = nuke.expandSelectedGroup()

    result is gotten for each shapesPath, however for groups within expandedgroup i.e.
    for nn in each : , how may i possibly get to select a group, expand it, and subsequently copy nodes within that group.




    Brgds,


    Nish
    Last edited by knish; August 11th, 2012 at 08:10 AM. Reason: clarity
    Reply With Quote  

  2. #2  
    Join Date
    Jan 2011
    Posts
    16
    I am not really sure that I am getting your question but I think that the begin() and end() functions could help you.
    They tell nuke that the code in between them is related to a group.

    Code:
    g = nuke.toNode('myGroup')
    g.begin()
    print 'inside:', nuke.allNodes()
    g.end()
    Luca Fiorentini - 3D Lighting Artist

    My Showreel - http://www.vimeo.com/lucafiorentini/reel2010
    My Blog - http://lucafiorentini.wordpress.com
    My Flickr - http://www.flickr.com/photos/lucafiorentini
    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. copy - paste
    By sathees in forum NUKE from The Foundry
    Replies: 6
    Last Post: November 21st, 2010, 02:55 AM
  2. copy/paste bug...
    By notthere in forum NUKE from The Foundry
    Replies: 7
    Last Post: July 8th, 2009, 07:33 PM
  3. copy & paste nodes error
    By theta in forum NUKE from The Foundry
    Replies: 2
    Last Post: September 30th, 2008, 03:44 PM
  4. Copy & Paste broken in v5
    By Splin in forum NUKE from The Foundry
    Replies: 16
    Last Post: June 6th, 2008, 09:43 PM
  5. Copy, Paste Keyframes
    By russ_c in forum Apple Shake
    Replies: 19
    Last Post: March 15th, 2004, 05:13 PM
Tags for this Thread

View Tag Cloud

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