mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
Refactor 'filename' to 'filepath' as it refers to full file path
This commit is contained in:
parent
8d63ed0c05
commit
2cc5c1cc44
1 changed files with 4 additions and 4 deletions
|
|
@ -234,7 +234,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin):
|
|||
|
||||
return []
|
||||
|
||||
def get_sequence(self, filename, pattern="%04d"):
|
||||
def get_sequence(self, filepath, pattern="%04d"):
|
||||
"""Get sequence from filename.
|
||||
|
||||
This will only return files if they exist on disk as it tries
|
||||
|
|
@ -245,7 +245,7 @@ class CollectYetiRig(pyblish.api.InstancePlugin):
|
|||
0000, 0001.
|
||||
|
||||
Arguments:
|
||||
filename (str): The full path to filename containing the given
|
||||
filepath (str): The full path to filename containing the given
|
||||
pattern.
|
||||
pattern (str): The pattern to swap with the variable frame number.
|
||||
|
||||
|
|
@ -255,10 +255,10 @@ class CollectYetiRig(pyblish.api.InstancePlugin):
|
|||
"""
|
||||
from avalon.vendor import clique
|
||||
|
||||
escaped = re.escape(filename)
|
||||
escaped = re.escape(filepath)
|
||||
re_pattern = escaped.replace(pattern, "-?[0-9]+")
|
||||
|
||||
source_dir = os.path.dirname(filename)
|
||||
source_dir = os.path.dirname(filepath)
|
||||
files = [f for f in os.listdir(source_dir)
|
||||
if re.match(re_pattern, f)]
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue