diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-07-28 00:40:19 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-08-05 00:33:51 +0300 |
commit | 3ebe97c06b67d1611dfeaa3919512155416b0378 (patch) | |
tree | 6be636563c2f7cdab767dee0bccb3ea05c919fb5 /source/blender/blenkernel/intern/subdiv_ccg.c | |
parent | 50e6d56e4e4214c3cff5fdef7a1014736a8aa9dd (diff) |
Fix T78665: Face Set visibility reverted when chaning Multires Levels
Face Sets where only set and updated on the PBVH after starting a sculpt
tool. In order to preserve the visibility they store when changing
levels, they need to be updated and sync also on PBVH creation
Reviewed By: sergey
Maniphest Tasks: T78665
Differential Revision: https://developer.blender.org/D8225
Diffstat (limited to 'source/blender/blenkernel/intern/subdiv_ccg.c')
-rw-r--r-- | source/blender/blenkernel/intern/subdiv_ccg.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/subdiv_ccg.c b/source/blender/blenkernel/intern/subdiv_ccg.c index 11d5df4f672..bc1b79f62c5 100644 --- a/source/blender/blenkernel/intern/subdiv_ccg.c +++ b/source/blender/blenkernel/intern/subdiv_ccg.c @@ -1922,4 +1922,15 @@ SubdivCCGAdjacencyType BKE_subdiv_ccg_coarse_mesh_adjacency_info_get(const Subdi return SUBDIV_CCG_ADJACENT_NONE; } +void BKE_subdiv_ccg_grid_hidden_ensure(SubdivCCG *subdiv_ccg, int grid_index) +{ + if (subdiv_ccg->grid_hidden[grid_index] != NULL) { + return; + } + + CCGKey key; + BKE_subdiv_ccg_key_top_level(&key, subdiv_ccg); + subdiv_ccg->grid_hidden[grid_index] = BLI_BITMAP_NEW(key.grid_area, __func__); +} + /** \} */ |