Sigmmma / mek

GNU General Public License v3.0
13 stars 5 forks source link

Add a script for converting WRL to OBJ #10

Closed csauve closed 4 years ago

csauve commented 4 years ago

The WRL files produced by tool are a useful debugging tool but can't be imported by Blender. I've added a simple text-transforming script to reformat the line segments contained in the WRL as OBJ lines. These appear as floating edges when imported to Blender. Usage described in included README.md.

Limitations

It's a pretty quick hack job, so it doesn't cover cases where the points list spans multiple lines (a case which I've just noticed after writing this) and doesn't construct faces from IndexedFaceSet, so this is mostly useful for open edges and other local degenerate cases. Errors are not highlighted by the colour either.

ShellyHerself commented 4 years ago

So, first off, I really appreciate the contribution.

But have you tried enabling VRML import in Blender in the settings? It seems to be an optional addon that comes shipped by default.

Or is this an issue with Blender's importer being 2.0 and not supporting 1.0? Screenshot_20200303_145723

ShellyHerself commented 4 years ago

Okay yeah, that's weird it just silently doesn't import Halo wrl files with that addon. That's stupid.

Could you add your author info somewhere?

csauve commented 4 years ago

I've implemented the change requests and rewritten the parser to not be a regex hack job. The script contains a grammar and what I've learned about the WRL format.