提交 895d39e3 编写于 作者: M Mr.doob

Merge pull request #4984 from okready/patch-2

Support OBJ and MTL files that may contain tags split onto multiple line...
......@@ -362,7 +362,14 @@ def parse_mtl(fname):
materials = {}
previous_line = ""
for line in fileinput.input(fname):
line = previous_line + line
if line[-2:-1] == '\\':
previous_line = line[:-2]
continue
previous_line = ""
chunks = line.split()
if len(chunks) > 0:
......@@ -505,7 +512,14 @@ def parse_obj(fname):
object = 0
smooth = 0
previous_line = ""
for line in fileinput.input(fname):
line = previous_line + line
if line[-2:-1] == '\\':
previous_line = line[:-2]
continue
previous_line = ""
chunks = line.split()
if len(chunks) > 0:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册