two ways to do it using TCL:

[join [lrange [split [value file] "/"] end-1 end-1] "/"]

or:
[join [lrange [split [file dirname [value file]] "/"] end end] "/"]

only tested it on OSX, should also work on linux but not sure about windows - i guess you'd have to change the slash to a backslash, so python might be better for cross platform use.
++ chris


On 10/19/12 at 5:12 PM,  (Gustaf Nilsson) wrote:
you can use python if you want..

[python -eval {nuke.thisNode().blablalba[-1]}]



On Fri, Oct 19, 2012 at 12:40 PM, Vincent Langer wrote:
got it :

[join [lrange [split [value file] / ] 5 5 ] / ]

but is there a way to select the splitted elements
backwards like with
python ( [-1] ) ?

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

Reply via email to