Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Deadline: checking existing frames fails when there is number in file name #3829

Closed
antirotor opened this issue Sep 12, 2022 · 4 comments
Closed
Labels
module: Deadline AWS Deadline related features type: bug Something isn't working

Comments

@antirotor
Copy link
Member

antirotor commented Sep 12, 2022

Problem

validate_sequence_frames fails when there is number in file name (other then frame number). It breaks clique asembly.

[cuID:2uxa4yb]

@antirotor antirotor added type: bug Something isn't working module: Deadline AWS Deadline related features labels Sep 12, 2022
@BigRoy
Copy link
Collaborator

BigRoy commented Sep 12, 2022

Is that the same as this PR? #3683

Issue is likely introduced with this PR: #3611 - since then it considers more of the filename for frame numbering since clique.PATTERNS["frames"] would have avoided that BUT would've required a dot before the frames.

@BigRoy
Copy link
Collaborator

BigRoy commented Sep 12, 2022

We're likely better off defining our own patterns like the frames one that still expect the frames in that specific location (at end of file, before extension but don't require the dot.)

So it could be .*([0-9]+)\.{ext}$. Might be even better if we could pass the explicit extension to the assemble command or patterns so that we could also correctly detect extensions that might require double dots like .ass.gz.

Once we've found out the assembling/pattern matching that does what we want - then we should just provide it as a utility function in OpenPype so we can rely on that single entry to files collection. clique.assemble by default has shown it doesn't do what we wanted it to do - it leaves too much up to chance.

We might want this pattern?

\D?(?P<index>(?P<padding>0*)\d+)\.\D+\d?$

And if we'd want to be more explicit with a specific extension (just so that a potential extension with a number in it is allowed - otherwise it'd take the right-most number)

ext = ".ass.gz"
pattern = r"\D?(?P<index>(?P<padding>0*)\d+){ext}$".format(re.escape(ext))

This would allow any of:

hello1001.ass.gz  # 1001
hello_1000.ass.gz  # 1001
hello.1001.ass.gz   # 1001
fooV01_sdadw9w13ek091.001.1001.ass.gz    # 1001
a1001.ass.gz  # 1001
1001.ass.gz   # 1001
1.ass.gz   # 1
foobar1.1.ass.gz    # 1

@antirotor
Copy link
Member Author

Yep, I agree that using that specific regex with provided extension will solve most of these issues. I haven't yet identified all the places we are doing this but my guess is that in most (if not all) of them we already know the extension to be used.

@kalisp
Copy link
Member

kalisp commented Aug 29, 2023

General plugin got removed a while ago, for Unreal it gets fixed by #5533

Standardization of clique.assembly should be implemented instead of this issue, see ynput/ayon-core#821

@kalisp kalisp closed this as completed Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
module: Deadline AWS Deadline related features type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants