Author: Carlos Lopez <genet...@gmail.com>
Date:   Thu Jul 21 17:53:37 2011 +0200

Increase canvas version and allow open files created previously without the 
homogeneous link defined. .

---

 synfig-core/src/synfig/canvas.h       |    8 +++++++-
 synfig-core/src/synfig/loadcanvas.cpp |    7 +++++++
 2 files changed, 14 insertions(+), 1 deletions(-)

diff --git a/synfig-core/src/synfig/canvas.h b/synfig-core/src/synfig/canvas.h
index becfb10..c04a88e 100644
--- a/synfig-core/src/synfig/canvas.h
+++ b/synfig-core/src/synfig/canvas.h
@@ -101,9 +101,15 @@
  * 0.7: svn r2315
  *
  *      Added "loop" link to the "Random" ValueNode in svn r2315.
+ *
+ * 0.8: git _to be defined_
+ *
+ *      Added "homogenous" link to "BLineCalcVertex", "BLineCalcTangent"
+ *      and "BLineCalcWidth" valuenodes.
+ *
  */
 
-#define CURRENT_CANVAS_VERSION "0.7"
+#define CURRENT_CANVAS_VERSION "0.8"
 
 /* === T Y P E D E F S ===================================================== */
 
diff --git a/synfig-core/src/synfig/loadcanvas.cpp 
b/synfig-core/src/synfig/loadcanvas.cpp
index b74c581..20eb22b 100644
--- a/synfig-core/src/synfig/loadcanvas.cpp
+++ b/synfig-core/src/synfig/loadcanvas.cpp
@@ -1524,6 +1524,13 @@ CanvasParser::parse_linkable_value_node(xmlpp::Element 
*element,Canvas::Handle c
                                value_node->link_name(i) == "loop")
                                continue;
 
+                       // 'homogeneous' was added while canvas version 0.7 was 
in use and the BLineCalcVertex,
+                       // BLineCalcTangent and BLineCalcWidth have been 
modified since canvas version 0.5
+                       if ((version == "0.5" || version == "0.6" || version == 
"0.7") &&
+                               (element->get_name() == "blinecalcvertex" || 
element->get_name() == "blinecalctangent" || element->get_name() == 
"blinecalcwidth") &&
+                               value_node->link_name(i) == "homogeneous")
+                               continue;
+
                        error(element, strprintf(_("<%s> is missing link %d 
(%s)"),
                                                                         
element->get_name().c_str(),
                                                                         i,


------------------------------------------------------------------------------
5 Ways to Improve & Secure Unified Communications
Unified Communications promises greater efficiencies for business. UC can 
improve internal communications as well as offer faster, more efficient ways
to interact with customers and streamline customer service. Learn more!
http://www.accelacomm.com/jaw/sfnl/114/51426253/
_______________________________________________
Synfig-devl mailing list
Synfig-devl@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to