X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-core%2Fsrc%2Fsynfig%2Fvaluenode_composite.cpp;h=342f8abacc0cc7dca9d1d3a7bc6b748ece7aeb4e;hb=dbc88fd05c8d29849d2e6227d23605508eb188ae;hp=dfde2e98dda41ad18d7d37a7bdc9d7a8427b9a8d;hpb=1a1e0c7df827bcb4b68d9781101c72a7ca64185b;p=synfig.git diff --git a/synfig-core/src/synfig/valuenode_composite.cpp b/synfig-core/src/synfig/valuenode_composite.cpp index dfde2e9..342f8ab 100644 --- a/synfig-core/src/synfig/valuenode_composite.cpp +++ b/synfig-core/src/synfig/valuenode_composite.cpp @@ -60,6 +60,8 @@ using namespace synfig; synfig::ValueNode_Composite::ValueNode_Composite(const ValueBase &value): LinkableValueNode(value.get_type()) { + Vocab ret(get_children_vocab()); + set_children_vocab(ret); switch(get_type()) { case ValueBase::TYPE_VECTOR: @@ -444,3 +446,92 @@ ValueNode_Composite::check_type(ValueBase::Type type) type==ValueBase::TYPE_COLOR || type==ValueBase::TYPE_BLINEPOINT; } + +LinkableValueNode::Vocab +ValueNode_Composite::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(),"red") + .set_local_name(_("Red")) + .set_description(_("The red component of the color")) + ); + ret.push_back(ParamDesc(ValueBase(),"green") + .set_local_name(_("Green")) + .set_description(_("The green component of the color")) + ); + ret.push_back(ParamDesc(ValueBase(),"blue") + .set_local_name(_("Blue")) + .set_description(_("The blue component of the color")) + ); + ret.push_back(ParamDesc(ValueBase(),"alpha") + .set_local_name(_("Alpha")) + .set_description(_("The alpha of the color")) + ); + return ret; + case ValueBase::TYPE_SEGMENT: + ret.push_back(ParamDesc(ValueBase(),"p1") + .set_local_name(_("Vertex 1")) + .set_description(_("The first vertex of the segment")) + ); + ret.push_back(ParamDesc(ValueBase(),"t1") + .set_local_name(_("Tangent 1")) + .set_description(_("The first tangent of the segment")) + ); + ret.push_back(ParamDesc(ValueBase(),"p2") + .set_local_name(_("Vertex 2")) + .set_description(_("The second vertex of the segment")) + ); + ret.push_back(ParamDesc(ValueBase(),"t2") + .set_local_name(_("Tangent 2")) + .set_description(_("The second tangent of the segment")) + ); + return ret; + case ValueBase::TYPE_VECTOR: + ret.push_back(ParamDesc(ValueBase(),"x") + .set_local_name(_("X-Axis")) + .set_description(_("The X-Axis component of the vector")) + ); + ret.push_back(ParamDesc(ValueBase(),"y") + .set_local_name(_("Y-Axis")) + .set_description(_("The Y-Axis component of the vector")) + ); + return ret; + case ValueBase::TYPE_BLINEPOINT: + ret.push_back(ParamDesc(ValueBase(),"point") + .set_local_name(_("Vertex")) + .set_description(_("The vertex of the BLine Point")) + ); + ret.push_back(ParamDesc(ValueBase(),"width") + .set_local_name(_("Width")) + .set_description(_("The width of the BLine Point")) + ); + ret.push_back(ParamDesc(ValueBase(),"origin") + .set_local_name(_("Origin")) + .set_description(_("Defines the Off and On position relative to neighbours")) + ); + ret.push_back(ParamDesc(ValueBase(),"split") + .set_local_name(_("Split")) + .set_description(_("When checked, tangents are independent")) + ); + ret.push_back(ParamDesc(ValueBase(),"t1") + .set_local_name(_("Tangent 1")) + .set_description(_("The first tangent of the BLine Point")) + ); + ret.push_back(ParamDesc(ValueBase(),"t2") + .set_local_name(_("Tangent 2")) + .set_description(_("The second tangent of the BLine Point")) + ); + return ret; + default: + break; + } + + return ret; +}