Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Blender importer failing to import files that used to work #2016

Closed
jamesdolan opened this issue Jun 14, 2018 · 4 comments
Closed

Blender importer failing to import files that used to work #2016

jamesdolan opened this issue Jun 14, 2018 · 4 comments

Comments

@jamesdolan
Copy link

jamesdolan commented Jun 14, 2018

When updating to latest master, Blender files that used to load no longer do with error output similar to the following...

assimp: Info,  T0: Load $$$___magic___$$$.
assimp: Info,  T0: Found a matching importer for this file format: Blender 3D Importer 
http://www.blender3d.org.
assimp: Info,  T0: Import root directory is './'
assimp: Info,  T0: BLEND: Blender version is 2.79 (64bit: true, little endian: true)
assimp: Info,  T0: BlenderDNA: Dumped dna to dna.txt
assimp: Warn,  T0: <add reason>
assimp: Skipping one or more lines with the same contents
assimp: Warn,  T0: BlendDNA: Did not find a field named `flags` in structure `Lamp`
assimp: Info,  T0: (Stats) Fields read: 701060, pointers resolved: 269, cache hits: 17166, cached objects: 113
**assimp: Error, T0: Validation failed: The mesh SomeMeshName contains no vertices**

...and if I open the file in blender and look at the offending mesh (e.g. 'SomeMeshName') does indeed have verts (44 tris, 84 verts). And if I roll back to an older assimp, the particular mesh in question does get loaded without issue and is visible.

Previously was using this version: https://github.com/assimp/assimp/tree/45892d7fe99c6c35d89f491af43f313e84e1e395

@jamesdolan
Copy link
Author

Attached is a file that reproduces the issue.
test.blend.zip

@CwTCwT
Copy link
Contributor

CwTCwT commented Jun 16, 2018

can/should i check this issue (reproduce and find the bug)?
maybe related to my fix, added unit test and checking

@CwTCwT
Copy link
Contributor

CwTCwT commented Jun 16, 2018

@jamesdolan i issued a pullrequest to solve this issue, caused by newly added CustomData support (base cause is somehow strange design: number of vertices (re)set when setting UVs, i commented the belonging part in the CustomData pullrequest).
verified number of faces (44) but number of vertices were different in unittests result (132 <> 84), assuming you used some setting to minimize number of result vertices.
in unittest file is only loaded with aiProcess_ValidateDataStructure.
added your blender file to unittest, hope this is ok?!
every additional blend file to support unittesting makes the lib better and more reliable.
#2022

@jamesdolan
Copy link
Author

Thanks! For reference my loading flags are aiProcessPreset_TargetRealtime_MaxQuality | aiProcess_PreTransformVertices

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants