From db98007c3abd78f7beb2a4f63f9f51b7b135f9a8 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 31 Aug 2022 17:21:23 +0200 Subject: [PATCH 1/3] UI: Fix Geometry Nodes "Mesh to Volume" name (typo) Old name: "Mesh To Volume" New name: "Mesh to Volume" This is consistent with what we do for the other nodes (Mesh to Curve, Mesh to Points). --- source/blender/nodes/NOD_static_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index 586d3e36177..8a89dd46e30 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -361,7 +361,7 @@ DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_LINE, def_geo_mesh_line, "MESH_PRI DefNode(GeometryNode, GEO_NODE_MESH_PRIMITIVE_UV_SPHERE, 0, "MESH_PRIMITIVE_UV_SPHERE", MeshUVSphere, "UV Sphere", "Generate a spherical mesh with quads, except for triangles at the top and bottom") DefNode(GeometryNode, GEO_NODE_MESH_TO_CURVE, 0, "MESH_TO_CURVE", MeshToCurve, "Mesh to Curve", "Generate a curve from a mesh") DefNode(GeometryNode, GEO_NODE_MESH_TO_POINTS, def_geo_mesh_to_points, "MESH_TO_POINTS", MeshToPoints, "Mesh to Points", "Generate a point cloud from a mesh's vertices") -DefNode(GeometryNode, GEO_NODE_MESH_TO_VOLUME, def_geo_mesh_to_volume, "MESH_TO_VOLUME", MeshToVolume, "Mesh To Volume", "Create a fog volume with the shape of the input mesh's surface") +DefNode(GeometryNode, GEO_NODE_MESH_TO_VOLUME, def_geo_mesh_to_volume, "MESH_TO_VOLUME", MeshToVolume, "Mesh to Volume", "Create a fog volume with the shape of the input mesh's surface") DefNode(GeometryNode, GEO_NODE_OBJECT_INFO, def_geo_object_info, "OBJECT_INFO", ObjectInfo, "Object Info", "Retrieve information from an object") DefNode(GeometryNode, GEO_NODE_POINTS_TO_VERTICES, 0, "POINTS_TO_VERTICES", PointsToVertices, "Points to Vertices", "Generate a mesh vertex for each point cloud point") DefNode(GeometryNode, GEO_NODE_POINTS_TO_VOLUME, def_geo_points_to_volume, "POINTS_TO_VOLUME", PointsToVolume, "Points to Volume", "Generate a fog volume sphere around every point") From 30ec628d432af2bbf729aeba7fa1bd14d2c06811 Mon Sep 17 00:00:00 2001 From: Dalai Felinto Date: Wed, 31 Aug 2022 17:28:44 +0200 Subject: [PATCH 2/3] UI: Fix Geometry Nodes "Is Face Planar" name Old name: "Face is Planar" New name: "Is Face Planar" This follows the current convention (Is Shade Smooth, Is Viewport, ...). --- source/blender/nodes/NOD_static_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/nodes/NOD_static_types.h b/source/blender/nodes/NOD_static_types.h index 8a89dd46e30..8e306b16b07 100644 --- a/source/blender/nodes/NOD_static_types.h +++ b/source/blender/nodes/NOD_static_types.h @@ -328,7 +328,7 @@ DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_ANGLE, 0, "MESH_EDGE_ANGLE", Inpu DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_NEIGHBORS, 0, "MESH_EDGE_NEIGHBORS",InputMeshEdgeNeighbors, "Edge Neighbors", "Retrieve the number of faces that use each edge as one of their sides") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_EDGE_VERTICES, 0, "MESH_EDGE_VERTICES", InputMeshEdgeVertices, "Edge Vertices", "Retrieve topology information relating to each edge of a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_AREA, 0, "MESH_FACE_AREA", InputMeshFaceArea, "Face Area", "Calculate the surface area of a mesh's faces") -DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_IS_PLANAR, 0, "MESH_FACE_IS_PLANAR",InputMeshFaceIsPlanar, "Face is Planar", "Retrieve whether all triangles in a face are on the same plane, i.e. whether have the same normal") +DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_IS_PLANAR, 0, "MESH_FACE_IS_PLANAR",InputMeshFaceIsPlanar, "Is Face Planar", "Retrieve whether all triangles in a face are on the same plane, i.e. whether have the same normal") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_FACE_NEIGHBORS, 0, "MESH_FACE_NEIGHBORS",InputMeshFaceNeighbors, "Face Neighbors", "Retrieve topology information relating to each face of a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_ISLAND, 0, "MESH_ISLAND", InputMeshIsland, "Mesh Island", "Retrieve information about separate connected regions in a mesh") DefNode(GeometryNode, GEO_NODE_INPUT_MESH_VERTEX_NEIGHBORS, 0, "MESH_VERTEX_NEIGHBORS", InputMeshVertexNeighbors, "Vertex Neighbors", "Retrieve topology information relating to each vertex of a mesh") From cdc0be48c95c379b75143a60e935a416d99eb8bf Mon Sep 17 00:00:00 2001 From: Joseph Eagar Date: Wed, 31 Aug 2022 09:43:52 -0700 Subject: [PATCH 3/3] Cleanup: fix warnings from vcol limit commit --- .../blender/blenkernel/intern/mesh_validate.cc | 1 - source/blender/editors/mesh/mesh_data.cc | 16 +++++++++++----- .../blender/io/alembic/intern/abc_customdata.cc | 1 - 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/source/blender/blenkernel/intern/mesh_validate.cc b/source/blender/blenkernel/intern/mesh_validate.cc index d17885e1214..5231c550fa7 100644 --- a/source/blender/blenkernel/intern/mesh_validate.cc +++ b/source/blender/blenkernel/intern/mesh_validate.cc @@ -1017,7 +1017,6 @@ bool BKE_mesh_validate_all_customdata(CustomData *vdata, pdata, mask.pmask, totpoly, do_verbose, do_fixes, &is_change_p); const int tot_uvloop = CustomData_number_of_layers(ldata, CD_MLOOPUV); - const int tot_vcolloop = CustomData_number_of_layers(ldata, CD_PROP_BYTE_COLOR); if (tot_uvloop > MAX_MTFACE) { PRINT_ERR( "\tMore UV layers than %d allowed, %d last ones won't be available for render, shaders, " diff --git a/source/blender/editors/mesh/mesh_data.cc b/source/blender/editors/mesh/mesh_data.cc index c850e2f1e7a..88caa191b18 100644 --- a/source/blender/editors/mesh/mesh_data.cc +++ b/source/blender/editors/mesh/mesh_data.cc @@ -368,8 +368,11 @@ bool ED_mesh_uv_remove_named(Mesh *me, const char *name) return false; } -int ED_mesh_color_add( - Mesh *me, const char *name, const bool active_set, const bool do_init, ReportList *reports) +int ED_mesh_color_add(Mesh *me, + const char *name, + const bool active_set, + const bool do_init, + ReportList *UNUSED(reports)) { /* NOTE: keep in sync with #ED_mesh_uv_add. */ @@ -503,8 +506,11 @@ static bool sculpt_vertex_color_remove_poll(bContext *C) return false; } -int ED_mesh_sculpt_color_add( - Mesh *me, const char *name, const bool active_set, const bool do_init, ReportList *reports) +int ED_mesh_sculpt_color_add(Mesh *me, + const char *name, + const bool active_set, + const bool do_init, + ReportList *UNUSED(reports)) { /* NOTE: keep in sync with #ED_mesh_uv_add. */ @@ -529,7 +535,7 @@ int ED_mesh_sculpt_color_add( } else { layernum = CustomData_number_of_layers(&me->vdata, CD_PROP_COLOR); - + if (CustomData_has_layer(&me->vdata, CD_PROP_COLOR) && do_init) { const MPropCol *color_data = (const MPropCol *)CustomData_get_layer(&me->vdata, CD_PROP_COLOR); diff --git a/source/blender/io/alembic/intern/abc_customdata.cc b/source/blender/io/alembic/intern/abc_customdata.cc index 35be9f9fc4d..6664417823c 100644 --- a/source/blender/io/alembic/intern/abc_customdata.cc +++ b/source/blender/io/alembic/intern/abc_customdata.cc @@ -564,7 +564,6 @@ void read_custom_data(const std::string &iobject_full_name, } int num_uvs = 0; - int num_colors = 0; const size_t num_props = prop.getNumProperties();