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

Updated util class to support updated get_publish_name() method argum… #69

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions python/tk_multi_publish2/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def get_frame_sequences(folder, extensions=None, frame_spec=None):
)


def get_publish_name(path, sequence=False):
def get_publish_name(path, sequence=False, version=False, remove_padding=False):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we should make removing the version an optional thing? Is there a good use case for publishing with a version number included?

I don't think remove_padding was included in See my comments on: #68. I think we're on the same page here now though.

"""
Given a file path, return the display name to use for publishing.

Expand All @@ -233,6 +233,8 @@ def get_publish_name(path, sequence=False):
:param path: The path to a file, likely one to be published.
:param sequence: If True, treat the path as a sequence name and replace
the frame number with placeholder
:param version: If True, removes the version from the path
:param remove_padding: If True, removes padding from the path

:return: A publish display name for the provided path.
"""
Expand All @@ -246,7 +248,9 @@ def get_publish_name(path, sequence=False):
"path_info",
"get_publish_name",
path=path,
sequence=sequence
sequence=sequence,
version=version,
remove_padding=remove_padding
)


Expand Down