make sure the udim texture can be searched correctly with absolute path

This commit is contained in:
Kayla Man 2024-06-28 18:20:04 +08:00
parent 5c32f41a06
commit 60e2441927

View file

@ -276,7 +276,10 @@ class CollectYetiRig(plugin.MayaInstancePlugin):
"""
import clique
escaped = re.escape(filepath)
escaped = (
re.escape(os.path.basename(filepath))
if os.path.isabs(filepath) else re.escape(filepath)
)
re_pattern = escaped.replace(pattern, "-?[0-9]+")
source_dir = os.path.dirname(filepath)
@ -284,7 +287,8 @@ class CollectYetiRig(plugin.MayaInstancePlugin):
if re.match(re_pattern, f)]
pattern = [clique.PATTERNS["frames"]]
collection, remainder = clique.assemble(files, patterns=pattern)
collection, remainder = clique.assemble(
files, patterns=pattern, minimum_items=1)
return collection