Fix T59675: Motion path frame numbers at wrong positions
authorJacques Lucke <mail@jlucke.com>
Sat, 29 Dec 2018 17:34:25 +0000 (18:34 +0100)
committerJacques Lucke <mail@jlucke.com>
Sat, 29 Dec 2018 17:34:25 +0000 (18:34 +0100)
Reviewed By: brecht

Differential Revision: https://developer.blender.org/D4113

source/blender/draw/intern/draw_anim_viz.c

index 4ec1f76..871358f 100644 (file)
@@ -267,15 +267,13 @@ static void MPATH_cache_motion_path(MPATH_PassList *psl,
                        int frame = sfra + i;
                        char numstr[32];
                        size_t numstr_len;
-                       float co[3];
                        bool is_keyframe = (mpv->flag & MOTIONPATH_VERT_KEY) != 0;
 
                        if ((show_keyframes && show_kf_no && is_keyframe) ||
                            ((avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) && (i == 0)))
                        {
                                numstr_len = sprintf(numstr, " %d", frame);
-                               mul_v3_m4v3(co, ob->imat, mpv->co);
-                               DRW_text_cache_add(dt, co, numstr, numstr_len, 0, 0, txt_flag, (is_keyframe) ? col_kf : col);
+                               DRW_text_cache_add(dt, mpv->co, numstr, numstr_len, 0, 0, txt_flag, (is_keyframe) ? col_kf : col);
                        }
                        else if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) {
                                bMotionPathVert *mpvP = (mpv - stepsize);
@@ -283,8 +281,7 @@ static void MPATH_cache_motion_path(MPATH_PassList *psl,
                                /* only draw framenum if several consecutive highlighted points don't occur on same point */
                                if ((equals_v3v3(mpv->co, mpvP->co) == 0) || (equals_v3v3(mpv->co, mpvN->co) == 0)) {
                                        numstr_len = sprintf(numstr, " %d", frame);
-                                       mul_v3_m4v3(co, ob->imat, mpv->co);
-                                       DRW_text_cache_add(dt, co, numstr, numstr_len, 0, 0, txt_flag, col);
+                                       DRW_text_cache_add(dt, mpv->co, numstr, numstr_len, 0, 0, txt_flag, col);
                                }
                        }
                }