From b342fcadc2077545469c2c967dde580231e6f77b Mon Sep 17 00:00:00 2001 From: dooglus Date: Sun, 30 Mar 2008 20:44:44 +0000 Subject: [PATCH] Allow manipulation of BLineCalcTangent angle offsets via the angle duck. git-svn-id: http://svn.voria.com/code@1947 1f10aa63-cdf2-0310-b900-c93c546f37ac --- synfig-studio/trunk/src/gtkmm/canvasview.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/synfig-studio/trunk/src/gtkmm/canvasview.cpp b/synfig-studio/trunk/src/gtkmm/canvasview.cpp index b9cc89f..8991ada 100644 --- a/synfig-studio/trunk/src/gtkmm/canvasview.cpp +++ b/synfig-studio/trunk/src/gtkmm/canvasview.cpp @@ -2650,6 +2650,13 @@ CanvasView::on_duck_changed(const synfig::Point &value,const synfigapp::ValueDes bool CanvasView::on_duck_angle_changed(const synfig::Angle &rotation,const synfigapp::ValueDesc& value_desc) { + if (ValueNode_BLineCalcTangent::Handle bline_tangent = ValueNode_BLineCalcTangent::Handle::cast_dynamic(value_desc.get_value_node())) + { + int offset_index(bline_tangent->get_link_index_from_name("offset")); + Angle old_offset((*(bline_tangent->get_link(offset_index)))(get_time()).get(Angle())); + return canvas_interface()->change_value(synfigapp::ValueDesc(bline_tangent,offset_index), old_offset + rotation); + } + // \todo will this really always be the case? assert(value_desc.get_value_type() == ValueBase::TYPE_ANGLE); return canvas_interface()->change_value(value_desc, value_desc.get_value(get_time()).get(Angle()) + rotation); -- 2.7.4