From 3e19e7145fcf53d8331cf9c3e940e8aa866575d1 Mon Sep 17 00:00:00 2001
From: Bastien Montagne <montagne29@wanadoo.fr>
Date: Wed, 7 May 2014 19:09:03 +0200
Subject: [PATCH] Fix T40069: PLY import vertex colour scaling.

devide chars by 255, not 256...
---
 io_mesh_ply/import_ply.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index 5d4f8244a..7d16be1f3 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')
-- 
GitLab