Sync Footage proxy state to render worker copy project

Proxy state (enabled/path/state/etc.) is stored as Footage member data,
not as a Node input, so ProjectCopier did not synchronize it to the
internal copy project used by worker processes. This caused toggling
Use Proxy in the UI to have no effect on rendered output.

Add a Footage::ProxySettingsChanged signal and have ProjectCopier sync
the proxy state to the copied Footage node, marking the copy project
modified so RenderWorkerPool writes a fresh graph snapshot.
This commit is contained in:
2026-07-13 10:19:30 +08:00
parent 279fb2f442
commit 818b76b64e
4 changed files with 39 additions and 1 deletions
+26
View File
@@ -22,6 +22,7 @@
#include "projectcopier.h"
#include "node/group/group.h"
#include "node/project/footage/footage.h"
namespace olive
{
@@ -260,10 +261,35 @@ void ProjectCopier::InsertIntoCopyMap(Node *node, Node *copy)
// Copy parameters
Node::CopyInputs(node, copy, false);
// Sync Footage proxy state (which is not stored as a Node input)
if (Footage *src_footage = dynamic_cast<Footage *>(node)) {
if (dynamic_cast<Footage *>(copy)) {
connect(src_footage, &Footage::ProxySettingsChanged, this,
[this, src_footage]() { SyncFootageProxySettings(src_footage); });
SyncFootageProxySettings(src_footage);
}
}
// Connect to node's cache
emit AddedNode(node);
}
void ProjectCopier::SyncFootageProxySettings(Footage *source)
{
Footage *copy = GetCopy(source);
if (!copy) {
return;
}
copy->SetProxy(source->proxy_path(), source->proxy_state(),
source->proxy_video_stream_index(),
source->proxy_preset_version(), source->proxy_enabled());
if (Project *cp = copy->project()) {
cp->set_modified(true);
}
}
void ProjectCopier::QueueNodeAdd(Node *node)
{
graph_update_queue_.push_back({ QueuedJob::kNodeAdded, node, NodeInput(),
+3
View File
@@ -23,6 +23,7 @@
#define PROJECTCOPIER_H
#include "node/project.h"
#include "node/project/footage/footage.h"
namespace olive
{
@@ -89,6 +90,8 @@ private:
void DoValueHintChange(const NodeInput &input);
void DoProjectSettingChange(const QString &key, const QString &value);
void SyncFootageProxySettings(Footage *source);
void InsertIntoCopyMap(Node *node, Node *copy);
void UpdateGraphChangeValue();