diff options
author | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-15 20:31:07 +0400 |
---|---|---|
committer | Lukas Toenne <lukas.toenne@googlemail.com> | 2012-09-15 20:31:07 +0400 |
commit | 41081b3e8cd0f5f80f7753ad600db64b93a4d9b5 (patch) | |
tree | 1b3be00d4d58bdffc6ded86b0a633572818771c9 /intern/cycles/render/osl.h | |
parent | 21964e65380131324dcb50567e913cf6e4a29102 (diff) |
Generate compatible OSL shader parameter names in cases where the node has and input and output with the same name. In that case the convention is to add suffixes "In" and "Out" respectively.
Example:
Blender node has one input "Color" and one output "Color"
-> OSL parameter names should be "ColorIn" and "ColorOut"
Diffstat (limited to 'intern/cycles/render/osl.h')
-rw-r--r-- | intern/cycles/render/osl.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/intern/cycles/render/osl.h b/intern/cycles/render/osl.h index 2da951ab3d2..90107a34a98 100644 --- a/intern/cycles/render/osl.h +++ b/intern/cycles/render/osl.h @@ -37,6 +37,7 @@ class OSLGlobals; class Scene; class ShaderGraph; class ShaderNode; +class ShaderInput; class ShaderOutput; #ifdef WITH_OSL @@ -96,7 +97,8 @@ private: string id(ShaderNode *node); void compile_type(Shader *shader, ShaderGraph *graph, ShaderType type); bool node_skip_input(ShaderNode *node, ShaderInput *input); - string compatible_name(const char *name); + string compatible_name(ShaderNode *node, ShaderInput *input); + string compatible_name(ShaderNode *node, ShaderOutput *output); void find_dependencies(set<ShaderNode*>& dependencies, ShaderInput *input); void generate_nodes(const set<ShaderNode*>& nodes); |