Author Topic: Function Node Type Bug  (Read 640 times)

Some function nodes, such as Linear Interpolation and the if/else node, which do not relate to a specific type, will not allow you to set them as the output value until their type is determined, which makes perfect sense.

However, there is a problem where the type will remain unknown even after it is fully connected. And this prevents it from being marked as the output value. The only way to correct it is to disconnect one of its inputs and reconnect again.

To reproduce the situation where a node has no specific type even after it is fully connected, follow these steps in order:
  • Add 2 if/else nodes.. A and B
  • Connect A's output to both of B's value inputs (for simplicity) - these will begin as typeless (and stay that way)
  • Add any const float and connect it to both of A's value inputs (will not change B's type)
  • Add a const boolean and connect to both A and B's boolean inputs
  • Try to set B as the output value
  • To fix the graph, disconnect either value input for B and then reconnect it

This is obviously happening because Designer only computes the node type when one of its inputs are being changed. However, it should also consider tracing the chain in the opposite direction. Once a node's type is changed because an input changed, then it should trace out all down-level connections for missing types as well. Either that or just update the type when the user attempts to set it as the output value (such as when they open the context menu).

Thanks: I shared it with the team!