diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-12-01 16:18:11 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2018-12-01 16:18:35 +0300 |
commit | 0606829850a169e1be5d268674f77c016f5640eb (patch) | |
tree | 2123d166dda95db8442d97eaa455947dd4d6e829 /source/blender/collada | |
parent | 02a4fc139597cae8c7002fd5a6e4b16171314cc5 (diff) |
fix T58293 Collada: Does not export Texture coordinates when option 'only selected UV Map' is enabled
Diffstat (limited to 'source/blender/collada')
-rw-r--r-- | source/blender/collada/GeometryExporter.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp index a82d07d53dd..bb69c3fc653 100644 --- a/source/blender/collada/GeometryExporter.cpp +++ b/source/blender/collada/GeometryExporter.cpp @@ -349,13 +349,14 @@ void GeometryExporter::createPolylist(short material_index, int num_layers = CustomData_number_of_layers(&me->ldata, CD_MLOOPUV); int active_uv_index = CustomData_get_active_layer_index(&me->ldata, CD_MLOOPUV); for (i = 0; i < num_layers; i++) { - if (!this->export_settings->active_uv_only || i == active_uv_index) { + int layer_index = CustomData_get_layer_index_n(&me->ldata, CD_MLOOPUV, i); + if (!this->export_settings->active_uv_only || layer_index == active_uv_index) { // char *name = CustomData_get_layer_name(&me->ldata, CD_MLOOPUV, i); COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD, makeUrl(makeTexcoordSourceId(geom_id, i, this->export_settings->active_uv_only)), 2, // this is only until we have optimized UV sets - (this->export_settings->active_uv_only) ? 0 : i // only_active_uv exported -> we have only one set + (this->export_settings->active_uv_only) ? 0 : layer_index // only_active_uv exported -> we have only one set ); til.push_back(input3); } |