+
+
+Action::ValueDescLinkOpposite::ValueDescLinkOpposite()
+{
+}
+
+Action::ParamVocab
+Action::ValueDescLinkOpposite::get_param_vocab()
+{
+ return Action::ValueDescLink::get_param_vocab();
+}
+
+bool
+Action::ValueDescLinkOpposite::is_candidate(const ParamList &x)
+{
+ // If action parameters are not Value Desc
+ if(!candidate_check(get_param_vocab(),x))
+ return false;
+
+ int total_tangents=0;
+ ParamList::const_iterator iter;
+ //Search thru all the Param and pick up the value descriptions
+ for(iter=x.begin(); iter!=x.end(); iter++)
+ {
+ if(iter->first == "value_desc")
+ {
+ ValueDesc v_desc(iter->second.get_value_desc());
+ // if the value description parent is linkable value node, continue
+ if(!v_desc.parent_is_linkable_value_node())
+ return false;
+ // if the link describe to any tangent (index 4 or 5), continue
+ if(v_desc.get_index() != 4 && v_desc.get_index() != 5)
+ return false;
+ total_tangents++;
+ }
+ }
+ // If we found two tangents then continue
+ if(total_tangents!=2)
+ return false;
+ // We have reached exactly two tangents
+ return true;
+}
+
+bool
+Action::ValueDescLinkOpposite::set_param(const synfig::String& name, const Action::Param ¶m)
+{
+ return Action::ValueDescLink::set_param(name,param);
+}
+
+bool
+Action::ValueDescLinkOpposite::is_ready()const
+{
+ return Action::ValueDescLink::is_ready();
+}
+
+void
+Action::ValueDescLinkOpposite::prepare()
+{
+ // prepare to do a opposite link and reuse the code from ValueDescLink
+ link_opposite=true;
+ ValueDescLink::prepare();
+}