Added and uploaded.
useMaterial:false in init object ignores mtl.

Second usefull addition to the Obj class this week.
Thx for contributing!

Fabrice

On Aug 11, 2009, at 12:32 AM, Eric Decker wrote:


Something I've run across with the Obj parser is some exporters
include the material reference regardless if a material was applied or
not. So even though there is no linked material, the file will
contain:
  mtllib example.mtl
  usemtl defaultMat
This will cause the parser to break. It's a simple fix (open the obj
file in notepad++ or equivalent and remove those two lines) but it can
become annoying. I think it would be good to have a property in the
Obj parser that can toggle whether or not the parser looks to apply a
material. I think something as simple as modify the following would
suffice, but you guys are the experts:

case "usemtl":
    if (useMaterial) aMeshes[aMeshes.length-1].materialid = trunk[1];
    break;

Anyways, hope this is useful feedback. As always, keep up the good
work.

-Eric

Reply via email to