Fix error in recent fix for T77290
This commit is contained in:
parent
b94ab93dfb
commit
67b10fcc22
|
@ -2152,15 +2152,7 @@ static void *extract_vcol_init(const MeshRenderData *mr, void *buf)
|
|||
CustomData *cd_ldata = (mr->extract_type == MR_EXTRACT_BMESH) ? &mr->bm->ldata : &mr->me->ldata;
|
||||
uint32_t vcol_layers = mr->cache->cd_used.vcol;
|
||||
|
||||
/* HACK to fix T68857 */
|
||||
if (mr->extract_type == MR_EXTRACT_BMESH && mr->cache->cd_used.edit_uv == 1) {
|
||||
int layer = CustomData_get_active_layer(cd_ldata, CD_MLOOPUV);
|
||||
if (layer != -1) {
|
||||
vcol_layers |= (1 << layer);
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i < 8; i++) {
|
||||
for (int i = 0; i < MAX_MCOL; i++) {
|
||||
if (vcol_layers & (1 << i)) {
|
||||
char attr_name[32], attr_safe_name[GPU_MAX_SAFE_ATTR_NAME];
|
||||
const char *layer_name = CustomData_get_layer_name(cd_ldata, CD_MLOOPCOL, i);
|
||||
|
@ -2192,7 +2184,7 @@ static void *extract_vcol_init(const MeshRenderData *mr, void *buf)
|
|||
} gpuMeshVcol;
|
||||
|
||||
gpuMeshVcol *vcol_data = (gpuMeshVcol *)vbo->data;
|
||||
for (int i = 0; i < 8; i++) {
|
||||
for (int i = 0; i < MAX_MCOL; i++) {
|
||||
if (vcol_layers & (1 << i)) {
|
||||
if (mr->extract_type == MR_EXTRACT_BMESH) {
|
||||
int cd_ofs = CustomData_get_n_offset(cd_ldata, CD_MLOOPCOL, i);
|
||||
|
|
Loading…
Reference in New Issue