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:
authorCampbell Barton <ideasman42@gmail.com>2017-09-29 11:16:13 +0300
committerCampbell Barton <ideasman42@gmail.com>2017-09-29 11:18:56 +0300
commit1542092295c92adfaff687050a74cd7c34747c22 (patch)
treed623a0f4c9dfdb92bcb13f761e7b0c75066adf06 /io_mesh_ply/export_ply.py
parent88f0d4f89e03da4b6972c1b17569f668d98b06ea (diff)
I/O script changes for GSoC 2017 Vertex Paint
These are changes to the ply and fbx export functions, and the ply import function, to deal with vertex color alphas as implemented in the GSoC 2017 Vertex Paint project - see T52910 & D2855
Diffstat (limited to 'io_mesh_ply/export_ply.py')
-rw-r--r--io_mesh_ply/export_ply.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/io_mesh_ply/export_ply.py b/io_mesh_ply/export_ply.py
index d4db5710..8de5d674 100644
--- a/io_mesh_ply/export_ply.py
+++ b/io_mesh_ply/export_ply.py
@@ -154,7 +154,8 @@ def save_mesh(filepath,
if use_colors:
fw("property uchar red\n"
"property uchar green\n"
- "property uchar blue\n")
+ "property uchar blue\n"
+ "property uchar alpha\n")
fw("element face %d\n" % len(mesh.tessfaces))
fw("property list uchar uint vertex_indices\n")
@@ -167,7 +168,7 @@ def save_mesh(filepath,
if use_uv_coords:
fw(" %.6f %.6f" % v[2]) # uv
if use_colors:
- fw(" %u %u %u" % v[3]) # col
+ fw(" %u %u %u %u" % v[3]) # col
fw("\n")
for pf in ply_faces: