feat(celaction): wip publishing workfiles

This commit is contained in:
Jakub Jezek 2020-04-30 15:50:50 +02:00
parent 1faec702ec
commit 950644f630
No known key found for this signature in database
GPG key ID: C4B96E101D2A47F3
2 changed files with 5 additions and 8 deletions

View file

@ -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"]

View file

@ -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 ""