From 5cd20ec7c1141322e3638851730737fdc77a7256 Mon Sep 17 00:00:00 2001 From: dooglus Date: Fri, 7 Mar 2008 23:24:59 +0000 Subject: [PATCH] Fix handling of segments so that the examples/walk/walk.sifz file will load correctly. git-svn-id: http://svn.voria.com/code@1876 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-core/trunk/src/modules/mod_geometry/outline.cpp | 8 ++++++++ synfig-core/trunk/src/modules/mod_geometry/region.cpp | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/synfig-core/trunk/src/modules/mod_geometry/outline.cpp b/synfig-core/trunk/src/modules/mod_geometry/outline.cpp index ca45878..62c0fa4 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/outline.cpp +++ b/synfig-core/trunk/src/modules/mod_geometry/outline.cpp @@ -183,6 +183,14 @@ Outline::sync() #if 1 const bool loop(bline.get_loop()); + + ValueNode_BLine::Handle bline_valuenode; + if (bline.get_contained_type() == ValueBase::TYPE_SEGMENT) + { + bline_valuenode = ValueNode_BLine::create(bline); + bline = (*bline_valuenode)(0); + } + const vector bline_(bline.get_list().begin(),bline.get_list().end()); #define bline bline_ diff --git a/synfig-core/trunk/src/modules/mod_geometry/region.cpp b/synfig-core/trunk/src/modules/mod_geometry/region.cpp index baa5780..989fe8d 100644 --- a/synfig-core/trunk/src/modules/mod_geometry/region.cpp +++ b/synfig-core/trunk/src/modules/mod_geometry/region.cpp @@ -94,9 +94,9 @@ void Region::sync() { if(bline.get_contained_type()==ValueBase::TYPE_BLINEPOINT) - { segment_list=convert_bline_to_segment_list(bline); - } + else if(bline.get_contained_type()==ValueBase::TYPE_SEGMENT) + segment_list=vector(bline.get_list().begin(), bline.get_list().end()); else { synfig::warning("Region: incorrect type on bline, layer disabled"); -- 2.7.4