Shading: Refactor Math node and use dynamic inputs.
- Implement dynamic inputs. The second input is now unavailable in single operand math operators. - Reimplemenet the clamp option using graph expansion for Cycles. - Clean up code and unify naming between Blender and Cycles. - Remove unused code. Reviewers: brecht Differential Revision: https://developer.blender.org/D5481
This commit is contained in:
@@ -326,10 +326,10 @@ static ShaderNode *add_node(Scene *scene,
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeMath)) {
|
||||
BL::ShaderNodeMath b_math_node(b_node);
|
||||
MathNode *math = new MathNode();
|
||||
math->type = (NodeMath)b_math_node.operation();
|
||||
math->use_clamp = b_math_node.use_clamp();
|
||||
node = math;
|
||||
MathNode *math_node = new MathNode();
|
||||
math_node->type = (NodeMathType)b_math_node.operation();
|
||||
math_node->use_clamp = b_math_node.use_clamp();
|
||||
node = math_node;
|
||||
}
|
||||
else if (b_node.is_a(&RNA_ShaderNodeVectorMath)) {
|
||||
BL::ShaderNodeVectorMath b_vector_math_node(b_node);
|
||||
|
||||
Reference in New Issue
Block a user