Collada: fixed export when 'active UV Layer only' was selected
[blender.git] / source / blender / collada / InstanceWriter.cpp
index be45d5295e5d9a4c6daf392aa74f4d27eae4698b..71371d280dfdb75c607b6b293638400413a76a61 100644 (file)
@@ -63,7 +63,7 @@ void InstanceWriter::add_material_bindings(COLLADASW::BindMaterial& bind_materia
                        int active_uv_index = CustomData_get_active_layer_index(&me->fdata, CD_MTFACE) -1;
                        for (int b = 0; b < totlayer; b++) {
                                if (!active_uv_only || b == active_uv_index) {
-                                       char *name = bc_CustomData_get_layer_name(&me->fdata, CD_MTFACE, map_index);
+                                       char *name = bc_CustomData_get_layer_name(&me->fdata, CD_MTFACE, b);
                                        im.push_back(COLLADASW::BindVertexInput(name, "TEXCOORD", map_index++));
                                }
                        }