X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_linear.cpp;h=2fabe010938af34f0de9b094e3645b1b83565452;hb=d4cb326591ea23f82d341eb368b3d183b46f56c7;hp=583612ee62dd82e92cb2467c6c28963540fa9660;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_linear.cpp b/synfig-core/src/synfig/valuenode_linear.cpp index 583612e..2fabe01 100644 --- a/synfig-core/src/synfig/valuenode_linear.cpp +++ b/synfig-core/src/synfig/valuenode_linear.cpp @@ -84,8 +84,6 @@ ValueNode_Linear::ValueNode_Linear(const ValueBase &value): default: throw Exception::BadType(ValueBase::type_local_name(get_type())); } - - DCAST_HACK_ENABLE(); } LinkableValueNode* @@ -227,3 +225,37 @@ ValueNode_Linear::get_link_index_from_name(const String &name)const throw Exception::BadLinkName(name); } + + +LinkableValueNode::Vocab +ValueNode_Linear::get_children_vocab_vfunc()const +{ + LinkableValueNode::Vocab ret; + + switch(get_type()) + { + case ValueBase::TYPE_ANGLE: + case ValueBase::TYPE_COLOR: + case ValueBase::TYPE_INTEGER: + case ValueBase::TYPE_REAL: + case ValueBase::TYPE_TIME: + ret.push_back(ParamDesc(ValueBase(),"slope") + .set_local_name(_("Rate")) + .set_description(_("Value that is multiplied by the current time (in seconds)")) + ); + break; + case ValueBase::TYPE_VECTOR: + default: + ret.push_back(ParamDesc(ValueBase(),"slope") + .set_local_name(_("Slope")) + .set_description(_("Value that is multiplied by the current time (in seconds)")) + ); + } + + ret.push_back(ParamDesc(ValueBase(),"offset") + .set_local_name(_("Offset")) + .set_description(_("Returned value when the current time is zero")) + ); + + return ret; +}