Index: branches/gui/src/lib/graphics/importer/material.cc
===================================================================
--- branches/gui/src/lib/graphics/importer/material.cc	(revision 8571)
+++ branches/gui/src/lib/graphics/importer/material.cc	(revision 8572)
@@ -431,20 +431,29 @@
 
 
+/**
+ * @param blendFunc the Enumerator to convert to a String.
+ * @returns the matching String if found
+ */
 const std::string& Material::blendFuncToString(GLenum blendFunc)
 {
   for (unsigned int i = 0; i < 9; ++i)
-    if (blendFunc == glBlendFuncParams[i])
-      return blendFuncNames[i];
-  return blendFuncNames[0];
-}
-
+    if (blendFunc == Material::glBlendFuncParams[i])
+      return Material::blendFuncNames[i];
+  PRINTF(2)("Supplied an Invalid Enumerator to blendfunc %d\n", blendFunc);
+  return Material::blendFuncNames[0];
+}
+
+/**
+ * @param blendFuncString the String to convert into a gl-enumeration
+ * @returns the matching GL-enumeration if found.
+ */
 GLenum Material::stringToBlendFunc(const std::string& blendFuncString)
 {
   for (unsigned int i = 0; i < 9; ++i)
-    if (blendFuncString == blendFuncNames[i])
-      return glBlendFuncParams[i];
-  return glBlendFuncParams[0];
-}
-
+    if (blendFuncString == Material::blendFuncNames[i])
+      return Material::glBlendFuncParams[i];
+  PRINTF(2)("BlendFunction %s not recognized using %s\n", blendFuncString.c_str(), Material::blendFuncNames[0].c_str());
+  return Material::glBlendFuncParams[0];
+}
 
 
Index: branches/gui/src/lib/graphics/importer/material.h
===================================================================
--- branches/gui/src/lib/graphics/importer/material.h	(revision 8571)
+++ branches/gui/src/lib/graphics/importer/material.h	(revision 8572)
@@ -24,70 +24,70 @@
 class Material : public BaseObject
 {
-  public:
-    Material (const std::string& mtlName = "");
-    virtual ~Material ();
+public:
+  Material (const std::string& mtlName = "");
+  virtual ~Material ();
 
-    void loadParams(const TiXmlElement* root);
+  void loadParams(const TiXmlElement* root);
 
-    Material& operator=(const Material& material);
+  Material& operator=(const Material& material);
 
-    bool select () const;
-    bool activateTextureUnit(unsigned int textureNumber);
-    static void unselect();
+  bool select () const;
+  bool activateTextureUnit(unsigned int textureNumber);
+  static void unselect();
 
-    void setIllum (int illum);
-    int getIllumModel() const { return this->illumModel; };
+  void setIllum (int illum);
+  int getIllumModel() const { return this->illumModel; };
 
-    void setDiffuse (float r, float g, float b);
-    void setDiffuseColor(const Color& diffuseColor) { this->diffuse = diffuseColor; };
-    void setAmbient (float r, float g, float b);
-    void setSpecular (float r, float g, float b);
-    void setShininess (float shini);
-    void setTransparency (float trans);
-    void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
-    void setBlendFuncS(const std::string& sFactor, const std::string& tFactor);
+  void setDiffuse (float r, float g, float b);
+  void setDiffuseColor(const Color& diffuseColor) { this->diffuse = diffuseColor; };
+  void setAmbient (float r, float g, float b);
+  void setSpecular (float r, float g, float b);
+  void setShininess (float shini);
+  void setTransparency (float trans);
+  void setBlendFunc(GLenum sFactor, GLenum tFactor) { this->sFactor = sFactor; this->tFactor = tFactor; };
+  void setBlendFuncS(const std::string& sFactor, const std::string& tFactor);
 
-    const Color& getDiffuseColor() const { return diffuse; };
+  const Color& diffuseColor() const { return diffuse; };
 
-    // MAPPING //
-    void setDiffuseMap(const Texture& texture, unsigned int textureNumber = 0);
-    void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
-    void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
-    void renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
+  // MAPPING //
+  void setDiffuseMap(const Texture& texture, unsigned int textureNumber = 0);
+  void setDiffuseMap(const std::string& dMap, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
+  void setSDLDiffuseMap(SDL_Surface *surface, GLenum target = GL_TEXTURE_2D, unsigned int textureNumber = 0);
+  void renderToTexture(unsigned int textureNumber, GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
 
-    void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
-    void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
-    void setBump(const std::string& bump);
-    GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
+  void setAmbientMap(const std::string& aMap, GLenum target = GL_TEXTURE_2D);
+  void setSpecularMap(const std::string& sMap, GLenum target = GL_TEXTURE_2D);
+  void setBump(const std::string& bump);
+  GLuint getDiffuseTexture(unsigned int i = 0) const { return (this->textures.size() > i)? this->textures[i].getTexture() : 0; };
 
-    static void addTexturePath(const std::string& pathName);
+  static void addTexturePath(const std::string& pathName);
 
-    const std::string& blendFuncToString(GLenum blendFunc);
-    GLenum stringToBlendFunc(const std::string& blendFuncString);
+  const std::string& blendFuncToString(GLenum blendFunc);
+  GLenum stringToBlendFunc(const std::string& blendFuncString);
 
 
-  public:
-    static const GLenum glTextureArbs[];  //!< The Texture ARB's
+public:
+  static const GLenum glTextureArbs[];  //!< The Texture ARB's
 
-    static const GLenum glBlendFuncParams[];
-    static const std::string blendFuncNames[];
+  static const GLenum glBlendFuncParams[];
+  static const std::string blendFuncNames[];
 
-    static unsigned int getMaxTextureUnits();
+  static unsigned int getMaxTextureUnits();
 
-  private:
-    static const Material* selectedMaterial; //!< The currently selected material.
+private:
+  static const Material* selectedMaterial; //!< The currently selected material.
 
-    int              illumModel;       //!< The IlluminationModel is either flat or smooth.
-    Color            diffuse;          //!< The diffuse color of the Material. (also transparency.)
-    Color            ambient;          //!< The ambient color of the Material.
-    Color            specular;         //!< The specular color of the Material.
-    float            shininess;        //!< The shininess of the Material.
-    GLenum           sFactor;          //!< The Blending Factor for the Source.
-    GLenum           tFactor;          //!< The Blending Factor for the Destination.
+  int              illumModel;       //!< The IlluminationModel is either flat or smooth.
+  Color            diffuse;          //!< The diffuse color of the Material. (also transparency.)
+  Color            ambient;          //!< The ambient color of the Material.
+  Color            specular;         //!< The specular color of the Material.
+  float            shininess;        //!< The shininess of the Material.
+  GLenum           sFactor;          //!< The Blending Factor for the Source.
+  GLenum           tFactor;          //!< The Blending Factor for the Destination.
 
-    std::vector<Texture> textures;     //!< An Array of Textures.
+  std::vector<Texture> textures;     //!< An Array of Textures.
 
-    Texture*         ambientTexture;   //!< The ambient texture of the Material.
-    Texture*         specularTexture;  //!< The specular texture of the Material.
+  Texture*         ambientTexture;   //!< The ambient texture of the Material.
+  Texture*         specularTexture;  //!< The specular texture of the Material.
 };
 
