Hi Sören, I'm seeing this exact behavior and it's baffling. Nuke 9.0v7.
Did you ever report this? Anyone else? Cheers Ean On Fri, Sep 17, 2010 at 4:11 PM, sv022 <sv...@hdm-stuttgart.de> wrote: > Hey folks, > > I've came across this really weird behaviour of Nuke, when using the > hasError() method of a Read node. > > I've got a python script that gets all read nodes of the entire nuke > script, i.e. all reads from root level and all reads within groups and all > of their subgroups. > Now I want only the nodes that have no error, put them in a list and > return the list, which works flawlessly... as long as I run these functions > out of the Script Editor. > > example code of the part that collects the reads in groups: > > def withHasError(): > > groups = nuke.allNodes('Group') > reads = [read for grp in groups for read in nuke.allNodes(group = > grp) if read.Class() == 'Read' and not read.hasError()] > print 'withHasError: ', reads > > def withoutHasError(): > groups = nuke.allNodes('Group') > reads = [read for grp in groups for read in nuke.allNodes(group = > grp) if read.Class() == 'Read'] > print 'withoutHasError: ', reads > > out of the Script Editor I get this: > > withHasError() > withoutHasError() > > Result: > withHasError: [<Read6 at 0x00000000049E8710>, <Read5 at > 0x00000000049E86F0>] > > withoutHasError: [<Read6 at 0x00000000049E8710>, <Read5 at > 0x00000000049E86F0>] > > > now add these functions to the menu and run them again, you'll come to > this: > > > withHasError: [] > > withoutHasError: [<Read6 at 0x00000000049E8710>, <Read5 at > 0x00000000049E86F0>] > > > huh?! why is that? > Any of you guys got a different, more reliable solution to get rid of > erroneous Reads or even an explanation why this doesn't work? > > > Big thanks in advance! > cheers, Sören > _______________________________________________ > Nuke-python mailing list > Nuke-python@support.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