This is one of my PRman shading exercise.
The goal was to create as much leave variations with the least bxdf calculations.
To achieve that, I used MEL to assign two custom attributes to the shape nodes and with the PRman primvar, PxrSeExpr feature I was able to switch between 8 texture sets with one shader.