From 8e8339609ba970f91e29e5ed6900c1fcde0667b6 Mon Sep 17 00:00:00 2001 From: Frederic Devernay Date: Tue, 23 Mar 2021 16:45:12 -0700 Subject: [PATCH] NodeSerialization: always serialize nodes with an expression fixes https://github.com/NatronGitHub/Natron/issues/585 --- Engine/NodeSerialization.cpp | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/Engine/NodeSerialization.cpp b/Engine/NodeSerialization.cpp index 16bb9677cc..50ea1bcf52 100644 --- a/Engine/NodeSerialization.cpp +++ b/Engine/NodeSerialization.cpp @@ -100,17 +100,21 @@ NodeSerialization::NodeSerialization(const NodePtr & n, break; } } - if (!knobs[i]->getIsPersistent() && !hasExpr) { - continue; - } + // Always serialize nodes that have an expression or a link. + // See https://github.com/NatronGitHub/Natron/issues/585 + // Already fixed in RB-3.0 by https://github.com/NatronGitHub/Natron/commit/7ef38849fe + if (!hasExpr) { + if ( !knobs[i]->getIsPersistent() ) { + continue; + } - if (!knobs[i]->hasModificationsForSerialization()) { - continue; + if ( !knobs[i]->hasModificationsForSerialization() ) { + continue; + } } KnobSerializationPtr newKnobSer = boost::make_shared(knobs[i]); _knobsValues.push_back(newKnobSer); - } _nbKnobs = (int)_knobsValues.size();