Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_blinecalcwidth.cpp
index 4d8ee0e..d7db04e 100644 (file)
@@ -58,6 +58,8 @@ using namespace synfig;
 ValueNode_BLineCalcWidth::ValueNode_BLineCalcWidth(const ValueBase::Type &x):
        LinkableValueNode(x)
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        if(x!=ValueBase::TYPE_REAL)
                throw Exception::BadType(ValueBase::type_local_name(x));
 
@@ -228,3 +230,35 @@ ValueNode_BLineCalcWidth::check_type(ValueBase::Type type)
 {
        return type==ValueBase::TYPE_REAL;
 }
+
+LinkableValueNode::Vocab
+ValueNode_BLineCalcWidth::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"bline")
+               .set_local_name(_("BLine"))
+               .set_description(_("The BLine where the width is linked to"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"loop")
+               .set_local_name(_("Loop"))
+               .set_description(_("When checked, the amount would loop"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"amount")
+               .set_local_name(_("Amount"))
+               .set_description(_("The position of the linked width on the BLine (0,1]"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"scale")
+               .set_local_name(_("Scale"))
+               .set_description(_("Scale of the width"))
+       );
+
+       return ret;
+}
+