Cycles: Remove some ifdefs for OSL < 1.7.1.

That means that we now only support OSL 1.7.1 or newer. Please update libs or re-run install-depsh.sh.
This commit is contained in:
Thomas Dinges
2016-02-11 13:57:39 +01:00
parent 1e29849da0
commit 164dfbeb50
4 changed files with 2 additions and 47 deletions

View File

@@ -4599,28 +4599,6 @@ void OSLScriptNode::compile(SVMCompiler& /*compiler*/)
void OSLScriptNode::compile(OSLCompiler& compiler)
{
#if defined(WITH_OSL) && (OSL_LIBRARY_VERSION_CODE < 10701)
/* XXX fix for #36790:
* point and normal parameters are reflected as generic SOCK_VECTOR sockets
* on the node. Socket fixed input values need to be copied explicitly here for
* vector sockets, otherwise OSL will reject the value due to mismatching type.
*/
foreach(ShaderInput *input, this->inputs) {
if(!input->link) {
/* no need for compatible_name here, OSL parameter names are always unique */
string param_name(input->name);
switch(input->type) {
case SHADER_SOCKET_VECTOR:
compiler.parameter_point(param_name.c_str(), input->value);
compiler.parameter_normal(param_name.c_str(), input->value);
break;
default:
break;
}
}
}
#endif
if(!filepath.empty())
compiler.add(this, filepath.c_str(), true);
else