Module: synfig/synfig
Branch: genete_smart_link
Commit: 7f6cef11226c48906a883b5f411d33546d8c7c1c
URL:    
http://synfig.git.sourceforge.net/git/gitweb.cgi?p=synfig/synfig;a=commit;h=7f6cef11226c48906a883b5f411d33546d8c7c1c

Author: Carlos Lopez <[email protected]>
Date:   Wed Sep 15 19:35:03 2010 +0200

Split tangents are now red and merged tangents are yellow.

---

 .../src/gui/workarearenderer/renderer_ducks.cpp    |   29 +++++++++++++++++++-
 1 files changed, 28 insertions(+), 1 deletions(-)

diff --git a/synfig-studio/src/gui/workarearenderer/renderer_ducks.cpp 
b/synfig-studio/src/gui/workarearenderer/renderer_ducks.cpp
index 030a91d..8760b79 100644
--- a/synfig-studio/src/gui/workarearenderer/renderer_ducks.cpp
+++ b/synfig-studio/src/gui/workarearenderer/renderer_ducks.cpp
@@ -304,7 +304,34 @@ Renderer_Ducks::render_vfunc(
                if(!(*iter)->get_editable())
                        screen_duck.color=(DUCK_COLOR_NOT_EDITABLE);
                else if((*iter)->get_tangent())
-                       screen_duck.color=((*iter)->get_scalar()<0 ? 
DUCK_COLOR_TANGENT_1 : DUCK_COLOR_TANGENT_1);
+               {
+                       // Check if we can reach the canvas and set the time to
+                       // evaluate the split value accordingly
+                       synfig::Canvas::Handle 
canvas_h(get_work_area()->get_canvas());
+                       synfig::Time 
time(canvas_h?canvas_h->get_time():synfig::Time(0));
+                       // Retrieve the split value of the bline point.
+                       synfigapp::ValueDesc& v_d((*iter)->get_value_desc());
+                       synfig::LinkableValueNode::Handle parent;
+                       if(v_d.parent_is_linkable_value_node())
+                       {
+                               parent=v_d.get_parent_value_node();
+                               bool split;
+                               synfig::ValueNode::Handle 
child(parent->get_link("split"));
+                               
if(synfig::ValueNode_Animated::Handle::cast_dynamic(child))
+                               {
+                                       synfig::ValueNode_Animated::Handle 
animated_child(synfig::ValueNode_Animated::Handle::cast_dynamic(child));
+                                       
split=animated_child->new_waypoint_at_time(time).get_value(time).get(split);
+                               }
+                               else 
if(synfig::ValueNode_Const::Handle::cast_dynamic(child))
+                               {
+                                       synfig::ValueNode_Const::Handle 
const_child(synfig::ValueNode_Const::Handle::cast_dynamic(child));
+                                       
split=(const_child->get_value()).get(split);
+                               }
+                               screen_duck.color=(split? DUCK_COLOR_TANGENT_2 
: DUCK_COLOR_TANGENT_1);
+                       }
+                       else
+                               screen_duck.color=DUCK_COLOR_TANGENT_1;
+               }
                else if((*iter)->get_type()&Duck::TYPE_VERTEX)
                        screen_duck.color=DUCK_COLOR_VERTEX;
                else if((*iter)->get_type()&Duck::TYPE_RADIUS)


------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
Synfig-devl mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/synfig-devl

Reply via email to