So I worked out a solution to find a read node in the group, extract it and paste it outside the group and with still connected to original connection
4 Comments
This script will read all the nodes to list that are inside the group "grp". Run this code given below, this will create scene node, scanline Render node, camera node and a constant node connect them together and connect the final output from the scanline Render, node to default viewer. You can add the below function to the init.py file or create a your own py file into which you place this code and then you import that file into init.py so as it can be called when a menu button is clicked from the interface. 1: def setupThreedNodes(): 2: mainCam = nuke.nodes.Camera(name="mainCamera",xpos=100,ypos=20) 3: scnlnRndr = nuke.nodes.ScanlineRender(name="ScanLineRender",xpos=250,ypos=35) 4: scNode = nuke.nodes.Scene(name = 'Scene',xpos=250,ypos=-100) 5: constNode = nuke.nodes.Constant(name="Temp_Constant",xpos=400,ypos = 10) 6: scnlnRndr.setInput(2, mainCam) 7: scnlnRndr.setInput(1,scNode) 8: scnlnRndr.setInput(0, constNode) 9: defViewer = nuke.toNode("Viewer1") 10: defViewer.setInput(0,scnlnRndr) Add it as nuke button by adding the code below to the init.py file located in the .nuke directory. menu = nuke.menu('Nodes') menu.addCommand('3D/Setup 3D Nodes', 'setupThreedNodes()', 'alt + t') Fairly simple way to view an image sequence in Nuke, just execute the following line in command line: >Nuke6.1.exe -v "c:\\test_render_starfield\\starfield_v003_###.jpg" 1 90 This will launch Nuke with just its viewer i.e without node view or properties panel, and you can play the nuke sequence A 3d Artist might use fcheck that comes with maya, this is the same thing though some extra features.
Yesterday , I came up with method for assigning a list of items as value for a dictionary keys, so that every key has its own unique list. And all this is generated on the fly when nuke is run in terminal mode. 1: nuke.scriptOpen(target_file) 2: allWriteNodes=nuke.allNodes("Write") 3: writeNodes=[] 4: wnodeData={} 5: attributes=[] 6: for index,each in enumerate(allWriteNodes): 7: writeNodes.insert(index,each.name()) 8: for wNode in writeNodes: 9: for eachAttrib in ['first','last','file','file_type','channels','use_limit']: 10: wnodeData.setdefault(wNode,[]).append(nuke.toNode(wNode)[eachAttrib].value()) |
Custom Search
Other Blogs & PagesGit Commands Animation & VFX SitesA MUST READ for Ani/VFX Artistsawakened by thoughts,
|