diff options
author | Hans Goudey <h.goudey@me.com> | 2022-09-23 16:19:40 +0300 |
---|---|---|
committer | Hans Goudey <h.goudey@me.com> | 2022-09-23 16:19:40 +0300 |
commit | 060a5341419412fd7996cf99a56db1f581a4c30c (patch) | |
tree | 59413121aaf62bedc794822ea8d1c4d2c55e9088 /source/blender/bmesh | |
parent | 35375380d73b93999b879164fd59266ee044472c (diff) |
Mesh: Move sculpt face sets to a generic attribute
Similar to the other refactors from T95965, this commit moves sculpt
face sets to use a generic integer attribute named `".sculpt_face_set"`.
This makes face sets accessible in the Python API.
The attribute is not visible in the attributes list or the spreadsheet
because it is meant for internal use, though that could be an option
in the future along with other similar attributes. Currently the change
is small, but in the future this could simplify code by allowing use
of more generic attribute APIs.
Differential Revision: https://developer.blender.org/D16045
Diffstat (limited to 'source/blender/bmesh')
-rw-r--r-- | source/blender/bmesh/intern/bmesh_log.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/bmesh/intern/bmesh_log.c b/source/blender/bmesh/intern/bmesh_log.c index 64e6c63e9f0..04ad80214c2 100644 --- a/source/blender/bmesh/intern/bmesh_log.c +++ b/source/blender/bmesh/intern/bmesh_log.c @@ -288,7 +288,8 @@ static void bm_log_verts_restore(BMesh *bm, BMLog *log, GHash *verts) static void bm_log_faces_restore(BMesh *bm, BMLog *log, GHash *faces) { GHashIterator gh_iter; - const int cd_face_sets = CustomData_get_offset(&bm->pdata, CD_SCULPT_FACE_SETS); + const int cd_face_sets = CustomData_get_offset_named( + &bm->pdata, CD_PROP_INT32, ".sculpt_face_set"); GHASH_ITER (gh_iter, faces) { void *key = BLI_ghashIterator_getKey(&gh_iter); |