return false;
etl::handle<Duck> vertex_duck(last_duck());
vertex_duck->set_type(Duck::TYPE_VERTEX);
- if(!add_to_ducks(synfigapp::ValueDesc(value_node,4),canvas_view,transform_stack))
+ if(!add_to_ducks(synfigapp::ValueDesc(value_node,4,-TANGENT_HANDLE_SCALE),canvas_view,transform_stack))
return false;
etl::handle<Duck> t1_duck(last_duck());
// If the tangents are split
if((*value_node->get_link("split"))(get_time()).get(bool()))
{
- if(!add_to_ducks(synfigapp::ValueDesc(value_node,5),canvas_view,transform_stack))
+ if(!add_to_ducks(synfigapp::ValueDesc(value_node,5,TANGENT_HANDLE_SCALE),canvas_view,transform_stack))
return false;
t2_duck=last_duck();
t2_duck->set_origin(vertex_duck);
}
else
{
- if(!add_to_ducks(synfigapp::ValueDesc(value_node,4),canvas_view,transform_stack))
+ if(!add_to_ducks(synfigapp::ValueDesc(value_node,4,TANGENT_HANDLE_SCALE),canvas_view,transform_stack))
return false;
t2_duck=last_duck();
t2_duck->set_origin(vertex_duck);
// Add the tangent1 duck
if(composite_vertex_value_node)
{
- if(!add_to_ducks(synfigapp::ValueDesc(composite_vertex_value_node,4),canvas_view,transform_stack))
+ if(!add_to_ducks(synfigapp::ValueDesc(composite_vertex_value_node,4,-TANGENT_BEZIER_SCALE),canvas_view,transform_stack))
return false;
tduck=last_duck();
}
if(composite_vertex_value_node)
{
int i=bline_point.get_split_tangent_flag()?5:4;
- if(!add_to_ducks(synfigapp::ValueDesc(composite_vertex_value_node,i),canvas_view,transform_stack,0,2))
+ if(!add_to_ducks(synfigapp::ValueDesc(composite_vertex_value_node,i,TANGENT_BEZIER_SCALE),canvas_view,transform_stack,0,2))
return false;
tduck=last_duck();
}
// Info for exported ValueNode
synfig::Canvas::Handle canvas;
+ // Info for visual editon
+ synfig::Real scalar;
+
public:
bool operator==(const ValueDesc &rhs)const
{
return true;
if((canvas||rhs.canvas) && canvas!=rhs.canvas)
return false;
- if((parent_value_node||rhs.parent_value_node) && parent_value_node!=rhs.parent_value_node)
+ if((parent_value_node||rhs.parent_value_node) && (parent_value_node!=rhs.parent_value_node))
+ return false;
+ if(scalar!=rhs.scalar)
return false;
if(index!=rhs.index)
return false;
layer(layer),
name(param_name) { }
- ValueDesc(synfig::LinkableValueNode::Handle parent_value_node,int index):
+ ValueDesc(synfig::LinkableValueNode::Handle parent_value_node,int index, synfig::Real s=1.12):
parent_value_node(parent_value_node),
- index(index) { }
+ index(index),
+ scalar(s) { }
// ValueDesc(synfig::LinkableValueNode::Handle parent_value_node,const synfig::String& param_name):
// parent_value_node(parent_value_node),
synfig::ValueNode::Handle get_parent_value_node()const { assert(parent_is_value_node()); return parent_value_node; }
int get_index()const { assert(parent_is_linkable_value_node()); return index; }
+ synfig::Real get_scalar()const { assert(parent_is_linkable_value_node()); return scalar; }
synfig::String get_name()const { assert(parent_is_linkable_value_node()); return (synfig::LinkableValueNode::Handle::cast_reinterpret(parent_value_node))->link_name(index); }
synfig::Time get_waypoint_time()const { assert(parent_is_waypoint()); return waypoint_time; }
synfig::String
get_description(bool show_exported_name = true)const;
+
}; // END of class ValueDesc
}; // END of namespace synfigapp_instance