Thread: createNode then deleteNode

Reply to Thread
Results 1 to 1 of 1
  1. #1 createNode then deleteNode 
    Join Date
    May 2010
    Posts
    2
    so below is my script. It works but only by assuming that the ReadGeo created by the script is named "ReadGeo1". Most of the time that works fine but you can see where it has a potential for undesired results. What I want it to do is create it, get the info it needs from it, then delete it; or maybe it doesn't need to create it at all and there is a way to just get the info I need.
    Any thoughts?

    FYI: This is a small part of a much bigger script so if it seems pointless, that's why

    Code:
    def warningPrompt():
        p = nuke.Panel("Warning")
        p.addMultilineTextInput('warning', "This can take several minutes. It is strongly recomended that you start from an empty nuke scrpit.")
        p.addButton("Cancel") 
        p.addButton("Continue")
        if p.show():
            print 'ok'
    
            MyFBX = nuke.getFilename( 'select your FBX' , '*.fbx' )
            
    
    ######## The problem Starts Here ########
    
            nuke.createNode('ReadGeo2', 'file %s' % MyFBX)
    
            getRange = (nuke.toNode('ReadGeo1').knob('fbx_node_name').numValues()+1)
            nukescripts.node_delete()
            print getRange
    
    warningPrompt()
    Last edited by jlacross; June 11th, 2011 at 02:45 PM.
    Reply With Quote  

Thread Information
Users Browsing this Thread

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

     
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