Jethvasagar4 / min3d

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

Bug in ObjectParser when try to load blender 3ds files #74

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Create a model in Blender
2. Export the model as 3ds file
3. Try to load the file with ExampleLoad3DSFile

What is the expected output? What do you see instead?
An IndexOutOfBoundsException appears. The bug has been resolved in file 
min3d.parser.ParseObjectData.java. Implement checks for the length of the 
affected arrays (lines 74 & 75):
Uv newUv = face.hasuv && texCoords.size() > face.uv[j] ? 
texCoords.get(face.uv[j]).clone() : new Uv();
Number3d newNormal = face.hasn && normals.size() > face.n[j] ? 
normals.get(face.n[j]) : new Number3d();

What version of the product are you using? On what operating system?
actual trunk, Win7

Thank you for your great work!

Original issue reported on code.google.com by tobineumann.eu on 21 Jan 2012 at 4:46