Cleanup: strip trailing space for cycles
This commit is contained in:
@@ -122,7 +122,7 @@ void OSLShaderManager::device_update(Device *device, DeviceScene *dscene, Scene
|
||||
shader->need_update = false;
|
||||
|
||||
need_update = false;
|
||||
|
||||
|
||||
/* set texture system */
|
||||
scene->image_manager->set_osl_texture_system((void*)ts);
|
||||
|
||||
@@ -578,7 +578,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input)
|
||||
/* strip whitespace */
|
||||
while((i = sname.find(" ")) != string::npos)
|
||||
sname.replace(i, 1, "");
|
||||
|
||||
|
||||
/* if output exists with the same name, add "In" suffix */
|
||||
foreach(ShaderOutput *output, node->outputs) {
|
||||
if(input->name() == output->name()) {
|
||||
@@ -586,7 +586,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderInput *input)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return sname;
|
||||
}
|
||||
|
||||
@@ -598,7 +598,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output)
|
||||
/* strip whitespace */
|
||||
while((i = sname.find(" ")) != string::npos)
|
||||
sname.replace(i, 1, "");
|
||||
|
||||
|
||||
/* if input exists with the same name, add "Out" suffix */
|
||||
foreach(ShaderInput *input, node->inputs) {
|
||||
if(input->name() == output->name()) {
|
||||
@@ -606,7 +606,7 @@ string OSLCompiler::compatible_name(ShaderNode *node, ShaderOutput *output)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return sname;
|
||||
}
|
||||
|
||||
@@ -614,7 +614,7 @@ bool OSLCompiler::node_skip_input(ShaderNode *node, ShaderInput *input)
|
||||
{
|
||||
/* exception for output node, only one input is actually used
|
||||
* depending on the current shader type */
|
||||
|
||||
|
||||
if(input->flags() & SocketType::SVM_INTERNAL)
|
||||
return true;
|
||||
|
||||
@@ -704,7 +704,7 @@ void OSLCompiler::add(ShaderNode *node, const char *name, bool isfilepath)
|
||||
ss->Shader("displacement", name, id(node).c_str());
|
||||
else
|
||||
assert(0);
|
||||
|
||||
|
||||
/* link inputs to other nodes */
|
||||
foreach(ShaderInput *input, node->inputs) {
|
||||
if(input->link) {
|
||||
@@ -1250,4 +1250,3 @@ void OSLCompiler::parameter_color_array(const char * /*name*/, const array<float
|
||||
#endif /* WITH_OSL */
|
||||
|
||||
CCL_NAMESPACE_END
|
||||
|
||||
|
Reference in New Issue
Block a user