Enable Parameter Description for Linkable Value Nodes using ParamDesc class.
[synfig.git] / synfig-core / src / synfig / valuenode_timedswap.cpp
index 378535a..008d6a3 100644 (file)
@@ -88,8 +88,6 @@ ValueNode_TimedSwap::ValueNode_TimedSwap(const ValueBase &value):
 
        set_link("time",ValueNode_Const::create(Time(2)));
        set_link("length",ValueNode_Const::create(Time(1)));
-
-       DCAST_HACK_ENABLE();
 }
 
 ValueNode_TimedSwap*
@@ -278,3 +276,31 @@ ValueNode_TimedSwap::check_type(ValueBase::Type type)
                type==ValueBase::TYPE_TIME ||
                type==ValueBase::TYPE_VECTOR;
 }
+
+LinkableValueNode::Vocab
+ValueNode_TimedSwap::get_param_vocab()const
+{
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"before")
+               .set_local_name(_("Before"))
+               .set_description(_("The value node returned when current time is before 'time' - 'length'"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"after")
+               .set_local_name(_("After"))
+               .set_description(_("The value node returned when current time is after 'time'"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"time")
+               .set_local_name(_("Time"))
+               .set_description(_("The time when the linear interpolation ends"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"length")
+               .set_local_name(_("Length"))
+               .set_description(_("The length of time when the linear interpolation between 'Before' and 'After' is made"))
+       );
+
+       return ret;
+}