A minor bug in node.cpp when reading Node from xml? A copy/paste issue

In node.cpp, line number 136. this is how it is:

void Node::set(const SocketType &input, Node *value)
{
  assert(input.type == SocketType::TRANSFORM);
  get_socket_value<Node *>(this, input) = value;
}

It should be like this I think.

void Node::set(const SocketType &input, Node *value)
{
  assert(input.type == SocketType::NODE);
  get_socket_value<Node *>(this, input) = value;
}

Another bug:

In Node.cpp at line number 214, the existing code is

float2 Node::get_float2(const SocketType &input) const
{
  assert(input.type == SocketType::FLOAT);
  return get_socket_value<float2>(this, input);
}

It should be

float2 Node::get_float2(const SocketType &input) const
{
  assert(input.type == SocketType::POINT2);
  return get_socket_value<float2>(this, input);
}

Thanks, I’ll commit these fixes.

Hi @brecht,

There is one more bug (3rd bug) in the same file. I think at line number 66. It is exactly same as bug 2