Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_atan2.cpp
index 89bedc2..ff1fb18 100644 (file)
@@ -53,6 +53,8 @@ using namespace synfig;
 ValueNode_Atan2::ValueNode_Atan2(const ValueBase &value):
        LinkableValueNode(value.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(value.get_type())
        {
        case ValueBase::TYPE_ANGLE:
@@ -176,3 +178,21 @@ ValueNode_Atan2::get_link_index_from_name(const String &name)const
 
        throw Exception::BadLinkName(name);
 }
+
+LinkableValueNode::Vocab
+ValueNode_Atan2::get_children_vocab_vfunc()const
+{
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"x")
+               .set_local_name(_("X"))
+               .set_description(_("Cosine of the angle"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"y")
+               .set_local_name(_("Y"))
+               .set_description(_("Sine of the angle"))
+       );
+
+       return ret;
+}