Refactor: Select Engine: Draw actual indices instead of 'Original Indices' #119977

Merged
Germano Cavalcante merged 6 commits from mano-wii/blender:draw_select_id_cleanup into main 2024-04-16 14:58:12 +02:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit 70f2891190 - Show all commits

View File

@ -401,9 +401,10 @@ static const CustomData *mesh_customdata_of_type(const Mesh *mesh_eval, char ele
case SCE_SELECT_EDGE:
return &mesh_eval->edge_data;
case SCE_SELECT_VERTEX:
default:
return &mesh_eval->vert_data;
mano-wii marked this conversation as resolved
Review

I don't think there should be a default case here. Better to add BLI_assert_unreachable(); and return nullptr outside of the switch.

I don't think there should be a default case here. Better to add `BLI_assert_unreachable();` and `return nullptr` outside of the switch.
}
BLI_assert_unreachable();
return nullptr;
}
static const int *orig_index_from_object_get(const Object *object_eval, char elem_type)

View File

@ -166,7 +166,7 @@ static void extract_vert_idx_iter_loose_vert_mesh(const MeshRenderData &mr,
}
static void extract_vert_idx_init_subdiv(const DRWSubdivCache &subdiv_cache,
const MeshRenderData &mr,
const MeshRenderData & /*mr*/,
MeshBatchCache & /*cache*/,
void *buf,
void * /*data*/)
@ -181,7 +181,7 @@ static void extract_vert_idx_init_subdiv(const DRWSubdivCache &subdiv_cache,
}
static void extract_vert_idx_loose_geom_subdiv(const DRWSubdivCache &subdiv_cache,
const MeshRenderData &mr,
const MeshRenderData & /*mr*/,
void *buffer,
void * /*data*/)
{
@ -235,7 +235,7 @@ static void extract_edge_idx_init_subdiv(const DRWSubdivCache &subdiv_cache,
}
static void extract_edge_idx_loose_geom_subdiv(const DRWSubdivCache &subdiv_cache,
const MeshRenderData &mr,
const MeshRenderData & /*mr*/,
void *buffer,
void * /*data*/)
{
@ -258,7 +258,7 @@ static void extract_edge_idx_loose_geom_subdiv(const DRWSubdivCache &subdiv_cach
}
static void extract_face_idx_init_subdiv(const DRWSubdivCache &subdiv_cache,
const MeshRenderData &mr,
const MeshRenderData & /*mr*/,
MeshBatchCache & /*cache*/,
void *buf,
void * /*data*/)
@ -334,7 +334,7 @@ static void extract_fdot_idx_iter_face_bm(const MeshRenderData & /*mr*/,
(*(int32_t **)data)[f_index] = f_index;
}
static void extract_fdot_idx_iter_face_mesh(const MeshRenderData &mr,
static void extract_fdot_idx_iter_face_mesh(const MeshRenderData & /*mr*/,
const int face_index,
void *data)
{