From c686951233c68896d512ac0cac9813bb36a89692 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 27 Oct 2020 13:49:45 +1100 Subject: Cleanup: improve comment about shape keys, correct spelling --- source/blender/editors/object/object_modifier.c | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'source/blender/editors/object') diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index 146e399a04d..17dc8f46796 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -680,16 +680,15 @@ static int modifier_apply_shape(Main *bmain, return 0; } - /* - * It should be ridiculously easy to extract the original verts that we want - * and form the shape data. We can probably use the CD KEYINDEX layer (or - * whatever I ended up calling it, too tired to check now), though this would - * by necessity have to make some potentially ugly assumptions about the order - * of the mesh data :-/ you can probably assume in 99% of cases that the first - * element of a given index is the original, and any subsequent duplicates are - * copies/interpolates, but that's an assumption that would need to be tested - * and then predominantly stated in comments in a half dozen headers. - */ + /* We could investigate using the #CD_ORIGINDEX layer + * to support other kinds of modifiers besides deforming modifiers. + * as this is done in many other places, see: #BKE_mesh_foreach_mapped_vert_coords_get. + * + * This isn't high priority in practice since most modifiers users + * want to apply as a shape are deforming modifiers. + * + * If a compelling use-case comes up where we want to support other kinds of modifiers + * we can look into supporting them. */ if (ob->type == OB_MESH) { Mesh *mesh_applied; @@ -722,7 +721,7 @@ static int modifier_apply_shape(Main *bmain, BKE_id_free(NULL, mesh_applied); } else { - /* TODO: implement for hair, pointclouds and volumes. */ + /* TODO: implement for hair, point-clouds and volumes. */ BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); return 0; } @@ -819,7 +818,7 @@ static int modifier_apply_obdata( DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY); } else { - /* TODO: implement for hair, pointclouds and volumes. */ + /* TODO: implement for hair, point-clouds and volumes. */ BKE_report(reports, RPT_ERROR, "Cannot apply modifier for this object type"); return 0; } -- cgit v1.2.3