[Bf-blender-cvs] [27641b5] master: Collada: changed specification of material alpha from using transparency to using transparent with opaque=A_ONE

Gaia Clary noreply at git.blender.org
Fri Jul 15 16:15:16 CEST 2016


Commit: 27641b51e7acef323a88f5cf96eac1229175eb55
Author: Gaia Clary
Date:   Fri Jul 15 16:12:39 2016 +0200
Branches: master
https://developer.blender.org/rB27641b51e7acef323a88f5cf96eac1229175eb55

Collada: changed specification of material alpha from using transparency to using transparent with opaque=A_ONE

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

M	source/blender/collada/EffectExporter.cpp

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

diff --git a/source/blender/collada/EffectExporter.cpp b/source/blender/collada/EffectExporter.cpp
index 13dc1ed..76b5114 100644
--- a/source/blender/collada/EffectExporter.cpp
+++ b/source/blender/collada/EffectExporter.cpp
@@ -30,6 +30,7 @@
 #include <set>
 
 #include "COLLADASWEffectProfile.h"
+#include "COLLADAFWColorOrTexture.h"
 
 #include "EffectExporter.h"
 #include "DocumentExporter.h"
@@ -217,9 +218,9 @@ void EffectsExporter::operator()(Material *ma, Object *ob)
 	// transparency
 	if (ma->mode & MA_TRANSP) {
 		// Tod: because we are in A_ONE mode transparency is calculated like this:
-		ep.setTransparency(ma->alpha, false, "transparency");
-		// cot = getcol(1.0f, 1.0f, 1.0f, 1.0f);
-		// ep.setTransparent(cot);
+		cot = getcol(1.0f, 1.0f, 1.0f, ma->alpha);
+		ep.setTransparent(cot);
+		ep.setOpaque(COLLADASW::EffectProfile::A_ONE);
 	}
 
 	// emission




More information about the Bf-blender-cvs mailing list