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

FileSequence.basename cut at the wrong place with still frames #65

Open
mathbou opened this issue Jun 11, 2018 · 7 comments
Open

FileSequence.basename cut at the wrong place with still frames #65

mathbou opened this issue Jun 11, 2018 · 7 comments
Assignees

Comments

@mathbou
Copy link

mathbou commented Jun 11, 2018

I use findSequencesOnDisk to retrieve my sequences, it also returns the files without padding as I want it. But with the still frames, the basename methods cut the name at the first point, not the last.

I have this kind of filename: PROJECT_010_110_CAT.RGB_color.exr
The basename method returns: PROJECT_010_110_CAT.
The extension method returns: .RGB_color.exr

With a filename with padding: PROJECT_010_110_CAT.RGB_color.0042.exr
The basename returned is: PROJECT_010_110_CAT.RGB_color.
And the extension is: .exr

@justinfx
Copy link
Owner

I'm guessing this problem was introduced via the fix for #56. It was meant to support extensions with multiple dot components. But it would seem it is not properly ignoring patterns where there is no frame range. It shouldn't parse the longer extension in this case. I will try and look into this shortly.

@justinfx justinfx self-assigned this Jun 17, 2018
justinfx added a commit that referenced this issue Jun 17, 2018
@justinfx
Copy link
Owner

I've pushed a 65_long_ext_parsing branch with a fix for this problem. However I am a bit torn on some resulting behaviour:

Given input: file.v2.tar.gz

Currently the output will be: basename: file.v2 ; ext: .tar.gz
There is logic that detects when the split was on a possible version number instead of a frame, and it merged it into the basename, leaving the rest as the extension. I am torn on whether the output should actually be: basename: file.v2.tar ; ext: .gz

Will need to think about this.

@yawpitch
Copy link
Collaborator

yawpitch commented Jun 19, 2018 via email

@justinfx
Copy link
Owner

justinfx commented Jun 19, 2018 via email

@yawpitch
Copy link
Collaborator

yawpitch commented Jun 19, 2018 via email

@justinfx
Copy link
Owner

justinfx commented Jun 20, 2018 via email

@yawpitch
Copy link
Collaborator

yawpitch commented Jun 20, 2018 via email

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

3 participants