[Bf-blender-cvs] [6ecb1cb780c] geometry-nodes-simulation: Fix: socket tooltip not showing when there was no type conversion

Jacques Lucke noreply at git.blender.org
Mon Dec 19 19:05:25 CET 2022


Commit: 6ecb1cb780c681fc0b24c74f0a2414c2488997cd
Author: Jacques Lucke
Date:   Fri Dec 16 19:39:14 2022 +0100
Branches: geometry-nodes-simulation
https://developer.blender.org/rB6ecb1cb780c681fc0b24c74f0a2414c2488997cd

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

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

M	source/blender/editors/space_node/node_draw.cc

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

diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc
index 740008980f3..b2c77afc0ae 100644
--- a/source/blender/editors/space_node/node_draw.cc
+++ b/source/blender/editors/space_node/node_draw.cc
@@ -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); });



More information about the Bf-blender-cvs mailing list