def check_unused(root, filename): """ Displays all images paths, which not use in all scenes """ if not check_dependencies(DEPENDENCIES): sys.exit(1) head_ext = os.path.splitext(filename) head = head_ext[0] ext = head_ext[1] path = os.path.abspath(os.path.join(root, filename)) if (head.find(".min50") == -1 and (ext == ".jpg" or ext == ".jpeg" or ext == ".png")) or \ (head.find(".altconv") == -1 and (ext == ".ogg" or ext == ".mp3" or ext == ".mp4")): if not path in _resource_dict: print(RED + " [FILE UNUSED]" + ENDCOL, path, WHITE) if platform.system() != "Windows": convert = "convert" identify = "identify" else: convert = os.path.normpath( os.path.join(PATH_TO_UTILS_WIN, "imagemagick", "convert.exe")) identify = os.path.normpath( os.path.join(PATH_TO_UTILS_WIN, "imagemagick", "identify.exe")) check_alpha_usage(path, ext, convert, identify)
def check_unused(root, filename): """ Displays all images paths, which not use in all scenes """ if not check_dependencies(DEPENDENCIES): sys.exit(1) head_ext = os.path.splitext(filename) head = head_ext[0] ext = head_ext[1] path = os.path.abspath(os.path.join(root, filename)) if (head.find(".min50") == -1 and (ext == ".jpg" or ext == ".jpeg" or ext == ".png")) or \ (head.find(".altconv") == -1 and (ext == ".ogg" or ext == ".mp3" or ext == ".mp4")): if not path in _resource_dict: print(RED + " [FILE UNUSED]" + ENDCOL, path, WHITE) if platform.system() != "Windows": convert = "convert" identify = "identify" else: convert = os.path.normpath(os.path.join(PATH_TO_UTILS_WIN, "imagemagick", "convert.exe")) identify = os.path.normpath(os.path.join(PATH_TO_UTILS_WIN, "imagemagick", "identify.exe")) check_alpha_usage(path, ext, convert, identify)
def check_unused(root, filename): head_ext = os.path.splitext(filename) head = head_ext[0] ext = head_ext[1] path = os.path.abspath(os.path.join(root, filename)) if (head.find(".min50") == -1 and (ext == ".jpg" or ext == ".jpeg" or ext == ".png")) or ( head.find(".lossconv") == -1 and (ext == ".ogg" or ext == ".mp3" or ext == ".mp4") ): if not path in _resource_dict: print(RED + " [FILE UNUSED]" + ENDCOL, path, WHITE) check_alpha_usage(path, ext)
def check_unused(root, filename): """ Displays all images paths, which not use in all scenes """ head_ext = os.path.splitext(filename) head = head_ext[0] ext = head_ext[1] path = os.path.abspath(os.path.join(root, filename)) if (head.find(".min50") == -1 and (ext == ".jpg" or ext == ".jpeg" or ext == ".png")) or \ (head.find(".lossconv") == -1 and (ext == ".ogg" or ext == ".mp3" or ext == ".mp4")): if not path in _resource_dict: print(RED + " [FILE UNUSED]" + ENDCOL, path, WHITE) check_alpha_usage(path, ext)
def check_unused(root, filename): """ Displays all images paths, which not use in all scenes """ head_ext = os.path.splitext(filename) head = head_ext[0] ext = head_ext[1] path = os.path.abspath(os.path.join(root, filename)) if (head.find(".min50") == -1 and (ext == ".jpg" or ext == ".jpeg" or ext == ".png")) or \ (head.find(".altconv") == -1 and (ext == ".ogg" or ext == ".mp3" or ext == ".mp4")): if not path in _resource_dict: print(RED + " [FILE UNUSED]" + ENDCOL, path, WHITE) check_alpha_usage(path, ext)