fixed extension check

This commit is contained in:
iLLiCiTiT 2021-02-12 15:58:11 +01:00
parent 40834c4292
commit de927d240e
3 changed files with 15 additions and 3 deletions

View file

@ -52,7 +52,11 @@ class ExtractBGForComp(pype.api.Extractor):
for repre in tuple(repres):
# Skip all files without .psd extension
if repre["ext"] != ".psd":
repre_ext = repre["ext"].lower()
if repre_ext.startswith("."):
repre_ext = repre_ext[1:]
if repre_ext != "psd":
continue
# Prepare publish dir for transfers

View file

@ -61,7 +61,11 @@ class ExtractBGMainGroups(pype.api.Extractor):
for repre in tuple(repres):
# Skip all files without .psd extension
if repre["ext"] != ".psd":
repre_ext = repre["ext"].lower()
if repre_ext.startswith("."):
repre_ext = repre_ext[1:]
if repre_ext != "psd":
continue
# Prepare json filepath where extracted metadata are stored

View file

@ -46,7 +46,11 @@ class ExtractImagesFromPSD(pype.api.Extractor):
for repre in tuple(repres):
# Skip all files without .psd extension
if repre["ext"] != ".psd":
repre_ext = repre["ext"].lower()
if repre_ext.startswith("."):
repre_ext = repre_ext[1:]
if repre_ext != "psd":
continue
# TODO add check of list of "files" value