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()
|
mtlContent = file.read()
|
||||||
#检测mtl文件是否正常
|
#检测mtl文件是否正常
|
||||||
if mtlContent == "":
|
if mtlContent == "":
|
||||||
|
print(f'{pid}的mtl文件检测出现问题了, 没有找到mtl文件')
|
||||||
return False
|
return False
|
||||||
#判断mtl 包含几个 newmtl
|
#判断mtl 包含几个 newmtl
|
||||||
newmtlCount = mtlContent.count('newmtl')
|
newmtlCount = mtlContent.count('newmtl')
|
||||||
if newmtlCount > 1:
|
if newmtlCount > 1:
|
||||||
|
print(f'{pid}的mtl文件检测出现问题了, 包含多个newmtl')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#判断mtlContent是否包含 {pid}Tex1.jpg
|
#判断mtlContent是否包含 {pid}Tex1.jpg
|
||||||
if f'{pid}Tex1.jpg' not in mtlContent:
|
if f'{pid}Tex1.jpg' not in mtlContent:
|
||||||
|
print(f'{pid}的mtl文件检测出现问题了, 没有找到{pid}Tex1.jpg')
|
||||||
return False
|
return False
|
||||||
|
|
||||||
#检测obj文件 里 是否包含 o {pid},
|
#检测obj文件 里 是否包含 o {pid},
|
||||||
|
|||||||
Reference in new issue
Block a user