XML? Ugh! So there's no equivalent to the SLO API for the new RIS shaders? Assuming XML is the only way, those are very good questions you raise. As you say, IECoreRI provides an intermediate loading step via the SLOReader, which is used in Gaffer to load shaders onto the RenderManShader node. In the past it's been very useful to use SLOReader on its own in various scripted bits of pipeline, but going forward I see Cortex being used less and less in this direct way, and see it becoming used primarily through Gaffer. The ArnoldShader node actually loads Arnold shaders directly anyway, so there is precedent for a more direct approach, and unless anyone else has a strong use case for an intermediate RISShaderReader I'm inclined to keep things simple and do the loading direct in the shader node. Although I'm ignorant of the details, my initial feeling is that the loading should be done in C++ using boost property trees as you suggest. Although loading isn't terribly speed critical, converting Gaffer graphs into shading networks at render time can be, so we need at least that part of the shader node to be C++. So it just seems cleaner to keep the loading in C++ too.
On a slightly wider note, what are folks' opinions on GafferRenderMan now that RIS is here? I had originally hoped that nodes like RenderManAttributes would provide the core set of attributes from the RenderMan spec, and then nodes like PRManAttributes and 3DelightAttributes would add on renderer specifics. But it feels like it might make sense to have a clean break, with RISAttributes and RISOptions existing totally separately. Since both 3delight and PRMan seem to be diverging, is there much benefit to shared nodes any more? And is REYES even worth supporting? Should there be separate GafferPRMan and GafferDelight modules?
I'm aware of some hardcoded use of 3delight stuff in the test cases, but hopefully not in the library itself. In any case, please feel free to drip feed these small fixes to us as you come across them.
Thanks for showing an interest in this - RIS support is definitely something that would be very cool to have in Gaffer…
Cheers…
John