[Bf-blender-cvs] [11b46ba] alembic_basic_io: Fix vertex colors read/write.

Kévin Dietrich noreply at git.blender.org
Fri Jun 24 00:56:08 CEST 2016


Commit: 11b46ba7ac486f294ddddb188aa30419f4d60f05
Author: Kévin Dietrich
Date:   Thu Jun 23 23:19:59 2016 +0200
Branches: alembic_basic_io
https://developer.blender.org/rB11b46ba7ac486f294ddddb188aa30419f4d60f05

Fix vertex colors read/write.

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

M	source/blender/alembic/intern/abc_customdata.cc

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

diff --git a/source/blender/alembic/intern/abc_customdata.cc b/source/blender/alembic/intern/abc_customdata.cc
index c780a61..8891920 100644
--- a/source/blender/alembic/intern/abc_customdata.cc
+++ b/source/blender/alembic/intern/abc_customdata.cc
@@ -167,10 +167,10 @@ static void write_mcol(const OCompoundProperty &prop, const CDStreamConfig &conf
 			cface--;
 			mloop--;
 
-			col[0] = cface->b * cscale;
-			col[1] = cface->g * cscale;
-			col[2] = cface->r * cscale;
-			col[3] = cface->a * cscale;
+			col[0] = cface->a * cscale;
+			col[1] = cface->r * cscale;
+			col[2] = cface->g * cscale;
+			col[3] = cface->b * cscale;
 
 			buffer[mloop->v] = col;
 		}
@@ -241,10 +241,10 @@ static void read_mcols(const CDStreamConfig &config, void *data,
 				cface--;
 				mloop--;
 				const Imath::C3f &color = (*c3f_ptr)[mloop->v];
-				cface->b = FTOCHAR(color[0]);
-				cface->g = FTOCHAR(color[1]);
-				cface->r = FTOCHAR(color[2]);
-				cface->a = 255;
+				cface->a = FTOCHAR(color[0]);
+				cface->r = FTOCHAR(color[1]);
+				cface->g = FTOCHAR(color[2]);
+				cface->b = 255;
 			}
 		}
 	}
@@ -258,10 +258,10 @@ static void read_mcols(const CDStreamConfig &config, void *data,
 				cface--;
 				mloop--;
 				const Imath::C4f &color = (*c4f_ptr)[mloop->v];
-				cface->b = FTOCHAR(color[0]);
-				cface->g = FTOCHAR(color[1]);
-				cface->r = FTOCHAR(color[2]);
-				cface->a = FTOCHAR(color[3]);
+				cface->a = FTOCHAR(color[0]);
+				cface->r = FTOCHAR(color[1]);
+				cface->g = FTOCHAR(color[2]);
+				cface->b = FTOCHAR(color[3]);
 			}
 		}
 	}




More information about the Bf-blender-cvs mailing list