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

Update output comments to print first line if multiple characters exist #9

Closed

Conversation

bfrymire
Copy link

Fixes #8

@bfrymire
Copy link
Author

Given the previous example .obj file header:

####
#
# OBJ File Generated by Meshlab
#
####
# Object voronoi.obj
#
# Vertices: 763
# Faces: 88
#
####

The comment lines will be printed out instead of showing a warning message. For example:

DotobjModelLoad(): "###"
DotobjModelLoad(): ""
DotobjModelLoad(): "OBJ File Generated by Meshlab"
DotobjModelLoad(): ""
DotobjModelLoad(): "###"
DotobjModelLoad(): "Object voronoi.obj"
DotobjModelLoad(): ""
DotobjModelLoad(): "Vertices: 763"
DotobjModelLoad(): "Faces: 88"
DotobjModelLoad(): ""
DotobjModelLoad(): "###"
@JujuAdams
Copy link
Owner

I wasn't aware of this at the time, but treating all lines that start with # will cause problems as some 3D packages use # prefixed lines to add additional data, e.g. #MRGB to define vertex colours.

(Also you should be checking for # prefix in the default case rather than for every single line.)

@JujuAdams JujuAdams closed this Apr 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants