Fix: socket tooltip not showing when there was no type conversion

This commit is contained in:
Jacques Lucke 2022-12-16 19:39:14 +01:00 committed by Hans Goudey
parent 988241e23e
commit 6ecb1cb780
1 changed files with 5 additions and 2 deletions

View File

@ -848,10 +848,13 @@ static void create_inspection_string_for_generic_value(const bNodeSocket &socket
const CPPType &socket_type = *socket.typeinfo->base_cpp_type;
const bke::DataTypeConversions &convert = bke::get_implicit_type_conversions();
if (!convert.is_convertible(value_type, socket_type)) {
return;
if (value_type != socket_type) {
if (!convert.is_convertible(value_type, socket_type)) {
return;
}
}
BUFFER_FOR_CPP_TYPE_VALUE(socket_type, socket_value);
/* This will just copy the value if the types are equal. */
convert.convert_to_uninitialized(value_type, socket_type, buffer, socket_value);
BLI_SCOPED_DEFER([&]() { socket_type.destruct(socket_value); });