From ed0136c5bdf119d4b9c33d414b79b17d4ef0317c Mon Sep 17 00:00:00 2001 From: gianpaolopalma Date: Thu, 29 Oct 2015 10:41:21 +0000 Subject: [PATCH] Bug fixed in the save of the color per Face in the ASCII PLY file. --- wrap/io_trimesh/export_ply.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/wrap/io_trimesh/export_ply.h b/wrap/io_trimesh/export_ply.h index 991df549..f6db4803 100644 --- a/wrap/io_trimesh/export_ply.h +++ b/wrap/io_trimesh/export_ply.h @@ -573,14 +573,7 @@ namespace vcg { if( HasPerFaceColor(m) && (pi.mask & Mask::IOM_FACECOLOR) ) { - float t[3]; - t[0] = float(fp->C()[0])/255; - t[1] = float(fp->C()[1])/255; - t[2] = float(fp->C()[2])/255; - fprintf(fpout,"9 "); - fprintf(fpout,"%g %g %g ",t[0],t[1],t[2]); - fprintf(fpout,"%g %g %g ",t[0],t[1],t[2]); - fprintf(fpout,"%g %g %g ",t[0],t[1],t[2]); + fprintf(fpout, "%u %u %u %u ", fp->C()[0], fp->C()[1], fp->C()[2], fp->C()[3]); } else if( HasPerWedgeColor(m) && (pi.mask & Mask::IOM_WEDGCOLOR) ) {