mirror of
https://github.com/ynput/ayon-core.git
synced 2026-01-02 00:44:52 +01:00
added regex for version check in source filename
This commit is contained in:
parent
2ebbefdec0
commit
dc4757b38f
1 changed files with 4 additions and 0 deletions
|
|
@ -1,4 +1,5 @@
|
|||
import os
|
||||
import re
|
||||
import collections
|
||||
import pyblish.api
|
||||
from avalon import io
|
||||
|
|
@ -16,6 +17,9 @@ class CollectMatchingAssetToInstance(pyblish.api.InstancePlugin):
|
|||
hosts = ["standalonepublisher"]
|
||||
families = ["background_batch"]
|
||||
|
||||
# Version regex to parse asset name and version from filename
|
||||
version_regex = re.compile(r"^(.+)_v([0-9]+)$")
|
||||
|
||||
def process(self, instance):
|
||||
source_file = os.path.basename(instance.data["source"]).lower()
|
||||
self.log.info("Looking for asset document for file \"{}\"".format(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue