Use link_count from children vocabulary and return the stored vocabulary if already...
[synfig.git] / synfig-core / src / synfig / valuenode_scale.cpp
index 4cfbb92..7552cdb 100644 (file)
@@ -59,6 +59,8 @@ using namespace synfig;
 ValueNode_Scale::ValueNode_Scale(const ValueBase &value):
        LinkableValueNode(value.get_type())
 {
+       Vocab ret(get_children_vocab());
+       set_children_vocab(ret);
        set_link("scalar",ValueNode::Handle(ValueNode_Const::create(Real(1.0))));
        ValueBase::Type id(value.get_type());
 
@@ -275,3 +277,24 @@ ValueNode_Scale::check_type(ValueBase::Type type)
                type==ValueBase::TYPE_TIME ||
                type==ValueBase::TYPE_VECTOR;
 }
+
+LinkableValueNode::Vocab
+ValueNode_Scale::get_children_vocab_vfunc()const
+{
+       if(children_vocab.size())
+               return children_vocab;
+
+       LinkableValueNode::Vocab ret;
+
+       ret.push_back(ParamDesc(ValueBase(),"link")
+               .set_local_name(_("Link"))
+               .set_description(_("The value node used to scale"))
+       );
+
+       ret.push_back(ParamDesc(ValueBase(),"scalar")
+               .set_local_name(_("Scalar"))
+               .set_description(_("Value that multiplies the value node"))
+       );
+
+       return ret;
+}