[Bf-blender-cvs] [bfdb27f4940] blender-v2.83-release: Fix incorrect assert in Cycles node socket get/set functions

Brecht Van Lommel noreply at git.blender.org
Tue May 12 21:54:53 CEST 2020


Commit: bfdb27f49402dfebeea8b3516cd0ae085b158642
Author: Brecht Van Lommel
Date:   Tue May 12 10:57:04 2020 +0200
Branches: blender-v2.83-release
https://developer.blender.org/rBbfdb27f49402dfebeea8b3516cd0ae085b158642

Fix incorrect assert in Cycles node socket get/set functions

Thanks to Subrahmanya Oruganti for spotting these.

===================================================================

M	intern/cycles/graph/node.cpp

===================================================================

diff --git a/intern/cycles/graph/node.cpp b/intern/cycles/graph/node.cpp
index 1439fb5a407..c437c6fda1e 100644
--- a/intern/cycles/graph/node.cpp
+++ b/intern/cycles/graph/node.cpp
@@ -133,7 +133,7 @@ void Node::set(const SocketType &input, const Transform &value)
 
 void Node::set(const SocketType &input, Node *value)
 {
-  assert(input.type == SocketType::TRANSFORM);
+  assert(input.type == SocketType::NODE);
   get_socket_value<Node *>(this, input) = value;
 }
 
@@ -213,7 +213,7 @@ float Node::get_float(const SocketType &input) const
 
 float2 Node::get_float2(const SocketType &input) const
 {
-  assert(input.type == SocketType::FLOAT);
+  assert(input.type == SocketType::POINT2);
   return get_socket_value<float2>(this, input);
 }
 
@@ -272,7 +272,7 @@ const array<float> &Node::get_float_array(const SocketType &input) const
 
 const array<float2> &Node::get_float2_array(const SocketType &input) const
 {
-  assert(input.type == SocketType::FLOAT_ARRAY);
+  assert(input.type == SocketType::POINT2_ARRAY);
   return get_socket_value<array<float2>>(this, input);
 }



More information about the Bf-blender-cvs mailing list