i was trying to import a ply file with per-vertex color but i did not succeeded in.
the python script importing ply seems that correctly understand and parse color but the color do not appear once loaded.
Saving a very simple mesh with vertex color seems to work correctly
(the saved ply is almost ok and can be correctly visualized with for example meshlab after correcting some things in the header like the comment)
Trying to re load this file into blender do not give back the saved colors.
Looking at the python code it seems that this script uses the NMesh deprecated access functions, that according to the documentation (http://www.blender.org/documentation/24 ... odule.html ) when used cause problems with the per vertex color layer:
Are my reasonings correct?Access to data such as properties, library, UVLayers and ColorLayers is not available further more, a mesh modified with NMesh will destroy inactive UV and Color layers so writing tools that use NMesh is discouraged.
Can someone help me to correct this issue?
Here is a simple ply with vertex color as saved by blender (comment at the beginning of the ply removed)
Code: Select all
ply
format ascii 1.0
element vertex 24
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element face 6
property list uchar int vertex_indices
end_header
1.000000 1.000000 -1.000000 17 17 17
1.000000 -1.000000 -1.000000 17 17 17
-1.000000 -1.000000 -1.000000 0 0 0
-1.000000 1.000000 -1.000000 0 0 0
1.000000 0.999999 1.000000 147 147 147
-1.000000 1.000000 1.000000 129 129 129
-1.000000 -1.000000 1.000000 29 29 29
0.999999 -1.000001 1.000000 180 11 11
1.000000 1.000000 -1.000000 17 17 17
1.000000 0.999999 1.000000 147 147 147
0.999999 -1.000001 1.000000 180 11 11
1.000000 -1.000000 -1.000000 17 17 17
1.000000 -1.000000 -1.000000 17 17 17
0.999999 -1.000001 1.000000 180 11 11
-1.000000 -1.000000 1.000000 29 29 29
-1.000000 -1.000000 -1.000000 0 0 0
-1.000000 -1.000000 -1.000000 0 0 0
-1.000000 -1.000000 1.000000 29 29 29
-1.000000 1.000000 1.000000 129 129 129
-1.000000 1.000000 -1.000000 0 0 0
1.000000 0.999999 1.000000 147 147 147
1.000000 1.000000 -1.000000 17 17 17
-1.000000 1.000000 -1.000000 0 0 0
-1.000000 1.000000 1.000000 129 129 129
4 0 1 2 3
4 4 5 6 7
4 8 9 10 11
4 12 13 14 15
4 16 17 18 19
4 20 21 22 23