Thanks Nathan, seems to work quite well! Abraham
Am 15.05.2014 um 18:27 schrieb Nathan Rusch: > There was a thread a few months ago where someone was asking about getting > upstream nodes. I can't remember what the topic was called, and the forums > seem to be down, but this is probably pretty close to the same code I posted > there for a basic depth-first traversal generator: > > def iterDependencies(node): > mask = nuke.INPUTS | nuke.HIDDEN_INPUTS > stack = node.dependencies(mask) > seen = set() > while stack: > node = stack.pop() > if node in seen: > continue > yield node > seen.add(node) > stack.extend(node.dependencies(mask)) > > > -Nathan > > -----Original Message----- From: Schneider, Abraham > Sent: Thursday, May 15, 2014 6:03 AM > To: Nuke Python discussion > Subject: [Nuke-python] find out if node is used for Write output? > > Hi there! > > Wanted to write a script for Nuke to check a Nuke comp for the existence of > special nodes. In addition to the know if they exist at all, I'd also like to > know if they are used for the output(s) of my Write node(s) or if they are > only kept in the script but are not rendered at all. > > First thing to check would be the state of the 'disable' knob of course. But > even if it is enabled, if it's not connected in any way to at least one of my > Write nodes, I wouldn't need it for rendering. But how can I cleverly check > if a node is connected to any of my Write nodes? > > Thanks, Abraham > > > Abraham Schneider > Head of VFX pipeline / VFX Supervisor > > > Türkenstr. 89, 80799 München / > Phone +49 89 3809-1096 > > EMail aschnei...@arri.de > > Visit us on Facebook!________________________________ > > > ARRI Film & TV Services GmbH > Sitz: München Registergericht: Amtsgericht München > Handelsregisternummer: HRB 69396 > Geschäftsführer: Helge Jürgens, Josef Reidinger > _______________________________________________ > 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