Looks fine.
The problem with your previous attempt was that using quoted around "f"
means literally the letter f, rather than referring to the variable f
you created earlier.
By using str() you cast the value of the variable f to be a string, e.g.
123 turns into "123", which is what the frame
Seems legit to me!
Sent from my iPhone
> On Jan 19, 2017, at 3:33 PM, Andrew Mumford wrote:
>
> Answering my own question I hope ...
>
> r = nuke.Root()
> f = r.knob('first_frame').value()
> n = nuke.selectedNode()
> print n['frame'].setValue(str(f))
> Seems to get me the
Answering my own question I hope ...
r = nuke.Root()
f = r.knob('first_frame').value()
n = nuke.selectedNode()
print n['frame'].setValue(str(f))
Seems to get me the result I was hoping for - anyone see any problems in this ?
Thx
---
Andrew Mumford
On Jan 19, 2017, at 12:29 PM, Andrew Mumford
It tells me it's expecting a string not a float - I guess maybe that's because I can type
expressions in there like "frame/2" do I need to mangle a float into a string
maybe ?
---
Andrew Mumford
On Jan 19, 2017, at 12:24 PM, Nathan Shipley wrote:
Does it work if you take
print n['frame'].setValue(f)
You don’t need the quotes - the qoutes mean it’s text not the value of f
Howard Jones
Visual Effects Supervisor
m: 07973 265624 | e: how...@axis-vfx.com | w: www.axis-vfx.com
> On 19 Jan 2017, at 20:15, Andrew Mumford wrote:
>
> print
Does it work if you take 'f' out of the 'quotes'? So: print
n['frame'].setValue(f)
On Thu, Jan 19, 2017 at 12:15 PM, Andrew Mumford wrote:
> Trying to do the simplest thing for days now but still failing.
>
> I want to set a selected Read node knobs "expr" and "frame" to
Trying to do the simplest thing for days now but still failing.
I want to set a selected Read node knobs "expr" and "frame" to "start at" and
"nuke.Root.first_frame()" so when I get file frame nos such as 103094 - 103122 I can set the to some "human
useable" range.
Failing on the second part