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

Conversation

moonyuet
Copy link
Member

@moonyuet moonyuet commented Aug 17, 2022

Brief description

When there is a version string in subset name, like foo_bar_v004 and that subset name is used for review, clique has trouble collecting playblasted sequences for it because it tries to parse version string as a frame number, resulting in multiple collections.

Solutions

Defines the pattern of the filename in clique.assemble()
Instead of

        collections, remainder = clique.assemble(collected_files,
                                                 minimum_items=1)

Uses

        pattern_frame = [r'\.(?P<index>(?P<padding>0*)\d+)\.\D+\d?$']
        collections, remainder = clique.assemble(collected_files,
                                                 minimum_items=1,
                                                 patterns=pattern_frame)

@moonyuet moonyuet self-assigned this Aug 17, 2022
@ynbot
Copy link
Contributor

ynbot commented Aug 17, 2022

@BigRoy
Copy link
Collaborator

BigRoy commented Aug 19, 2022

This pattern would again force it to only recognize file patterns with a . in the filename. (Which might not be a problem for Extract playblast) but would potentially be for others as came up in this PR #3611

Also, I believe you should also be able to just use:

patterns = [clique.PATTERNS["frames"]]
collections, remainder = clique.assemble(frames,
                                         minimum_items=1,
                                         patterns=patterns)

That way you don't need to manage the regex pattern yourself and can use one of the ones coming with clique.


Can you confirm that before this PR that clique fails when trying to assemble just a single frame but succeeds with multiple frames. I recall clique doing something like that.

@moonyuet moonyuet closed this Aug 19, 2022
@moonyuet moonyuet reopened this Aug 19, 2022
@moonyuet
Copy link
Member Author

This pattern would again force it to only recognize file patterns with a . in the filename. (Which might not be a problem for Extract playblast) but would potentially be for others as came up in this PR #3611

Also, I believe you should also be able to just use:

patterns = [clique.PATTERNS["frames"]]
collections, remainder = clique.assemble(frames,
                                         minimum_items=1,
                                         patterns=patterns)

That way you don't need to manage the regex pattern yourself and can use one of the ones coming with clique.

Can you confirm that before this PR that clique fails when trying to assemble just a single frame but succeeds with multiple frames. I recall clique doing something like that.

I agree. Thanks for telling me about this.

@mkolar mkolar changed the title OP-3601/ version string in subset name break file sequence collection in review General: version string in subset name break file sequence collection in review Aug 29, 2022
@mkolar mkolar merged commit 5045a10 into ynput:develop Oct 10, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants