From: dooglus Date: Tue, 23 Sep 2008 17:47:09 +0000 (+0000) Subject: Fix 1959669: "Not backward compatibility". Update the canvas version to 0.6 and... X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=6876a54bece1d54df8ae3d0c9899ad8fef053ef1;p=synfig.git Fix 1959669: "Not backward compatibility". Update the canvas version to 0.6 and allow for a couple of missing links in older versions. This allows, for example dooglus.rincevent.net/random/centipede-2.sifz to load again. git-svn-id: https://synfig.svn.sourceforge.net/svnroot/synfig@2067 1f10aa63-cdf2-0310-b900-c93c546f37ac --- diff --git a/synfig-core/trunk/src/synfig/canvas.h b/synfig-core/trunk/src/synfig/canvas.h index cbed17d..76ea332 100644 --- a/synfig-core/trunk/src/synfig/canvas.h +++ b/synfig-core/trunk/src/synfig/canvas.h @@ -91,9 +91,15 @@ * * Added "offset", "scale", and "fixed_length" links to the * "BLine Tangent" ValueNode. + * + * 0.6: svn r2067 + * + * Added "scale" link to the "BLine Width" ValueNode in svn r1872. + * + * Added "loop" link to the "Gradient Color" ValueNode in svn r1901. */ -#define CURRENT_CANVAS_VERSION "0.5" +#define CURRENT_CANVAS_VERSION "0.6" /* === T Y P E D E F S ===================================================== */ diff --git a/synfig-core/trunk/src/synfig/loadcanvas.cpp b/synfig-core/trunk/src/synfig/loadcanvas.cpp index 539c2da..8c93e1e 100644 --- a/synfig-core/trunk/src/synfig/loadcanvas.cpp +++ b/synfig-core/trunk/src/synfig/loadcanvas.cpp @@ -1292,6 +1292,18 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element *element,Canvas::Handle c value_node->link_name(i) == "fixed_length")) continue; + // 'scale' was added while canvas version 0.5 was in use + if ((version == "0.3" || version == "0.4" || version == "0.5") && + element->get_name() == "blinecalcwidth" && + value_node->link_name(i) == "scale") + continue; + + // 'loop' was added while canvas version 0.5 was in use, as was the 'gradientcolor' node type + if (version == "0.5" && + element->get_name() == "gradientcolor" && + value_node->link_name(i) == "loop") + continue; + error(element, strprintf(_("<%s> is missing link %d (%s)"), element->get_name().c_str(), i,