mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
26 lines
785 B
Python
26 lines
785 B
Python
from avalon import harmony
|
|
|
|
|
|
class CreateRender(harmony.Creator):
|
|
"""Composite node for publishing renders."""
|
|
|
|
name = "renderDefault"
|
|
label = "Render"
|
|
family = "render"
|
|
node_type = "WRITE"
|
|
|
|
def __init__(self, *args, **kwargs):
|
|
super(CreateRender, self).__init__(*args, **kwargs)
|
|
|
|
def setup_node(self, node):
|
|
sig = harmony.signature()
|
|
func = """function %s(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]);
|
|
}
|
|
%s
|
|
""" % (sig, sig)
|
|
path = "{0}/{0}".format(node.split("/")[-1])
|
|
harmony.send({"function": func, "args": [node, path]})
|