Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_cos.cpp
index 17d49d6..2eef6cd 100644 (file)
@@ -53,6 +53,8 @@ using namespace synfig;
 ValueNode_Cos::ValueNode_Cos(const ValueBase &value):
        LinkableValueNode(value.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(value.get_type())
        {
        case ValueBase::TYPE_REAL:
@@ -182,3 +184,24 @@ ValueNode_Cos::get_link_index_from_name(const String &name)const
 
        throw Exception::BadLinkName(name);
 }
+
+LinkableValueNode::Vocab
+ValueNode_Cos::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"angle")
+               .set_local_name(_("Angle"))
+               .set_description(_("Value to calculate the cosine"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"amp")
+               .set_local_name(_("Amplitude"))
+               .set_description(_("Multiplier of the resulting cosine"))
+       );
+
+       return ret;
+}