X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_gradientrotate.cpp;h=709a99aeb1d72fdfd1bdca74c6556d2ed65ffa5e;hb=dbc88fd05c8d29849d2e6227d23605508eb188ae;hp=3e06bfc84dcdf26929e5388b8dfc5a0aeeef8df9;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_gradientrotate.cpp b/synfig-core/src/synfig/valuenode_gradientrotate.cpp index 3e06bfc..709a99a 100644 --- a/synfig-core/src/synfig/valuenode_gradientrotate.cpp +++ b/synfig-core/src/synfig/valuenode_gradientrotate.cpp @@ -55,9 +55,10 @@ using namespace synfig; synfig::ValueNode_GradientRotate::ValueNode_GradientRotate(const Gradient& x): LinkableValueNode(synfig::ValueBase::TYPE_GRADIENT) { + Vocab ret(get_children_vocab()); + set_children_vocab(ret); set_link("gradient",ValueNode_Const::create(x)); set_link("offset",ValueNode_Const::create(Real(0))); - DCAST_HACK_ENABLE(); } LinkableValueNode* @@ -196,3 +197,24 @@ ValueNode_GradientRotate::check_type(ValueBase::Type type) { return type==ValueBase::TYPE_GRADIENT; } + +LinkableValueNode::Vocab +ValueNode_GradientRotate::get_children_vocab_vfunc()const +{ + if(children_vocab.size()) + return children_vocab; + + LinkableValueNode::Vocab ret; + + ret.push_back(ParamDesc(ValueBase(),"gradient") + .set_local_name(_("Gradient")) + .set_description(_("The source gradient to rotate")) + ); + + ret.push_back(ParamDesc(ValueBase(),"offset") + .set_local_name(_("Offset")) + .set_description(_("The amount to offset the gradient")) + ); + + return ret; +}