mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
feat(celaction): wip publishing workfiles
This commit is contained in:
parent
1faec702ec
commit
950644f630
2 changed files with 5 additions and 8 deletions
|
|
@ -18,12 +18,10 @@ class CollectCelactionRender(pyblish.api.ContextPlugin):
|
|||
instance = context.create_instance(name=component_name)
|
||||
instance.data["family"] = "render"
|
||||
instance.data["label"] = "{} - remote".format(component_name)
|
||||
# instance.data["families"] = ["deadline", "remote", "img"]
|
||||
instance.data["families"] = ["render", "img"]
|
||||
instance.data["managed_location"] = False
|
||||
|
||||
# getting instance state
|
||||
instance.data["publish"] = False
|
||||
instance.data["publish"] = True
|
||||
|
||||
data = context.data("kwargs")["data"]
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,4 @@
|
|||
import shutil
|
||||
import os
|
||||
import re
|
||||
import pyblish.api
|
||||
|
||||
|
|
@ -30,12 +29,12 @@ def version_get(string, prefix, suffix=None):
|
|||
if string is None:
|
||||
raise ValueError("Empty version string - no match")
|
||||
|
||||
regex = "[/_.]" + prefix + "\d+"
|
||||
regex = r"[/_.]{}\d+".format(prefix)
|
||||
matches = re.findall(regex, string, re.IGNORECASE)
|
||||
if not len(matches):
|
||||
msg = "No \"_" + prefix + "#\" found in \"" + string + "\""
|
||||
msg = f"No `_{prefix}#` found in `{string}`"
|
||||
raise ValueError(msg)
|
||||
return (matches[-1:][0][1], re.search("\d+", matches[-1:][0]).group())
|
||||
return (matches[-1:][0][1], re.search(r"\d+", matches[-1:][0]).group())
|
||||
|
||||
|
||||
def version_set(string, prefix, oldintval, newintval):
|
||||
|
|
@ -44,7 +43,7 @@ def version_set(string, prefix, oldintval, newintval):
|
|||
we use "v" for render version and "c" for camera track version.
|
||||
See the version.py and camera.py plugins for usage."""
|
||||
|
||||
regex = "[/_.]" + prefix + "\d+"
|
||||
regex = r"[/_.]{}\d+".format(prefix)
|
||||
matches = re.findall(regex, string, re.IGNORECASE)
|
||||
if not len(matches):
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue