imageworks/OpenShadingLanguage — pull request #191 by lgritz (2012-12-18 00:53:31+00:00)
Title: Constant folding of getattribute()

Constant folding of getattribute()

If both the attribute and object names are constants. This is especially
handy for shaders that use getattribute() to query global renderer
options. If this behavior is not desired (e.g., in a renderer where
users are free to alter global options without wanting to invalidate an
optimized shader), just set the ShadingSystem attribute
"opt_fold_getattribute" to 0 (it defaults to 1).