raksahb / saitoobjloader

Automatically exported from code.google.com/p/saitoobjloader
0 stars 0 forks source link

material reference fails when loading object from within a class #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. call model.load() within an object class
2. call model.draw()

What is the expected output? What do you see instead?
  I expect that the object(s) would be displayed without materials and triggering zero erros. The console triggers a null pointer error on the material file, in spite of the initial materials on the model being disabled. After running for about a minute, noticeable lag occurs in the model navigation.

What version of the product are you using? On what operating system?
saitoobjloader revision 18 on mac OS 10.6.

Please provide any additional information below.
The attached document uses the peasycam library, which is not included but 
easily removed/replaced.

The first line from the error below, copied from the console, is in white 
(triggered by saitoobjloader) and the remainder are red (processing-triggered):
Could not find this file (null).mtl

java.lang.NullPointerException
    at saito.objloader.OBJModel.parseMTL(OBJModel.java:978)
    at saito.objloader.OBJModel.parseOBJ(OBJModel.java:801)
    at saito.objloader.OBJModel.load(OBJModel.java:686)
    at classWithOBJimport$IndexedObject.renderObj(classWithOBJimport.java:93)
    at classWithOBJimport.draw(classWithOBJimport.java:47)
    at processing.core.PApplet.handleDraw(PApplet.java:1426)
    at processing.core.PApplet.run(PApplet.java:1328)
    at java.lang.Thread.run(Thread.java:637)
(null).mtl does not exist or could not be read

Original issue reported on code.google.com by spencer....@gmail.com on 7 Jul 2010 at 9:06

Attachments:

GoogleCodeExporter commented 9 years ago
n00b mistake, I didn't check the .obj file which was causing the problem. The 
material reference was (null).mtl and other sketches I've used this file in 
never triggered an error.

Apologies, but thanks for the really great library! I'll notify you of the 
final results when finished.

Original comment by spencer....@gmail.com on 7 Jul 2010 at 10:30

GoogleCodeExporter commented 9 years ago
No worries spencer. Glad you like it.

Original comment by mattdit...@gmail.com on 12 Jul 2010 at 1:02

GoogleCodeExporter commented 9 years ago

Original comment by mattdit...@gmail.com on 12 Jul 2010 at 1:02