Partial Bugfix [#30097] : Current frame indicator on Motion Paths drawn
authorJoshua Leung <aligorith@gmail.com>
Thu, 8 Mar 2012 10:53:40 +0000 (10:53 +0000)
committerJoshua Leung <aligorith@gmail.com>
Thu, 8 Mar 2012 10:53:40 +0000 (10:53 +0000)
incorrectly

When the current frame occurs outside the current visible range a given motion
path, the point lookup was seeking past the ends of the path's point cache,
causing sporadic flickering of current frame indicator at 0,0,0.

source/blender/editors/space_view3d/drawanimviz.c

index 922102e3921ebcd9bdf22fecc77cbe01a3754d27..e15252056cc27c0bfc82f2a502d9125b9a967596 100644 (file)
@@ -195,7 +195,9 @@ void draw_motion_path_instance(Scene *scene,
        
        /* Draw big green dot where the current frame is */
        // NOTE: only do this when drawing keyframes for now... 
-       if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) {
+       if ((avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) &&
+               (sfra < CFRA) && (CFRA <= efra))
+       {
                UI_ThemeColor(TH_CFRAME);
                glPointSize(6.0f);