[nuke] stereo comp file knob... reading values

So I’ve started working with a stereo comp we’ve received from a vendor (First time I’ve used stereo functionality in nuke).
They’ve setup the comp by splitting views on the file knob of the read nodes , so the file knob has a left and a right image sequence (as opposed to separate Read nodes that go through a joinViews node).

The sequences they’ve rendered don’t match the comps view names so %v would not work in the file path.
And I am trying to build up tools to read, replace, set these file names via python.
Problem is there appears to be no reliable way to do this.

Knobs in nuke have methods such as value() getValue() setValue() evaluate() getEvaluatedValue()… etc.
Some of these knobs let you pass in a view name for which to get / set values for… those methods only seem to work for number knobs… not strings like a ‘file’ knob.
Some of theses methods want an OutputContext() passed into them (this only seems to work for getEvaluatedValue())

The only thing that works reliably is getEvaluatedValue() passing in an OutputContext().
But I’d like to get the actual text value not the evaluation… Any thoughts???

Also I’d like to be able to reliably set the text values on each view… NOTHING works for this
Please tell me I’m missing something here and this isn’t the biggest oversight (of which there are many) that I’ve encountered in the nuke py api.

The docs going back to at least 6.3 show python code that does not work… ie knob.getValue(view=‘left’) the doc page is the same for version 8, and this method doesn’t even allow keyword args in this function if your reading a string knob, great docs! :curses:

Thanks for any help

174 reads 0 answers… Really nobody?
I’m assuming at this point its just another bug in this overpriced P.O.S software.
Shame the foundry’s own forum won’t complete my forum registration (despite repeated emails to support), so I can bitch directly to them. Guess $4k doesn’t get you much these days.

Try this syntax instead

for n in nuke.allNodes():
print n[‘file’].value()

PS, I cannot format my python. Make sure that you tab in the print statement.

Easiest way to format code is to enclose it in three backticks:

for n in nuke.allNodes():
    print n[‘file’].value()

Which should get you:

for n in nuke.allNodes():
    print n[‘file’].value()