[PATCH] Ogre importer needs check for "vertexcolour" on "emissive" statements

Using blender2ogre 0.5.8, I generated a material that used “vertexcolour” as the value for its “emissive” statement.

Looking through the code for the Ogre Importer, I noticed that while user “ShadowIsLord” made an update in revision 7446 that addresses this value for “ambient” and “diffuse”, “emissive” was not fixed.



I tested this change against my exported materials file, and it worked as desired.



Location: enginesrcogrecomjme3scenepluginsogreMaterialLoader.java





Index: MaterialLoader.java

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

— MaterialLoader.java (revision 9975)

+++ MaterialLoader.java (working copy)

@@ -225,7 +225,12 @@

ambient = readColor(split[1]);

}

}else if (keyword.equals(“emissive”)){

  •        emissive = readColor(split[1]);<br />
    
  •        if (split[1].equals("vertexcolour")){<br />
    
  •            // use vertex colors<br />
    
  •            emissive = ColorRGBA.White;<br />
    
  •        }else{<br />
    
  •            emissive = readColor(split[1]);<br />
    
  •        }<br />
    

}else if (keyword.equals(“specular”)){

String[] subsplit = split[1].split("\s");

specular = new ColorRGBA();