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"
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user