File_Knob only stores a path... There is no secret way to retrieve the trailing
frame range string that is passed to it once it has been stored.
The Read node probably uses knob_changed to handle the frame range parsing and
peeking at the image format. In Python, your alternative approach (String_Knob
+ 'browse' button) is probably the best option.
-Nathan
From: Erwan Leroy
Sent: Saturday, January 17, 2015 1:18 AM
To: Nuke Python discussion
Subject: [Nuke-python] File_Knob() parse frame range.
Hi folks.
I'm struggling with something that I thought was gonna be super easy.
When I add a File_knob in a panel, click the little folder icon, it opens the
file browser just fine. I select a sequence, the field at the bottom shows
"/path/to/sequence/file_####.ext 0-100".
When I click open, what gets returned into the knob is
"/path/to/sequence/file_####.ext"
I'd like to be able to obtain the frame range as well, but I can't seem to
access the value.
I found a work around by using a String_Knob coupled with a button running
fileSequence = nuke.getClipName('Select File Sequence'), which does return the
whole string.
Then I cut it up in pieces and use what I want, but just to be clean I'd like
to use the File_Knob, I'm sure there is a way, read nodes parse the frame range
from that all the time.
Cheers
Erwan
--------------------------------------------------------------------------------
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python