refactor(task): OTIO load/save tasks over oaknode/oaktimeline C ABIs
- LoadOTIOTask/SaveOTIOTask de-Qt'd: graph traversal and construction through oaknode C ABI (find_input_footage, sequence defaults, block factories, context positions), track creation through oaktimeline's add_track command; the OTIO import dialog becomes a facade callback (headless default: accept all) - oaknode additions: find_input_footage, sequence_set_default_parameters - USE_OTIO + otio-install libs wired into oaktask; OTIO dylibs copied next to liboaktask for @loader_path resolution - OTIO round-trip test passes; build-oaktask 106/106 green
This commit is contained in:
@@ -32,6 +32,8 @@
|
||||
|
||||
#include "output/viewer/viewer.h"
|
||||
|
||||
#include "project/footage/footage.h"
|
||||
|
||||
#include "valueconvert.h"
|
||||
|
||||
namespace
|
||||
@@ -1332,3 +1334,23 @@ int oaknode_viewer_set_audio_params(OakNodeNode *viewer,
|
||||
return OAKNODE_E_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
int oaknode_node_find_input_footage(const OakNodeNode *node,
|
||||
OakNodeFootage **out)
|
||||
{
|
||||
if (!node || !out) {
|
||||
return OAKNODE_E_INVALID;
|
||||
}
|
||||
|
||||
*out = NULL;
|
||||
try {
|
||||
std::vector<olive::Footage *> found =
|
||||
to_node(node)->find_input_nodes<olive::Footage>();
|
||||
if (!found.empty()) {
|
||||
*out = reinterpret_cast<OakNodeFootage *>(found.front());
|
||||
}
|
||||
return OAKNODE_OK;
|
||||
} catch (...) {
|
||||
return OAKNODE_E_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,3 +323,17 @@ OakNodeNode *oaknode_sequence_as_node(OakNodeSequence *sequence)
|
||||
{
|
||||
return reinterpret_cast<OakNodeNode *>(sequence);
|
||||
}
|
||||
|
||||
int oaknode_sequence_set_default_parameters(OakNodeSequence *sequence)
|
||||
{
|
||||
if (!sequence) {
|
||||
return OAKNODE_E_INVALID;
|
||||
}
|
||||
|
||||
try {
|
||||
impl(sequence)->set_default_parameters();
|
||||
return OAKNODE_OK;
|
||||
} catch (...) {
|
||||
return OAKNODE_E_FAILED;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user