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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-20 18:40:49 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-20 18:40:49 +0300
commita52452c043b34c664f2772a6f72b886ac641acd7 (patch)
tree6ccdbd0cd6258ede7fc0967b926a323e91365360 /source/blender/alembic
parentf6766c31cf6c6b7c5d723a0e901d851de1046298 (diff)
parent3474db4b37e75150924d3cec73472ad3eadea4cb (diff)
Merge branch 'master' into blender2.8
Diffstat (limited to 'source/blender/alembic')
-rw-r--r--source/blender/alembic/intern/abc_customdata.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index d6e7a80d174..8b526616053 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -235,17 +235,19 @@ static void read_uvs(const CDStreamConfig &config, void *data,
MPoly *mpolys = config.mpoly;
MLoopUV *mloopuvs = static_cast<MLoopUV *>(data);
- unsigned int uv_index, loop_index;
+ unsigned int uv_index, loop_index, rev_loop_index;
for (int i = 0; i < config.totpoly; ++i) {
MPoly &poly = mpolys[i];
+ unsigned int rev_loop_offset = poly.loopstart + poly.totloop - 1;
for (int f = 0; f < poly.totloop; ++f) {
loop_index = poly.loopstart + f;
+ rev_loop_index = rev_loop_offset - f;
uv_index = (*indices)[loop_index];
const Imath::V2f &uv = (*uvs)[uv_index];
- MLoopUV &loopuv = mloopuvs[loop_index];
+ MLoopUV &loopuv = mloopuvs[rev_loop_index];
loopuv.uv[0] = uv[0];
loopuv.uv[1] = uv[1];
}