X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_reciprocal.cpp;h=55dde100ba3827cf72b1a11f3a0035f9112fd38a;hb=dbc88fd05c8d29849d2e6227d23605508eb188ae;hp=d31a995fef10a041248a07dd4d1ef07907e5b87d;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_reciprocal.cpp b/synfig-core/src/synfig/valuenode_reciprocal.cpp index d31a995..55dde10 100644 --- a/synfig-core/src/synfig/valuenode_reciprocal.cpp +++ b/synfig-core/src/synfig/valuenode_reciprocal.cpp @@ -53,6 +53,8 @@ using namespace synfig; ValueNode_Reciprocal::ValueNode_Reciprocal(const ValueBase &x): LinkableValueNode(x.get_type()) { + Vocab ret(get_children_vocab()); + set_children_vocab(ret); Real value(x.get(Real())); Real infinity(999999.0); Real epsilon(0.000001); @@ -187,3 +189,29 @@ ValueNode_Reciprocal::check_type(ValueBase::Type type) { return type==ValueBase::TYPE_REAL; } + +LinkableValueNode::Vocab +ValueNode_Reciprocal::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 calculate its reciprocal")) + ); + + ret.push_back(ParamDesc(ValueBase(),"epsilon") + .set_local_name(_("Epsilon")) + .set_description(_("The value used to decide whether 'Link' is too small to obtain its reciprocal")) + ); + + ret.push_back(ParamDesc(ValueBase(),"infinite") + .set_local_name(_("Infinite")) + .set_description(_("The resulting value when 'Link' < 'Epsilon'")) + ); + + return ret; +}