Fix: Link drag search error with random value node from color socket

Dragging from a color socket would hit an assert in a debug build.
The node does not have a color mode currently, so use the vector mode
instead when connecting to a color socket.
This commit is contained in:
Hans Goudey 2022-01-04 10:32:32 -06:00
parent 55842b4244
commit f7c0287278
1 changed files with 1 additions and 2 deletions

View File

@ -110,9 +110,8 @@ static std::optional<CustomDataType> node_type_from_other_socket(const bNodeSock
case SOCK_INT:
return CD_PROP_INT32;
case SOCK_VECTOR:
return CD_PROP_FLOAT3;
case SOCK_RGBA:
return CD_PROP_COLOR;
return CD_PROP_FLOAT3;
default:
return {};
}