[Bf-extensions-cvs] [71846207] master: Fix bug in previous commit
Robert Guetzkow
noreply at git.blender.org
Fri Apr 5 19:00:48 CEST 2019
Commit: 71846207f1e6fcff541558ebcb69323fc8885df2
Author: Robert Guetzkow
Date: Fri Apr 5 19:00:18 2019 +0200
Branches: master
https://developer.blender.org/rBA71846207f1e6fcff541558ebcb69323fc8885df2
Fix bug in previous commit
Differential Revision: https://developer.blender.org/D4655
===================================================================
M io_mesh_ply/import_ply.py
===================================================================
diff --git a/io_mesh_ply/import_ply.py b/io_mesh_ply/import_ply.py
index c03f00a0..0e02951e 100644
--- a/io_mesh_ply/import_ply.py
+++ b/io_mesh_ply/import_ply.py
@@ -255,9 +255,9 @@ def load_ply_mesh(filepath, ply_name):
else:
colindices = el.index(b'red'), el.index(b'green'), el.index(b'blue'), el.index(b'alpha')
if -1 in colindices:
- colindices = None
if any(idx > -1 for idx in colindices):
print("Warning: At least one obligatory color channel is missing, ignoring vertex colors.")
+ colindices = None
else: # if not a float assume uchar
colmultiply = [1.0 if el.properties[i].numeric_type in {'f', 'd'} else (1.0 / 255.0) for i in colindices]
More information about the Bf-extensions-cvs
mailing list