php-vfxapply/plugins/natron/plugin.php

39 lines
871 B
PHP
Raw Normal View History

2016-12-22 02:15:02 +00:00
<?php
namespace VfxApply\Plugin\Natron;
use VfxApply\Plugin;
use VfxApply\Input;
use VfxApply\Output;
use VfxApply\Preset;
class NatronPlugin extends Plugin
{
public function getName()
{
return "natron";
}
public function applyPreset(Preset $preset, Input $input, Output $output)
{
2016-12-25 16:49:43 +00:00
$project = $preset->get("project");
$file = $preset->getResourcePath($project);
2016-12-22 02:15:02 +00:00
2016-12-25 16:49:43 +00:00
$in_node = $preset->get("reader");
$out_node = $preset->get("writer");
$in_file = $input->getFilename();
$out_file = $output->getFilename();
$cmdl = sprintf(
"NatronRenderer %s -i %s %s -o %s %s",
escapeshellarg($file),
$in_node, escapeshellarg($in_file),
$out_node, escapeshellarg($out_file)
);
echo $cmdl."\n";
2016-12-22 02:15:02 +00:00
}
}
return new NatronPlugin();