nuke.allNodes('Write') will only return nodes of the Write Class, so just "Write" nodes. Many other nodes (classes) can be executed, like GenerateLUT, CurveTool, WriteGeo, DeepWrite, etc.
I think it's a safe bet to check for the existence of knob named "before render", otherwise you would have to check for knobs named "go", "render", "execute", "generate", etc which would be odd. Personally I don't know of any other way to identify executable nodes aside that one at least. cheers, Diogo On Thu, Oct 10, 2013 at 6:14 AM, Fredrik Averpil <fredrik.aver...@gmail.com>wrote: > Aren't executable nodes always of type Write? > > If so, this could be what you're looking for? > > > Select some node and run the script to check whether it's executable or > not. > > > > [snip] > > > def isExecNode( someNode ): > > execNodes = nuke.allNodes('Write') > > print execNodes > > for execNode in execNodes: > > if someNode.name() in execNode.name(): > > return True > > else: > > return False > > > > > if isExecNode( nuke.selectedNode() ): > > print 'Execute node: ' + nuke.selectedNode().name() > > else: > > print 'Do not execute node: ' + nuke.selectedNode().name() > > > [/snip] > > > > > > Regards, > > Fredrik > > > > > > On Thu, Oct 10, 2013 at 3:38 AM, Paul Hudson <phudson1...@gmail.com>wrote: > >> Hi everyone, >> >> Is there an official way to check if a node is executable? I was just >> going to check if it has a 'beforeRender' knob, but wasn't sure that covers >> all cases. >> >> >> As always, thanks so much! >> -Paul >> >> _______________________________________________ >> Nuke-python mailing list >> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python >> >> > > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ > http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python > >
_______________________________________________ Nuke-python mailing list Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python