diff options
author | Hans Goudey <h.goudey@me.com> | 2022-04-19 07:48:43 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-04-19 07:48:43 +0300 |
commit | 8c25889bb67db4c1d2f94bf85ca6d1c2a050fcfe (patch) | |
tree | 772697b82ecd172e577ef11779543c523b4e86f8 /source/blender/makesdna | |
parent | 775f0d76d55b2977c30dcd0f9306437ae520d63f (diff) |
Refactor: Move mesh face dot tag out of MVert
Continuing the refactors described in T93602, this commit moves
the face dot tag set by the subdivision surface modifier out of
`MVert` to `MeshRuntime`. This clarifies its status as runtime data
and allows further refactoring of mesh positions in the future.
Before, `BKE_modifiers_uses_subsurf_facedots` was used to check
whether subsurf face dots should be drawn, but now we can just check
if the tags exist on the mesh. Modifiers that create new new geometry
or modify topology will already remove the array by clearing mesh
runtime data.
Differential Revision: https://developer.blender.org/D14680
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_mesh_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_meshdata_types.h | 1 |
2 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_mesh_types.h b/source/blender/makesdna/DNA_mesh_types.h index 0ff9ebb2337..2b4858d4106 100644 --- a/source/blender/makesdna/DNA_mesh_types.h +++ b/source/blender/makesdna/DNA_mesh_types.h @@ -138,7 +138,11 @@ typedef struct Mesh_Runtime { float (*vert_normals)[3]; float (*poly_normals)[3]; - void *_pad2; + /** + * A #BLI_bitmap containing tags for the center vertices of subdivided polygons, set by the + * subdivision surface modifier and used by drawing code instead of polygon center face dots. + */ + uint32_t *subsurf_face_dot_tags; } Mesh_Runtime; typedef struct Mesh { diff --git a/source/blender/makesdna/DNA_meshdata_types.h b/source/blender/makesdna/DNA_meshdata_types.h index 3c734419bfe..2a4234bde6a 100644 --- a/source/blender/makesdna/DNA_meshdata_types.h +++ b/source/blender/makesdna/DNA_meshdata_types.h @@ -33,7 +33,6 @@ typedef struct MVert { enum { /* SELECT = (1 << 0), */ ME_HIDE = (1 << 4), - ME_VERT_FACEDOT = (1 << 5), }; /** |