Nodes: Add info about implicit input of value to tooltip #120498

Open
Iliya Katushenock wants to merge 8 commits from mod_moder/blender:implicit_input_field_tooltip into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
1 changed files with 14 additions and 3 deletions

View File

@ -1586,11 +1586,22 @@ static std::optional<std::string> create_log_inspection_string(geo_log::GeoTreeL
static std::optional<std::string> create_declaration_inspection_string(const bNodeSocket &socket)
{
const nodes::SocketDeclaration *socket_decl = socket.runtime->declaration;
if (socket_decl == nullptr) {
return std::nullopt;
}
std::stringstream ss;
if (const nodes::decl::Geometry *socket_decl = dynamic_cast<const nodes::decl::Geometry *>(
socket.runtime->declaration))
if (const nodes::decl::Geometry *geo_socket_decl = dynamic_cast<const nodes::decl::Geometry *>(
socket_decl))
{
create_inspection_string_for_geometry_socket(ss, socket_decl);
create_inspection_string_for_geometry_socket(ss, geo_socket_decl);
}
if (socket_decl->input_field_type == nodes::InputSocketFieldType::Implicit) {
if (!ss.str().empty()) {
ss << ".\n\n";
}
ss << TIP_("Implicit field input");
}
std::string str = ss.str();