Scripting is not part of my experience and that doesn't seem a easy task. I can deal with the creation of macros and simple stuff but no beyond that. There is a script renderer of high quality that uses Nitrous that shows how is a lot more capable than the it can now:…
Substance can do mixed renderer support because it's an extremely limited system and they've adopted a relatively new material framework called MDL that's designed for doing exactly that. They use a glsl Shader for realtime work and an equivalent iray Shader for the offline bit. This is exactly the same as using a pbr…