fix: Regenerate yaml, carryTrim => trimSource cleanup (#3121)
PR #2995 didn't take into account the data model storage actually does change when you change a variable name. Boxer yaml generation was missed in earlier PR. * chore: Run `generate-yaml.sh` * chore(cpn): carryTrim -> trimSource * fix(build): Boxer missing from `generate-yaml` * dodgy attempt to read old carryTrim * fix: Don't break the byte boundary + reorder * fix(yaml): indentation for attributes that should not be output * chore: Regenerate YAML after rebase --------- Co-authored-by: raphaelcoeffic <raphael.coeffic@frafos.com>
This commit is contained in:
co-authored by
raphaelcoeffic
parent
4e09bd7b8c
commit
46cc979875
@@ -38,7 +38,7 @@ Node convert<ExpoData>::encode(const ExpoData& rhs)
|
||||
node["weight"] = YamlWriteMixWeight(rhs.weight);
|
||||
node["offset"] = rhs.offset; // YamlWriteMixWeight
|
||||
node["curve"] = rhs.curve;
|
||||
node["carryTrim"] = rhs.carryTrim;
|
||||
node["trimSource"] = rhs.carryTrim; // temporary for 2.8.1, trimSource in 2.9
|
||||
node["name"] = rhs.name;
|
||||
return node;
|
||||
}
|
||||
@@ -60,7 +60,11 @@ bool convert<ExpoData>::decode(const Node& node, ExpoData& rhs)
|
||||
rhs.offset = YamlReadMixWeight(node["offset"]);
|
||||
}
|
||||
node["curve"] >> rhs.curve;
|
||||
if (node["carryTrim"]) { // 2.9 - change bugged carryTrim to trimSource
|
||||
node["carryTrim"] >> rhs.carryTrim;
|
||||
} else {
|
||||
node["trimSource"] >> rhs.carryTrim;
|
||||
}
|
||||
node["name"] >> rhs.name;
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user