fix T44884: corrected a wrong usage of the CustomLayer API (due to a misunderstanding)

This commit is contained in:
Gaia Clary 2015-05-30 14:18:35 +02:00
parent 0a4bf5317f
commit a5a1d4aa3a
Notes: blender-bot 2023-02-14 11:34:30 +01:00
Referenced by issue #44884, Collada: Last listed UV map not exported if "Only Selected Selected UV  map" is checked.
1 changed files with 3 additions and 3 deletions

View File

@ -530,10 +530,10 @@ void GeometryExporter::createTexcoordsSource(std::string geom_id, Mesh *me)
// write <source> for each layer
// each <source> will get id like meshName + "map-channel-1"
int active_uv_index = CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV) -1;
int active_uv_index = CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV);
for (int a = 0; a < num_layers; a++) {
if (!this->export_settings->active_uv_only || a == active_uv_index) {
int layer_index = CustomData_get_layer_index_n(&me->ldata, CD_MLOOPUV, a);
if (!this->export_settings->active_uv_only || layer_index == active_uv_index) {
MLoopUV *mloops = (MLoopUV *)CustomData_get_layer_n(&me->ldata, CD_MLOOPUV, a);
COLLADASW::FloatSourceF source(mSW);