Author: Carlos Lopez <[email protected]>
Date:   Mon Aug 22 21:04:19 2011 +0200

Add new member to Linkable Value Node to set the bline and also spread it out 
to the children.

---

 synfig-core/src/synfig/valuenode.cpp |   15 +++++++++++++++
 synfig-core/src/synfig/valuenode.h   |    3 +++
 2 files changed, 18 insertions(+), 0 deletions(-)

diff --git a/synfig-core/src/synfig/valuenode.cpp 
b/synfig-core/src/synfig/valuenode.cpp
index b653c3d..712cb9b 100644
--- a/synfig-core/src/synfig/valuenode.cpp
+++ b/synfig-core/src/synfig/valuenode.cpp
@@ -380,6 +380,21 @@ LinkableValueNode::set_link(int i,ValueNode::Handle x)
        return false;
 }
 
+void
+LinkableValueNode::set_bline(ValueNode::Handle x)
+{
+       Vocab::iterator iter;
+       int i=0;
+       Vocab vocab(get_children_vocab());
+       for(iter=vocab.begin();iter!=vocab.end();iter++, i++)
+       {
+               if(iter->is_bline_linked())
+                       get_link(i)->set_bline(x);
+               else
+                       get_link(i)->set_bline(NULL);
+       }
+       ValueNode::set_bline(x);
+}
 ValueNode::LooseHandle
 LinkableValueNode::get_link(int i)const
 {
diff --git a/synfig-core/src/synfig/valuenode.h 
b/synfig-core/src/synfig/valuenode.h
index fe7084d..95fbab3 100644
--- a/synfig-core/src/synfig/valuenode.h
+++ b/synfig-core/src/synfig/valuenode.h
@@ -398,6 +398,9 @@ public:
        bool set_link(int i,ValueNode::Handle x);
        //! Sets a new Value Node link by its name
        bool set_link(const String &name,ValueNode::Handle x) { return 
set_link(get_link_index_from_name(name),x);      }
+       //! Sets the bline.
+       //! Depending on the parameter vocabulary, it sets it to the parameter 
too.
+       virtual void set_bline(ValueNode::Handle x);
 
        //! Returns a Loose Handle to the Value Node based on the link's index
        ValueNode::LooseHandle get_link(int i)const;


------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to