imageworks/OpenShadingLanguage — pull request #387 by lgritz (2014-06-27 04:01:24+00:00)
Title: Overhaul OSLQuery, allow queries from live ShadingSystem

It has come to my attention that some rendering apps (i.e., those with a ShadingSystem) were using liboslquery to find out about the shaders loaded, since there wasn't a good way to find out from the SS. But of course this is hugely wasteful, since it's loading oso files from disk, parsing them, etc.

So the primary feature here is a new way to initialize an OSLQuery from a ShaderGroup* and a layer index. This is non-functional from liboslquery, it's actually implemented in liboslexec.

Along for the ride are:

* New ShadingSystem::getattribute queries of some ShaderGroup data: group name, number of layers in the group, and the names of all the layers.

* Replacement of all the std::string in OSLQuery with usting and string_view, for efficiency.