Browse Source

now taking the alpha is connected aka yellow alpha as a directive to retain the alpha on the result

Asad M. Zaman 20 years ago
parent
commit
502e312092
1 changed files with 4 additions and 1 deletions
  1. 4 1
      pandatool/src/maya/mayaShaderColorDef.cxx

+ 4 - 1
pandatool/src/maya/mayaShaderColorDef.cxx

@@ -261,7 +261,7 @@ read_surface_color(MayaShader *shader, MObject color, bool trans) {
     get_angle_attribute(color, "rotateFrame", _rotate_frame);
 
     get_bool_attribute(color, "alphaIsLuminance", _alpha_is_luminance);
-
+    
     get_bool_attribute(color, "mirror", _mirror);
     get_bool_attribute(color, "stagger", _stagger);
     get_bool_attribute(color, "wrapU", _wrap_u);
@@ -335,6 +335,9 @@ read_surface_color(MayaShader *shader, MObject color, bool trans) {
         // sometimes, by default, maya gives a outAlpha on subsequent plugs, ignore that
         if (pla_name.find("outAlpha") != string::npos) {
           maya_cat.debug() << pl.name() << " ignoring: " << pla_name << endl;
+          // In this case the artist is wanting to retain alpha at the result
+          // So make sure that this alpha is not thrown out by the egg file
+          _alpha_is_luminance = true;
           continue;
         }
         if (!first) {