Update openpype/hosts/resolve/api/lib.py

Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
Jakub Ježek 2023-10-06 15:19:27 +02:00 committed by GitHub
parent b2588636e9
commit c7df127bec
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -243,9 +243,7 @@ def create_media_pool_item(
# iterate all files and check if they exists # iterate all files and check if they exists
# if not then remove them from list # if not then remove them from list
for file in files[:]: files = [f for f in files if os.path.exists(f)]
if not os.path.exists(file):
files.remove(file)
# add all data in folder to media pool # add all data in folder to media pool
media_pool_items = media_pool.ImportMedia(files) media_pool_items = media_pool.ImportMedia(files)