Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extension check matches using TimelineItem.GetName() instead of source media filepath #1

Closed
in03 opened this issue May 19, 2021 · 1 comment
Assignees

Comments

@in03
Copy link
Owner

in03 commented May 19, 2021

The extension check should not use TimelineItem.GetName(). Although the default clip name is the file name of the source media, a user can give something a custom clip name, and then the script will fail to find the clip's extension in acceptable_exts. Since it's a basic string "in" check, no attempt is made to confirm the filepath exists. TBH, I'm not entirely sure if we need an extension check? By "trying" .GetClipProperty(), anything that doesn't have that method will fail. If that method fails, then we also can't retrieve the "File Path" attribute. If we just go off the "File Path" attribute from the start, we know we're receiving a real file path from Resolve and that the name is up to date.

@in03 in03 self-assigned this May 19, 2021
@in03 in03 closed this as completed May 25, 2021
@in03 in03 reopened this May 25, 2021
@in03
Copy link
Owner Author

in03 commented May 25, 2021

Removed file extension check, trusting try block will filter well enough:

try:
        media_item = item.GetMediaPoolItem()
        attributes = media_item.GetClipProperty()
        all_clips.append(attributes)

except:
        continue

@in03 in03 closed this as completed May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant