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

[API] Get abstract paths with a different sequence key format #783

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

aoblet
Copy link

@aoblet aoblet commented Aug 21, 2020

Goal

Add the ability to use a different format for SequenceKey token with abstract_path_from_template

Use case

Find abstract paths from an houdini path template compatible for Nuke Sequence padding.

# SEQ format_spec 4 with $F format
# Let's override the output format for nuke sequence padding format
fields['SEQ'] = 'FORMAT: %d'

# Before the PR: return is empty
tank.abstract_paths_from_template(template, fields)

# After the PR: abstract paths with %04d format
tank.abstract_paths_from_template(template, fields)

Unit tests

Tests added to check this fix: tests/core_tests/tests_api:test_sequence_format

Alexis added 3 commits August 21, 2020 01:03
…special format value

Fetch paths by ignoring abstract keys
@aoblet aoblet force-pushed the fix/abstract-path-sequence-field branch from 3e079eb to e7db0fe Compare August 21, 2020 08:55
@aoblet aoblet force-pushed the fix/abstract-path-sequence-field branch from f303f4c to 272b21c Compare August 21, 2020 10:04
@aoblet
Copy link
Author

aoblet commented Aug 24, 2020

@jfboismenu, @manneohrstrom what do you think about this proposal ? :)

@jfboismenu
Copy link
Contributor

Hi @aoblet , we're pretty bandwidth limited, as we're putting the finishing touches on Python 3 across Shotgun. This does look super interesting however, so I've logged and linked this in JIRA. We'll keep you posted.

@jfboismenu
Copy link
Contributor

Jira ticket: SG-19020

@jfboismenu
Copy link
Contributor

Oh, and Manne left the team a year ago. :(

@aoblet
Copy link
Author

aoblet commented Aug 24, 2020

@jfboismenu great, thanks for this quick feedback. Good luck

@aoblet aoblet force-pushed the fix/abstract-path-sequence-field branch from f58829f to 6b1f3dd Compare September 1, 2020 10:39
@aoblet aoblet force-pushed the fix/abstract-path-sequence-field branch from b550437 to 5a6ce8b Compare September 1, 2020 10:42
@eprana
Copy link

eprana commented Mar 8, 2021

@aoblet @jfboismenu Hi guys, any update about this PR ?

@charltk
Copy link

charltk commented Jan 12, 2022

Hi @eprana @aoblet sorry that it has taken so long for someone to look at this PR. I did have a question to help me understand the use case for this functionality.

I'm just wondering if you could get the same functionality by making a second template that used a key whose format spec was what you wanted instead of using and replacing the SEQ key. Or would you use this in a case where some code (eg one of the integrations perhaps) expected a SEQ key in the template but you wanted a different format spec than what is defined in the templates for SEQ? If it's the second case, would using aliases work instead (as described here https://developer.shotgridsoftware.com/82ff76f7/#example---two-fields-both-named-version-via-an-alias) ?

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

Successfully merging this pull request may close these issues.

4 participants