mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-01 08:24:53 +01:00
Update server_addon/maya/client/ayon_maya/plugins/publish/collect_yeti_rig.py
Co-authored-by: Roy Nieterau <roy_nieterau@hotmail.com>
This commit is contained in:
parent
6c92eb513f
commit
0eb7789381
1 changed files with 6 additions and 4 deletions
|
|
@ -280,13 +280,15 @@ class CollectYetiRig(plugin.MayaInstancePlugin):
|
||||||
re_pattern = re_pattern.replace(re.escape(pattern), "-?[0-9]+")
|
re_pattern = re_pattern.replace(re.escape(pattern), "-?[0-9]+")
|
||||||
source_dir = os.path.dirname(filepath)
|
source_dir = os.path.dirname(filepath)
|
||||||
files = [f for f in os.listdir(source_dir) if re.match(re_pattern, f)]
|
files = [f for f in os.listdir(source_dir) if re.match(re_pattern, f)]
|
||||||
collection, _remainder = clique.assemble(
|
collections, _remainder = clique.assemble(
|
||||||
files,
|
files,
|
||||||
patterns=[clique.PATTERNS["frames"]],
|
patterns=[clique.PATTERNS["frames"]],
|
||||||
minimum_items=1)
|
minimum_items=1)
|
||||||
files = [texture for texture_collection in collection
|
|
||||||
for texture in texture_collection]
|
if len(collections) > 1:
|
||||||
return files
|
raise ValueError(f"Multiple collections found for {files}. This is a bug.")
|
||||||
|
|
||||||
|
return list(collections[0])
|
||||||
|
|
||||||
def _replace_tokens(self, strings):
|
def _replace_tokens(self, strings):
|
||||||
env_re = re.compile(r"\$\{(\w+)\}")
|
env_re = re.compile(r"\$\{(\w+)\}")
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue