[Bf-extensions-cvs] [3e19e71] master: Fix T40069: PLY import vertex colour scaling.

Bastien Montagne noreply at git.blender.org
Wed May 7 19:23:12 CEST 2014


Commit: 3e19e7145fcf53d8331cf9c3e940e8aa866575d1
Author: Bastien Montagne
Date:   Wed May 7 19:09:03 2014 +0200
https://developer.blender.org/rBA3e19e7145fcf53d8331cf9c3e940e8aa866575d1

Fix T40069: PLY import vertex colour scaling.

devide chars by 255, not 256...

===================================================================

M	io_mesh_ply/import_ply.py

===================================================================

diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index 5d4f824..7d16be1 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -239,7 +239,7 @@ def load_ply_mesh(filepath, ply_name):
             if -1 in colindices:
                 colindices = None
             else:  # if not a float assume uchar
-                colmultiply = [1.0 if el.properties[i].numeric_type in {'f', 'd'} else (1.0 / 256.0) for i in colindices]
+                colmultiply = [1.0 if el.properties[i].numeric_type in {'f', 'd'} else (1.0 / 255.0) for i in colindices]
 
         elif el.name == b'face':
             findex = el.index(b'vertex_indices')



More information about the Bf-extensions-cvs mailing list