[Bf-blender-cvs] [a5a1d4a] master: fix T44884: corrected a wrong usage of the CustomLayer API (due to a misunderstanding)
Gaia Clary
noreply at git.blender.org
Sat May 30 14:20:13 CEST 2015
Commit: a5a1d4aa3a26f1660c09aa2b09eb033f594af2c5
Author: Gaia Clary
Date: Sat May 30 14:18:35 2015 +0200
Branches: master
https://developer.blender.org/rBa5a1d4aa3a26f1660c09aa2b09eb033f594af2c5
fix T44884: corrected a wrong usage of the CustomLayer API (due to a misunderstanding)
===================================================================
M source/blender/collada/GeometryExporter.cpp
===================================================================
diff --git a/source/blender/collada/GeometryExporter.cpp b/source/blender/collada/GeometryExporter.cpp
index 4dd6bb7..7c7c57f 100644
--- a/source/blender/collada/GeometryExporter.cpp
+++ b/source/blender/collada/GeometryExporter.cpp
@@ -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);
More information about the Bf-blender-cvs
mailing list