Eval a TCL knob value and feed it to Python

So I have a gizmo which contains a Write node driven by the gizmo switches (how original!). The Write has this in filename knob

Code:

[value rdir]/finals/[value shot]/NK_[value shot].%03d.dpx


I want to pick up the evaluated string in this field and feed it to a Py script on "before render" to make directories (even more original!). However, getValue() on the filename gives me the non-evaluated TCL.

Code:

print(nuke.thisNode()["file"].getValue())


Is there a way to get the evaluated knob value via Python?

No Responses to “Eval a TCL knob value and feed it to Python”

Post a Comment