mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Merge branch 'hotfix/extract_render_harmony' into 2.x/develop
This commit is contained in:
commit
ddcf63e24c
3 changed files with 36 additions and 13 deletions
|
|
@ -151,27 +151,31 @@ def application_launch():
|
|||
def export_template(backdrops, nodes, filepath):
|
||||
func = """function func(args)
|
||||
{
|
||||
// Add an extra node just so a new group can be created.
|
||||
|
||||
var temp_node = node.add("Top", "temp_note", "NOTE", 0, 0, 0);
|
||||
var template_group = node.createGroup(temp_node, "temp_group");
|
||||
node.deleteNode( template_group + "/temp_note" );
|
||||
|
||||
// This will make Node View to focus on the new group.
|
||||
selection.clearSelection();
|
||||
for (var f = 0; f < args[1].length; f++)
|
||||
{
|
||||
selection.addNodeToSelection(args[1][f]);
|
||||
}
|
||||
|
||||
Action.perform("copy()", "Node View");
|
||||
|
||||
selection.clearSelection();
|
||||
selection.addNodeToSelection(template_group);
|
||||
Action.perform("onActionEnterGroup()", "Node View");
|
||||
Action.perform("paste()", "Node View");
|
||||
|
||||
// Recreate backdrops in group.
|
||||
for (var i = 0 ; i < args[0].length; i++)
|
||||
{
|
||||
MessageLog.trace(args[0][i]);
|
||||
Backdrop.addBackdrop(template_group, args[0][i]);
|
||||
};
|
||||
|
||||
// Copy-paste the selected nodes into the new group.
|
||||
var drag_object = copyPaste.copy(args[1], 1, frame.numberOf, "");
|
||||
copyPaste.pasteNewNodes(drag_object, template_group, "");
|
||||
|
||||
// Select all nodes within group and export as template.
|
||||
Action.perform( "selectAll()", "Node View" );
|
||||
copyPaste.createTemplateFromSelection(args[2], args[3]);
|
||||
|
||||
|
|
|
|||
|
|
@ -72,19 +72,27 @@ class ExtractRender(pyblish.api.InstancePlugin):
|
|||
self.log.info(output.decode("utf-8"))
|
||||
|
||||
# Collect rendered files.
|
||||
self.log.debug(path)
|
||||
files = os.listdir(path)
|
||||
self.log.debug(files)
|
||||
collections, remainder = clique.assemble(files, minimum_items=1)
|
||||
assert not remainder, (
|
||||
"There should not be a remainder for {0}: {1}".format(
|
||||
instance[0], remainder
|
||||
)
|
||||
)
|
||||
assert len(collections) == 1, (
|
||||
"There should only be one image sequence in {}. Found: {}".format(
|
||||
path, len(collections)
|
||||
)
|
||||
)
|
||||
collection = collections[0]
|
||||
self.log.debug(collections)
|
||||
if len(collections) > 1:
|
||||
for col in collections:
|
||||
if len(list(col)) > 1:
|
||||
collection = col
|
||||
else:
|
||||
# assert len(collections) == 1, (
|
||||
# "There should only be one image sequence in {}. Found: {}".format(
|
||||
# path, len(collections)
|
||||
# )
|
||||
# )
|
||||
collection = collections[0]
|
||||
|
||||
# Generate thumbnail.
|
||||
thumbnail_path = os.path.join(path, "thumbnail.png")
|
||||
|
|
|
|||
|
|
@ -28,8 +28,11 @@ class ValidateSceneSettings(pyblish.api.InstancePlugin):
|
|||
hosts = ["harmony"]
|
||||
actions = [ValidateSceneSettingsRepair]
|
||||
|
||||
frame_check_filter = ["_ch_", "_pr_", "_intd_", "_extd_"]
|
||||
|
||||
def process(self, instance):
|
||||
expected_settings = pype.hosts.harmony.get_asset_settings()
|
||||
self.log.info(expected_settings)
|
||||
|
||||
# Harmony is expected to start at 1.
|
||||
frame_start = expected_settings["frameStart"]
|
||||
|
|
@ -37,6 +40,14 @@ class ValidateSceneSettings(pyblish.api.InstancePlugin):
|
|||
expected_settings["frameEnd"] = frame_end - frame_start + 1
|
||||
expected_settings["frameStart"] = 1
|
||||
|
||||
|
||||
|
||||
self.log.info(instance.context.data['anatomyData']['asset'])
|
||||
|
||||
if any(string in instance.context.data['anatomyData']['asset']
|
||||
for string in frame_check_filter):
|
||||
expected_settings.pop("frameEnd")
|
||||
|
||||
func = """function func()
|
||||
{
|
||||
return {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue