Remove .gitignore do nothing is ignored.
[synfig.git] / synfig-core / trunk / src / synfig / valuenode_blinecalcvertex.cpp
index 83e2552..a6fc589 100644 (file)
@@ -6,6 +6,7 @@
 **
 **     \legal
 **     Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
+**     Copyright (c) 2008 Chris Moore
 **
 **     This package is free software; you can redistribute it and/or
 **     modify it under the terms of the GNU General Public License as
@@ -86,7 +87,10 @@ ValueNode_BLineCalcVertex::~ValueNode_BLineCalcVertex()
 ValueBase
 ValueNode_BLineCalcVertex::operator()(Time t)const
 {
-       const std::vector<ValueBase> bline((*bline_)(t));
+       if (getenv("SYNFIG_DEBUG_VALUENODE_OPERATORS"))
+               printf("%s:%d operator()\n", __FILE__, __LINE__);
+
+       const std::vector<ValueBase> bline((*bline_)(t).get_list());
        handle<ValueNode_BLine> bline_value_node(bline_);
        const bool looped(bline_value_node->get_loop());
        int size = bline.size(), from_vertex;
@@ -140,23 +144,15 @@ ValueNode_BLineCalcVertex::get_local_name()const
 }
 
 bool
-ValueNode_BLineCalcVertex::set_link_vfunc(int i,ValueNode::Handle x)
+ValueNode_BLineCalcVertex::set_link_vfunc(int i,ValueNode::Handle value)
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
-               case 0:
-                       bline_=x;
-                       signal_child_changed()(i);signal_value_changed()();
-                       return true;
-               case 1:
-                       loop_=x;
-                       signal_child_changed()(i);signal_value_changed()();
-                       return true;
-               case 2:
-                       amount_=x;
-                       signal_child_changed()(i);signal_value_changed()();
-                       return true;
+       case 0: CHECK_TYPE_AND_SET_VALUE(bline_,  ValueBase::TYPE_LIST);
+       case 1: CHECK_TYPE_AND_SET_VALUE(loop_,   ValueBase::TYPE_BOOL);
+       case 2: CHECK_TYPE_AND_SET_VALUE(amount_, ValueBase::TYPE_REAL);
        }
        return false;
 }
@@ -165,6 +161,7 @@ ValueNode::LooseHandle
 ValueNode_BLineCalcVertex::get_link_vfunc(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return bline_;
@@ -185,6 +182,7 @@ String
 ValueNode_BLineCalcVertex::link_name(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return "bline";
@@ -198,6 +196,7 @@ String
 ValueNode_BLineCalcVertex::link_local_name(int i)const
 {
        assert(i>=0 && i<link_count());
+
        switch(i)
        {
                case 0: return _("BLine");