Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/collada/GeometryExporter.cpp')
-rw-r--r--source/blender/collada/GeometryExporter.cpp5
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);
}