Commit: c8a10c43b13e109ec1bd78eedeea318be2c22980 Author: Jacques Lucke Date: Fri Jan 20 14:44:37 2023 +0100 Branches: master https://developer.blender.org/rBc8a10c43b13e109ec1bd78eedeea318be2c22980
Geometry Nodes: show number of curve points in socket inspection tooltip This was not done originally, because one had to iterate over all curves to get the number of points which had some overhead. Now the number of points is stored all the time anyway. =================================================================== M source/blender/editors/space_node/node_draw.cc M source/blender/nodes/NOD_geometry_nodes_log.hh M source/blender/nodes/intern/geometry_nodes_log.cc =================================================================== diff --git a/source/blender/editors/space_node/node_draw.cc b/source/blender/editors/space_node/node_draw.cc index bc4b6d416c1..53a86e23ce1 100644 --- a/source/blender/editors/space_node/node_draw.cc +++ b/source/blender/editors/space_node/node_draw.cc @@ -945,7 +945,8 @@ static void create_inspection_string_for_geometry_info(const geo_log::GeometryIn char line[256]; BLI_snprintf(line, sizeof(line), - TIP_("\u2022 Curve: %s splines"), + TIP_("\u2022 Curve: %s points, %s splines"), + to_string(curve_info.points_num).c_str(), to_string(curve_info.splines_num).c_str()); ss << line; break; diff --git a/source/blender/nodes/NOD_geometry_nodes_log.hh b/source/blender/nodes/NOD_geometry_nodes_log.hh index 3d453de4b78..9f28bad1630 100644 --- a/source/blender/nodes/NOD_geometry_nodes_log.hh +++ b/source/blender/nodes/NOD_geometry_nodes_log.hh @@ -126,6 +126,7 @@ class GeometryInfoLog : public ValueLog { int verts_num, edges_num, faces_num; }; struct CurveInfo { + int points_num; int splines_num; }; struct PointCloudInfo { diff --git a/source/blender/nodes/intern/geometry_nodes_log.cc b/source/blender/nodes/intern/geometry_nodes_log.cc index 66ccab2f77f..919159a31de 100644 --- a/source/blender/nodes/intern/geometry_nodes_log.cc +++ b/source/blender/nodes/intern/geometry_nodes_log.cc @@ -89,6 +89,7 @@ GeometryInfoLog::GeometryInfoLog(const GeometrySet &geometry_set) case GEO_COMPONENT_TYPE_CURVE: { const CurveComponent &curve_component = *(const CurveComponent *)component; CurveInfo &info = this->curve_info.emplace(); + info.points_num = curve_component.attribute_domain_size(ATTR_DOMAIN_POINT); info.splines_num = curve_component.attribute_domain_size(ATTR_DOMAIN_CURVE); break; } _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org List details, subscription details or unsubscribe: https://lists.blender.org/mailman/listinfo/bf-blender-cvs