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

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDalai Felinto <dfelinto@gmail.com>2012-03-19 22:52:42 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-03-19 22:52:42 +0400
commitf59365ca19ed28e995828d96a4165218aeddace9 (patch)
tree953ba845a98ea18cd21cb37c365fac05d6b4c002 /io_mesh_ply/export_ply.py
parent63f0a48fad810818d226530916ec495bc6c17623 (diff)
'bugfix' .ply import/export scripts flip V texture coordinate
.PLY has no specification for how to represent the texture coordinates. The general guideline is to implement this the way is more convenient for the software (this it makes no sense to flip what Blender does internally). Also, there are some softwares that used to flip V in the past for .ply. This has changed though, and from what I could find in the internet, the current standard is to have the V opposite to what we have in Blender. Finally I used meshlab for my tests - http://meshlab.sourceforge.net/ Their sample files (the dount one) shows flipped V in blender. I hope no one gets unhappy with this commit.
Diffstat (limited to 'io_mesh_ply/export_ply.py')
-rw-r--r--io_mesh_ply/export_ply.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index 0845301a..cfadfbae 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -129,10 +129,10 @@ def save(operator,
normal_key = rvec3d(normal)
if has_uv:
- uvcoord = uv[j][0], 1.0 - uv[j][1]
+ uvcoord = uv[j][0], uv[j][1]
uvcoord_key = rvec2d(uvcoord)
elif has_uv_vertex:
- uvcoord = v.uvco[0], 1.0 - v.uvco[1]
+ uvcoord = v.uvco[0], v.uvco[1]
uvcoord_key = rvec2d(uvcoord)
if has_vcol: