Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/space_node/node_draw.cc
| Show First 20 Lines • Show All 873 Lines • ▼ Show 20 Lines | else if (type.is<bool>()) { | ||||
| ss << TIP_("Boolean field"); | ss << TIP_("Boolean field"); | ||||
| } | } | ||||
| else if (type.is<std::string>()) { | else if (type.is<std::string>()) { | ||||
| ss << TIP_("String field"); | ss << TIP_("String field"); | ||||
| } | } | ||||
| else if (type.is<blender::ColorGeometry4f>()) { | else if (type.is<blender::ColorGeometry4f>()) { | ||||
| ss << TIP_("Color field"); | ss << TIP_("Color field"); | ||||
| } | } | ||||
| ss << TIP_(" based on:\n"); | ss << TIP_(" based on:") << "\n"; | ||||
| for (const int i : input_tooltips.index_range()) { | for (const int i : input_tooltips.index_range()) { | ||||
| const blender::StringRef tooltip = input_tooltips[i]; | const blender::StringRef tooltip = input_tooltips[i]; | ||||
| ss << "\u2022 " << tooltip; | ss << "\u2022 " << tooltip; | ||||
| if (i < input_tooltips.size() - 1) { | if (i < input_tooltips.size() - 1) { | ||||
| ss << ".\n"; | ss << ".\n"; | ||||
| } | } | ||||
| } | } | ||||
| Show All 11 Lines | static void create_inspection_string_for_geometry_info(const geo_log::GeometryInfoLog &value_log, | ||||
| } | } | ||||
| auto to_string = [](int value) { | auto to_string = [](int value) { | ||||
| char str[16]; | char str[16]; | ||||
| BLI_str_format_int_grouped(str, value); | BLI_str_format_int_grouped(str, value); | ||||
| return std::string(str); | return std::string(str); | ||||
| }; | }; | ||||
| ss << TIP_("Geometry:\n"); | ss << TIP_("Geometry:") << "\n"; | ||||
| for (GeometryComponentType type : component_types) { | for (GeometryComponentType type : component_types) { | ||||
| const char *line_end = (type == component_types.last()) ? "" : ".\n"; | const char *line_end = (type == component_types.last()) ? "" : ".\n"; | ||||
| switch (type) { | switch (type) { | ||||
| case GEO_COMPONENT_TYPE_MESH: { | case GEO_COMPONENT_TYPE_MESH: { | ||||
| const geo_log::GeometryInfoLog::MeshInfo &mesh_info = *value_log.mesh_info; | const geo_log::GeometryInfoLog::MeshInfo &mesh_info = *value_log.mesh_info; | ||||
| char line[256]; | char line[256]; | ||||
| BLI_snprintf(line, | BLI_snprintf(line, | ||||
| sizeof(line), | sizeof(line), | ||||
| ▲ Show 20 Lines • Show All 854 Lines • ▼ Show 20 Lines | struct NamedAttributeTooltipArg { | ||||
| Map<StringRefNull, geo_log::NamedAttributeUsage> usage_by_attribute; | Map<StringRefNull, geo_log::NamedAttributeUsage> usage_by_attribute; | ||||
| }; | }; | ||||
| static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip)) | static char *named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip)) | ||||
| { | { | ||||
| NamedAttributeTooltipArg &arg = *static_cast<NamedAttributeTooltipArg *>(argN); | NamedAttributeTooltipArg &arg = *static_cast<NamedAttributeTooltipArg *>(argN); | ||||
| std::stringstream ss; | std::stringstream ss; | ||||
| ss << TIP_("Accessed named attributes:\n"); | ss << TIP_("Accessed named attributes:") << "\n"; | ||||
| struct NameWithUsage { | struct NameWithUsage { | ||||
| StringRefNull name; | StringRefNull name; | ||||
| geo_log::NamedAttributeUsage usage; | geo_log::NamedAttributeUsage usage; | ||||
| }; | }; | ||||
| Vector<NameWithUsage> sorted_used_attribute; | Vector<NameWithUsage> sorted_used_attribute; | ||||
| for (auto &&item : arg.usage_by_attribute.items()) { | for (auto &&item : arg.usage_by_attribute.items()) { | ||||
| ▲ Show 20 Lines • Show All 992 Lines • Show Last 20 Lines | |||||