Changeset View
Changeset View
Standalone View
Standalone View
source/blender/editors/sculpt_paint/sculpt.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 672 Lines • ▼ Show 20 Lines | |||||
| bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, int index) | bool SCULPT_vertex_has_unique_face_set(SculptSession *ss, int index) | ||||
| { | { | ||||
| switch (BKE_pbvh_type(ss->pbvh)) { | switch (BKE_pbvh_type(ss->pbvh)) { | ||||
| case PBVH_FACES: { | case PBVH_FACES: { | ||||
| return sculpt_check_unique_face_set_in_base_mesh(ss, index); | return sculpt_check_unique_face_set_in_base_mesh(ss, index); | ||||
| } | } | ||||
| case PBVH_BMESH: | case PBVH_BMESH: | ||||
| return false; | return true; | ||||
| case PBVH_GRIDS: { | case PBVH_GRIDS: { | ||||
| const CCGKey *key = BKE_pbvh_get_grid_key(ss->pbvh); | const CCGKey *key = BKE_pbvh_get_grid_key(ss->pbvh); | ||||
| const int grid_index = index / key->grid_area; | const int grid_index = index / key->grid_area; | ||||
| const int vertex_index = index - grid_index * key->grid_area; | const int vertex_index = index - grid_index * key->grid_area; | ||||
| const SubdivCCGCoord coord = {.grid_index = grid_index, | const SubdivCCGCoord coord = {.grid_index = grid_index, | ||||
| .x = vertex_index % key->grid_size, | .x = vertex_index % key->grid_size, | ||||
| .y = vertex_index / key->grid_size}; | .y = vertex_index / key->grid_size}; | ||||
| int v1, v2; | int v1, v2; | ||||
| ▲ Show 20 Lines • Show All 9,008 Lines • Show Last 20 Lines | |||||