Two steps back in folder structure?

I’m putting together a write node template for our studio, and like the Auto Write script at Nukepedia, I add expressions together to create a path. I would like to take the location of the Nuke script file (value root.name), and go two steps back into the folder structure using expressions. For example, if [value.root.name] would give me "show01/shot01/nuke/shot01.nk", I would like it go give me only "show01/shot01". A way to tell the expression to look in the file path for a folder called "nuke" and then deliver the path "before that"? In Javascripting I would play around with lastIndexOf to get to the location. Anyone know of a way?
No Responses to “Two steps back in folder structure?”

Post a Comment