Module: synfig/synfig
Branch: genete_width_outline
Commit: 634c8e3d58be7184a43c6f0d95b59ec0aedebcbb
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=634c8e3d58be7184a43c6f0d95b59ec0aedebcbb

Author: Carlos Lopez <[email protected]>
Date:   Sun Jan  9 14:21:11 2011 +0100

When creating a layer, create composite Width Points when found

---

 synfig-studio/src/synfigapp/canvasinterface.cpp |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/synfig-studio/src/synfigapp/canvasinterface.cpp 
b/synfig-studio/src/synfigapp/canvasinterface.cpp
index a03084e..290919d 100644
--- a/synfig-studio/src/synfigapp/canvasinterface.cpp
+++ b/synfig-studio/src/synfigapp/canvasinterface.cpp
@@ -43,6 +43,7 @@
 #include <synfig/valuenode_twotone.h>
 #include <synfig/valuenode_stripes.h>
 #include <synfig/valuenode_bline.h>
+#include <synfig/valuenode_wplist.h>
 
 #include <synfig/waypoint.h>
 #include <synfig/loadcanvas.h>
@@ -246,7 +247,7 @@ CanvasInterface::add_layer_to(synfig::String name, 
synfig::Canvas::Handle canvas
                        // bline
                        if(iter->second.get_type()==ValueBase::TYPE_LIST)
                        {
-                               // check whether it's a list of blinepoints only
+                               // check whether it's a list of blinepoints or 
widthpoints only
                                vector<ValueBase> list(iter->second.get_list());
                                if (list.size())
                                {
@@ -259,8 +260,16 @@ CanvasInterface::add_layer_to(synfig::String name, 
synfig::Canvas::Handle canvas
                                                
value_node=LinkableValueNode::create("bline",iter->second);
                                                
ValueNode_BLine::Handle::cast_dynamic(value_node)->set_member_canvas(canvas);
                                        }
+                                       for (iter2 = list.begin(); iter2 != 
list.end(); iter2++)
+                                               if (iter2->get_type() != 
ValueBase::TYPE_WIDTHPOINT)
+                                                       break;
+                                       if (iter2 == list.end())
+                                       {
+                                               
value_node=LinkableValueNode::create("wplist",iter->second);
+                                               
ValueNode_WPList::Handle::cast_dynamic(value_node)->set_member_canvas(canvas);
+                                       }
                                }
-
+                               // it has something else so just insert the 
dynamic list
                                if (!value_node)
                                        
value_node=LinkableValueNode::create("dynamic_list",iter->second);
                        }


------------------------------------------------------------------------------
Gaining the trust of online customers is vital for the success of any company
that requires sensitive data to be transmitted over the Web.   Learn how to 
best implement a security strategy that keeps consumers' information secure 
and instills the confidence they need to proceed with transactions.
http://p.sf.net/sfu/oracle-sfdevnl 
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to