jonnenauha / obj-simplify

Object File (.obj) simplifier
MIT License
133 stars 16 forks source link

Comments (#) aren't supported. #8

Closed figgles closed 5 years ago

figgles commented 5 years ago

According to the OBJ spec linked on the main page, comment lines should be ignored, but they aren't. Instead, the program just bombs:

[FATAL] line:4 Unsupported line "#98 vertices, 124 faces"

Please submit a bug report. If you can, provide this file as an attachement.
> https://github.com/jonnenauha/obj-simplify/issues
jonnenauha commented 5 years ago

It is supported https://github.com/jonnenauha/obj-simplify/blob/master/objectfile/structs.go#L93-L96

But seems that if there is no space after the # it will bork https://github.com/jonnenauha/obj-simplify/blob/e8ec72272091c159b4ad553e1159f46ba446e55b/obj-parser.go#L194-L201

Thanks for the report, I'll fix it.

jonnenauha commented 5 years ago

I made a release with this fix included https://github.com/jonnenauha/obj-simplify/releases/tag/1.1