Initial render publishing

This commit is contained in:
Toke Stuart Jepsen 2020-05-26 12:02:20 +01:00
parent 19a46c7cd6
commit 331ffab46f
5 changed files with 208 additions and 0 deletions

View file

@ -0,0 +1,26 @@
from avalon import harmony
class CreateRender(harmony.Creator):
"""Composite node for publishing renders."""
name = "renderDefault"
label = "Render"
family = "render"
families = "imagesequence"
node_type = "WRITE"
def __init__(self, *args, **kwargs):
super(CreateRender, self).__init__(*args, **kwargs)
def setup_node(self, node):
func = """function func(args)
{
node.setTextAttr(args[0], "DRAWING_TYPE", 1, "PNG4");
node.setTextAttr(args[0], "DRAWING_NAME", 1, args[1]);
node.setTextAttr(args[0], "MOVIE_PATH", 1, args[1]);
}
func
"""
path = "{0}/{0}".format(node.split("/")[-1])
harmony.send({"function": func, "args": [node, path]})