int t1_index(value_node_composite->get_link_index_from_name("t1"));
int t2_index(value_node_composite->get_link_index_from_name("t2"));
int width_index(value_node_composite->get_link_index_from_name("width"));
+ int vertex_amount_index(bline_vertex->get_link_index_from_name("amount"));
ValueNode::Handle t1_value_node(value_node_composite->get_link(t1_index));
ValueNode::Handle t2_value_node(value_node_composite->get_link(t2_index));
ValueNode::Handle width_value_node(value_node_composite->get_link(width_index));
+ ValueNode::Handle amount_value_node(bline_vertex->get_link(vertex_amount_index));
ValueNode_BLineCalcTangent::Handle bline_tangent_1(ValueNode_BLineCalcTangent::Handle::cast_dynamic(t1_value_node));
ValueNode_BLineCalcTangent::Handle bline_tangent_2(ValueNode_BLineCalcTangent::Handle::cast_dynamic(t2_value_node));
ValueNode_BLineCalcWidth::Handle bline_width(ValueNode_BLineCalcWidth::Handle::cast_dynamic(width_value_node));
- // these 3 are all the same at the moment, but let's play it safe, just in case it changes
- int tangent_amount_index(bline_tangent_1->get_link_index_from_name("amount"));
- int vertex_amount_index(bline_vertex->get_link_index_from_name("amount"));
- int width_amount_index(bline_width->get_link_index_from_name("amount"));
-
- ValueNode::Handle amount_value_node(bline_vertex->get_link(vertex_amount_index));
-
if (bline_tangent_1 || bline_tangent_2 || bline_width)
{
synfig::Real radius = 0.0;
// we need to update the position of the tangent ducks - but how do we find these ducks?
// this is a brute force search - but is there a better way to do it?
if (bline_tangent_1 &&
- bline_tangent_1->get_link(tangent_amount_index) == amount_value_node)
+ bline_tangent_1->get_link(bline_tangent_1->get_link_index_from_name("amount")) == amount_value_node)
{
Vector tangent = (*bline_tangent_1)(time, amount).get(Vector());
DuckList::iterator iter;
}
if (bline_tangent_2 &&
- bline_tangent_2->get_link(tangent_amount_index) == amount_value_node)
+ bline_tangent_2->get_link(bline_tangent_2->get_link_index_from_name("amount")) == amount_value_node)
{
Vector tangent = (*bline_tangent_2)(time, amount).get(Vector());
DuckList::iterator iter;
}
if (bline_width &&
- bline_width->get_link(width_amount_index) == amount_value_node)
+ bline_width->get_link(bline_width->get_link_index_from_name("amount")) == amount_value_node)
{
Real width = (*bline_width)(time, amount).get(Real());
DuckList::iterator iter;