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:
authorGaia Clary <gaia.clary@machinimatrix.org>2012-08-16 02:08:22 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2012-08-16 02:08:22 +0400
commit417e99df22241d05179671d2f7198343c60d118b (patch)
treed19042686b74706ea03d79bb5088ac1a2f4a4d66 /source/blender/collada/GeometryExporter.cpp
parent597e6f9bbc7bf08150e81356f734b33c5e05ce68 (diff)
Collada: fixed export when 'active UV Layer only' was selected
Diffstat (limited to 'source/blender/collada/GeometryExporter.cpp')
-rw-r--r--source/blender/collada/GeometryExporter.cpp19
1 files changed, 11 insertions, 8 deletions
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index 29ffcf53ee9..c7ad2ff3975 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -279,15 +279,18 @@ void GeometryExporter::createPolylist(short material_index,
// if mesh has uv coords writes <input> for TEXCOORD
int num_layers = CustomData_number_of_layers(&me->fdata, CD_MTFACE);
-
+ int active_uv_index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE)-1;
for (i = 0; i < num_layers; i++) {
- // char *name = CustomData_get_layer_name(&me->fdata, CD_MTFACE, i);
- COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD,
- makeUrl(makeTexcoordSourceId(geom_id, i)),
- 2, // offset always 2, this is only until we have optimized UV sets
- i // set number equals UV map index
- );
- til.push_back(input3);
+ if (!this->export_settings->active_uv_only || i == active_uv_index) {
+
+ // char *name = CustomData_get_layer_name(&me->fdata, CD_MTFACE, i);
+ COLLADASW::Input input3(COLLADASW::InputSemantic::TEXCOORD,
+ makeUrl(makeTexcoordSourceId(geom_id, i)),
+ 2, // offset always 2, this is only until we have optimized UV sets
+ i // set number equals UV map index
+ );
+ til.push_back(input3);
+ }
}
if (has_color) {