Fix bug in previous commit

Differential Revision: https://developer.blender.org/D4655
This commit is contained in:
Robert Guetzkow 2019-04-05 19:00:18 +02:00 committed by Jacques Lucke
parent b9ba95de27
commit 71846207f1
1 changed files with 1 additions and 1 deletions

View File

@ -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]