X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_radialcomposite.cpp;h=85b882ab96d33ac221ac070fbac55b38da9f32e1;hb=dbc88fd05c8d29849d2e6227d23605508eb188ae;hp=a889c78c2c509a3b906e7677db437ffad5053e21;hpb=adfc80c126f482d7ea2bac38001a2c4a7c7df88c;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_radialcomposite.cpp b/synfig-core/src/synfig/valuenode_radialcomposite.cpp index a889c78..85b882a 100644 --- a/synfig-core/src/synfig/valuenode_radialcomposite.cpp +++ b/synfig-core/src/synfig/valuenode_radialcomposite.cpp @@ -55,6 +55,8 @@ using namespace synfig; synfig::ValueNode_RadialComposite::ValueNode_RadialComposite(const ValueBase &value): LinkableValueNode(value.get_type()) { + Vocab ret(get_children_vocab()); + set_children_vocab(ret); switch(get_type()) { case ValueBase::TYPE_VECTOR: @@ -313,3 +315,46 @@ ValueNode_RadialComposite::check_type(ValueBase::Type type) type==ValueBase::TYPE_VECTOR || type==ValueBase::TYPE_COLOR; } + +LinkableValueNode::Vocab +ValueNode_RadialComposite::get_children_vocab_vfunc()const +{ + if(children_vocab.size()) + return children_vocab; + + LinkableValueNode::Vocab ret; + + switch(get_type()) + { + case ValueBase::TYPE_COLOR: + ret.push_back(ParamDesc(ValueBase(),"y_luma") + .set_local_name(_("Luma")) + ); + ret.push_back(ParamDesc(ValueBase(),"saturation") + .set_local_name(_("Saturation")) + ); + ret.push_back(ParamDesc(ValueBase(),"hue") + .set_local_name(_("Hue")) + ); + ret.push_back(ParamDesc(ValueBase(),"alpha") + .set_local_name(_("Saturation")) + ); + return ret; + break; + case ValueBase::TYPE_VECTOR: + ret.push_back(ParamDesc(ValueBase(),"radius") + .set_local_name(_("Radius")) + .set_description(_("The length of the vector")) + ); + ret.push_back(ParamDesc(ValueBase(),"theta") + .set_local_name(_("Theta")) + .set_description(_("The angle of the vector with the X axis")) + ); + return ret; + break; + default: + break; + } + + return ret; +}