Enable Parameter Description for Linkable Value Nodes using ParamDesc class.
[synfig.git] / synfig-core / src / synfig / valuenode_scale.cpp
index b272d7d..2a22b50 100644 (file)
@@ -173,7 +173,7 @@ synfig::ValueNode_Scale::get_inverse(Time t, const synfig::Angle &target_value)
                        switch (get_type())
                        {
                                        default:
-                                       return (*value_node)(t).get(Angle()) + target_value / scalar_value;
+                                       return target_value / scalar_value;
                        }
                }
        return ValueBase();
@@ -275,3 +275,21 @@ ValueNode_Scale::check_type(ValueBase::Type type)
                type==ValueBase::TYPE_TIME ||
                type==ValueBase::TYPE_VECTOR;
 }
+
+LinkableValueNode::Vocab
+ValueNode_Scale::get_param_vocab()const
+{
+       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;
+}