Cleanup: Remove unused mesh array variables and arguments
This commit is contained in:
parent
6e26d0645e
commit
70041ced14
|
@ -156,15 +156,8 @@ void old_mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float
|
|||
/**
|
||||
* Find per-corner coordinate with given per-face UV coord.
|
||||
*/
|
||||
int mdisp_rot_face_to_crn(struct MVert *mvert,
|
||||
struct MPoly *mpoly,
|
||||
struct MLoop *mloop,
|
||||
const struct MLoopTri *lt,
|
||||
int face_side,
|
||||
float u,
|
||||
float v,
|
||||
float *x,
|
||||
float *y);
|
||||
int mdisp_rot_face_to_crn(
|
||||
struct MPoly *mpoly, int face_side, float u, float v, float *x, float *y);
|
||||
|
||||
/* Reshaping, define in multires_reshape.c */
|
||||
|
||||
|
|
|
@ -1522,15 +1522,8 @@ void multiresModifier_ensure_external_read(struct Mesh *mesh, const MultiresModi
|
|||
|
||||
/***************** Multires interpolation stuff *****************/
|
||||
|
||||
int mdisp_rot_face_to_crn(struct MVert * /*mvert*/,
|
||||
struct MPoly *mpoly,
|
||||
struct MLoop * /*mloop*/,
|
||||
const struct MLoopTri * /*lt*/,
|
||||
const int face_side,
|
||||
const float u,
|
||||
const float v,
|
||||
float *x,
|
||||
float *y)
|
||||
int mdisp_rot_face_to_crn(
|
||||
MPoly *mpoly, const int face_side, const float u, const float v, float *x, float *y)
|
||||
{
|
||||
const float offset = face_side * 0.5f - 0.5f;
|
||||
int S = 0;
|
||||
|
|
|
@ -3765,7 +3765,6 @@ void BKE_pbvh_sync_visibility_from_verts(PBVH *pbvh, Mesh *mesh)
|
|||
}
|
||||
case PBVH_GRIDS: {
|
||||
const MPoly *mp = BKE_mesh_polys(mesh);
|
||||
const MLoop *mloop = BKE_mesh_loops(mesh);
|
||||
CCGKey key = pbvh->gridkey;
|
||||
|
||||
bool *hide_poly = (bool *)CustomData_get_layer_named(
|
||||
|
@ -3773,10 +3772,9 @@ void BKE_pbvh_sync_visibility_from_verts(PBVH *pbvh, Mesh *mesh)
|
|||
|
||||
bool delete_hide_poly = true;
|
||||
for (int face_index = 0; face_index < mesh->totpoly; face_index++, mp++) {
|
||||
const MLoop *ml = mloop + mp->loopstart;
|
||||
bool hidden = false;
|
||||
|
||||
for (int loop_index = 0; !hidden && loop_index < mp->totloop; loop_index++, ml++) {
|
||||
for (int loop_index = 0; !hidden && loop_index < mp->totloop; loop_index++) {
|
||||
int grid_index = mp->loopstart + loop_index;
|
||||
|
||||
if (pbvh->grid_hidden[grid_index] &&
|
||||
|
|
|
@ -173,7 +173,6 @@ static void get_cols(const CDStreamConfig &config,
|
|||
{
|
||||
const float cscale = 1.0f / 255.0f;
|
||||
const MPoly *polys = config.mpoly;
|
||||
const MLoop *mloops = config.mloop;
|
||||
const MCol *cfaces = static_cast<const MCol *>(cd_data);
|
||||
|
||||
buffer.reserve(config.totvert);
|
||||
|
@ -184,11 +183,9 @@ static void get_cols(const CDStreamConfig &config,
|
|||
for (int i = 0; i < config.totpoly; i++) {
|
||||
const MPoly *p = &polys[i];
|
||||
const MCol *cface = &cfaces[p->loopstart + p->totloop];
|
||||
const MLoop *mloop = &mloops[p->loopstart + p->totloop];
|
||||
|
||||
for (int j = 0; j < p->totloop; j++) {
|
||||
cface--;
|
||||
mloop--;
|
||||
|
||||
col[0] = cface->a * cscale;
|
||||
col[1] = cface->r * cscale;
|
||||
|
|
|
@ -120,7 +120,7 @@ static void uv_warp_compute(void *__restrict userdata,
|
|||
}
|
||||
}
|
||||
else {
|
||||
for (l = 0; l < mp->totloop; l++, ml++, mluv++) {
|
||||
for (l = 0; l < mp->totloop; l++, mluv++) {
|
||||
uv_warp_from_mat4_pair(mluv->uv, mluv->uv, warp_mat);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -674,15 +674,8 @@ static void get_ccgdm_data(DerivedMesh *lodm,
|
|||
|
||||
mpoly = lodm->getPolyArray(lodm) + poly_index;
|
||||
g_index = grid_offset[poly_index];
|
||||
S = mdisp_rot_face_to_crn(lodm->getVertArray(lodm),
|
||||
mpoly,
|
||||
lodm->getLoopArray(lodm),
|
||||
lt,
|
||||
face_side,
|
||||
u * (face_side - 1),
|
||||
v * (face_side - 1),
|
||||
&crn_x,
|
||||
&crn_y);
|
||||
S = mdisp_rot_face_to_crn(
|
||||
mpoly, face_side, u * (face_side - 1), v * (face_side - 1), &crn_x, &crn_y);
|
||||
}
|
||||
else {
|
||||
/* number of faces per grid side */
|
||||
|
|
Loading…
Reference in New Issue