diff options
author | Aras Pranckevicius <aras@nesnausk.org> | 2022-05-05 15:01:28 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-05-05 15:01:28 +0300 |
commit | 48f75747167d7b23c0c5b045d4b0cc5836900a12 (patch) | |
tree | 1d7683f6864998018a17c4d73fbf092e509b5c8f /source | |
parent | ad119d327e5b07086113cfc8873220dfc4807b01 (diff) | |
parent | 1830a3dfb5a1b5028c934d3dcc790da1d9ea67d0 (diff) |
Merge branch 'blender-v3.2-release'
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc index f88b3e143a6..be322f49840 100644 --- a/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc +++ b/source/blender/io/wavefront_obj/importer/obj_import_file_reader.cc @@ -128,6 +128,7 @@ static void geom_add_polygon(Geometry *geom, curr_face.start_index_ = orig_corners_size; bool face_valid = true; + line = drop_whitespace(line); while (!line.is_empty() && face_valid) { PolyCorner corner; bool got_uv = false, got_normal = false; @@ -399,6 +400,7 @@ void OBJParser::parse(Vector<std::unique_ptr<Geometry>> &r_all_geometries, StringRef buffer_str{buffer.data(), (int64_t)last_nl}; while (!buffer_str.is_empty()) { StringRef line = read_next_line(buffer_str); + line = drop_whitespace(line); ++line_number; if (line.is_empty()) { continue; @@ -484,9 +486,6 @@ void OBJParser::parse(Vector<std::unique_ptr<Geometry>> &r_all_geometries, else if (line.startswith("end")) { /* End of curve definition, nothing else to do. */ } - else if (line.front() <= ' ') { - /* Just whitespace, skip. */ - } else { std::cout << "OBJ element not recognized: '" << line << "'" << std::endl; } |