2
This commit is contained in:
1 parent
895416a520
commit
732b7e37ea
1 file changed
+3
@@ -85,14 +85,17 @@ def checkDownloadFile(pid):
|
||||
mtlContent = file.read()
|
||||
#检测mtl文件是否正常
|
||||
if mtlContent == "":
|
||||
print(f'{pid}的mtl文件检测出现问题了, 没有找到mtl文件')
|
||||
return False
|
||||
#判断mtl 包含几个 newmtl
|
||||
newmtlCount = mtlContent.count('newmtl')
|
||||
if newmtlCount > 1:
|
||||
print(f'{pid}的mtl文件检测出现问题了, 包含多个newmtl')
|
||||
return False
|
||||
|
||||
#判断mtlContent是否包含 {pid}Tex1.jpg
|
||||
if f'{pid}Tex1.jpg' not in mtlContent:
|
||||
print(f'{pid}的mtl文件检测出现问题了, 没有找到{pid}Tex1.jpg')
|
||||
return False
|
||||
|
||||
#检测obj文件 里 是否包含 o {pid},
|
||||
|
||||
Reference in new issue
Block a user