you could also use TCL, which has the advantage that it isn't baked in .. something like this should work:

[lrange [split [value file] / ] 13 13 ]

++ chris


On 7/19/12 at 7:21 PM, [email protected] (RP) wrote:

Hello all,
I'm sure you've heard it here a million times already, but I'm a complete python newbie in desperate need of help

I am trying to create a read node that has a label taken from the 13th directory from its path name.
I can get it to print the name of the 13th directory using
a = nuke.selectedNode()['file'].value().split('/')[13] print a


_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to