Author: Carlos Lopez <[email protected]>
Date: Mon Aug 22 20:12:43 2011 +0200
Move bline handle to ValueNode level.
---
.../src/modules/mod_geometry/advanced_outline.cpp | 4 ++--
synfig-core/src/synfig/valuenode.cpp | 6 ++++++
synfig-core/src/synfig/valuenode.h | 9 +++++++++
synfig-core/src/synfig/valuenode_wplist.cpp | 14 --------------
synfig-core/src/synfig/valuenode_wplist.h | 6 ------
5 files changed, 17 insertions(+), 22 deletions(-)
diff --git a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
index 94fd6ed..322da6c 100644
--- a/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
+++ b/synfig-core/src/modules/mod_geometry/advanced_outline.cpp
@@ -1044,7 +1044,7 @@
Advanced_Outline::connect_bline_to_wplist(etl::loose_handle<ValueNode> x)
}
if(!wplist->link_count())
synfig::warning("Advanced_Outline::connect_bline_to_wplist:
WPList::link_count()=0");
- wplist->set_bline(ValueNode::Handle(x));
+ wplist->set_bline(x);
//synfig::info("set bline success");
return true;
}
@@ -1077,7 +1077,7 @@
Advanced_Outline::connect_bline_to_dilist(etl::loose_handle<ValueNode> x)
}
if(!dilist->link_count())
synfig::warning("Advanced_Outline::connect_bline_to_dilist:
DIList::link_count()=0");
- dilist->set_bline(ValueNode::Handle(x));
+ dilist->set_bline(x);
//synfig::info("success dlilist");
return true;
}
diff --git a/synfig-core/src/synfig/valuenode.cpp
b/synfig-core/src/synfig/valuenode.cpp
index fe67622..c84f639 100644
--- a/synfig-core/src/synfig/valuenode.cpp
+++ b/synfig-core/src/synfig/valuenode.cpp
@@ -591,6 +591,12 @@ ValueNode::set_root_canvas(etl::loose_handle<Canvas> x)
root_canvas_=x->get_root();
}
+void
+ValueNode::set_bline(ValueNode::Handle x)
+{
+ bline_=x;
+}
+
void LinkableValueNode::get_times_vfunc(Node::time_set &set) const
{
ValueNode::LooseHandle h;
diff --git a/synfig-core/src/synfig/valuenode.h
b/synfig-core/src/synfig/valuenode.h
index cd7ee94..fe7084d 100644
--- a/synfig-core/src/synfig/valuenode.h
+++ b/synfig-core/src/synfig/valuenode.h
@@ -80,6 +80,7 @@ class Canvas;
class LinkableValueNode;
class Layer;
class ParamVocab;
+class ValueNode_BLine;
/*! \class ValueNode
** \brief Base class for all Value Nodes
@@ -123,6 +124,8 @@ private:
etl::loose_handle<Canvas> canvas_;
//! The root canvas this Value Node belongs to
etl::loose_handle<Canvas> root_canvas_;
+ //! The bline the value node is attached to. Used for BLine 'dependant'
Value Nodes
+ ValueNode::RHandle bline_;
/*
-- ** -- S I G N A L S -------------------------------------------------------
@@ -227,12 +230,18 @@ public:
//! Returns a handle to the parent canvas, if it has one.
etl::loose_handle<Canvas> get_root_canvas()const { return root_canvas_;
}
+ //! Gets the bline of the Value Node
+ ValueNode::LooseHandle get_bline()const { return bline_; }
+
//! Sets the parent canvas for the Value Node
void set_parent_canvas(etl::loose_handle<Canvas> x);
//! Sets the root canvas parent for the Value Node
void set_root_canvas(etl::loose_handle<Canvas> x);
+ //! Sets the bline of the Value Node. Can be overrided by derived
classes
+ virtual void set_bline(ValueNode::Handle x);
+
//! Returns the relative ID of a Node when accessed form the \x Canvas
String get_relative_id(etl::loose_handle<const Canvas> x)const;
diff --git a/synfig-core/src/synfig/valuenode_wplist.cpp
b/synfig-core/src/synfig/valuenode_wplist.cpp
index 5d7b343..e30e532 100644
--- a/synfig-core/src/synfig/valuenode_wplist.cpp
+++ b/synfig-core/src/synfig/valuenode_wplist.cpp
@@ -429,17 +429,3 @@ ValueNode_WPList::interpolated_width(Real position, Time
time)const
next=find_next_valid_entry_by_position(position, time);
return widthpoint_interpolate(prev, next, position);
}
-
-
-ValueNode::LooseHandle
-ValueNode_WPList::get_bline()const
-{
- return bline_;
-}
-
-void
-ValueNode_WPList::set_bline(ValueNode::Handle b)
-{
- bline_=b;
-}
-
diff --git a/synfig-core/src/synfig/valuenode_wplist.h
b/synfig-core/src/synfig/valuenode_wplist.h
index 4cafce8..e0e67d6 100644
--- a/synfig-core/src/synfig/valuenode_wplist.h
+++ b/synfig-core/src/synfig/valuenode_wplist.h
@@ -62,8 +62,6 @@ synfig::Real widthpoint_interpolate(const WidthPoint& prev,
const WidthPoint& ne
*/
class ValueNode_WPList : public ValueNode_DynamicList
{
-private:
- ValueNode::RHandle bline_;
public:
@@ -102,10 +100,6 @@ public:
//! \param time the time when evaluates
//! \return the interpolated width
Real interpolated_width(Real position, Time time)const;
- //! Gets the bline RHandle
- ValueNode::LooseHandle get_bline()const;
- //! Sets the bline RHandle
- void set_bline(ValueNode::Handle b);
protected:
------------------------------------------------------------------------------
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