Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_vectorlength.cpp
index 3839ad8..dc69acd 100644 (file)
@@ -53,6 +53,8 @@ using namespace synfig;
 ValueNode_VectorLength::ValueNode_VectorLength(const ValueBase &value):
        LinkableValueNode(value.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        switch(value.get_type())
        {
        case ValueBase::TYPE_REAL:
@@ -164,3 +166,19 @@ ValueNode_VectorLength::check_type(ValueBase::Type type)
 {
        return type==ValueBase::TYPE_REAL;
 }
+
+LinkableValueNode::Vocab
+ValueNode_VectorLength::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"vector")
+               .set_local_name(_("Vector"))
+               .set_description(_("The vector where the length is calculated from"))
+       );
+
+       return ret;
+}