diff options
Diffstat (limited to 'source/blender/editors/space_view3d/drawanimviz.c')
-rw-r--r-- | source/blender/editors/space_view3d/drawanimviz.c | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c index 8db1ddb7505..fb271556a9c 100644 --- a/source/blender/editors/space_view3d/drawanimviz.c +++ b/source/blender/editors/space_view3d/drawanimviz.c @@ -31,39 +31,22 @@ #include <string.h> #include <math.h> -#ifdef HAVE_CONFIG_H -#include <config.h> -#endif - -#include "MEM_guardedalloc.h" #include "DNA_anim_types.h" #include "DNA_armature_types.h" #include "DNA_scene_types.h" #include "DNA_screen_types.h" #include "DNA_view3d_types.h" +#include "DNA_object_types.h" #include "BLI_blenlib.h" #include "BLI_math.h" #include "BLI_dlrbTree.h" -#include "BKE_anim.h" #include "BKE_animsys.h" #include "BKE_action.h" -#include "BKE_armature.h" -#include "BKE_constraint.h" -#include "BKE_context.h" -#include "BKE_depsgraph.h" -#include "BKE_DerivedMesh.h" -#include "BKE_global.h" -#include "BKE_main.h" -#include "BKE_modifier.h" -#include "BKE_nla.h" -#include "BKE_object.h" -#include "BKE_utildefines.h" #include "BIF_gl.h" -#include "BIF_glutil.h" #include "ED_armature.h" #include "ED_keyframes_draw.h" @@ -203,6 +186,21 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar, glVertex3fv(mpv->co); glEnd(); + /* 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) { + UI_ThemeColor(TH_CFRAME); + glPointSize(6.0f); + + glBegin(GL_POINTS); + mpv = mpv_start + (CFRA - sfra); + glVertex3fv(mpv->co); + glEnd(); + + glPointSize(1.0f); + UI_ThemeColor(TH_TEXT_HI); + } + /* Draw frame numbers at each framestep value */ if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) { for (i=0, mpv=mpv_start; i < len; i+=stepsize, mpv+=stepsize) { @@ -224,9 +222,9 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar, } } } - + /* Keyframes - dots and numbers */ - if (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) { + if (avs->path_viewflag & MOTIONPATH_VIEW_KFRAS) { AnimData *adt= BKE_animdata_from_id(&ob->id); DLRBT_Tree keys; @@ -234,8 +232,10 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar, BLI_dlrbTree_init(&keys); if (adt) { - /* for now, it is assumed that keyframes for bones are all grouped in a single group */ - if (pchan) { + /* it is assumed that keyframes for bones are all grouped in a single group + * unless an option is set to always use the whole action + */ + if ((pchan) && (avs->path_viewflag & MOTIONPATH_VIEW_KFACT)==0) { bActionGroup *agrp= action_groups_find_named(adt->action, pchan->name); if (agrp) { @@ -265,7 +265,7 @@ void draw_motion_path_instance(Scene *scene, View3D *v3d, ARegion *ar, glPointSize(1.0f); /* Draw frame numbers of keyframes */ - if (avs->path_viewflag & MOTIONPATH_VIEW_FNUMS) { + if (avs->path_viewflag & MOTIONPATH_VIEW_KFNOS) { for (i=0, mpv=mpv_start; i < len; i++, mpv++) { float mframe= (float)(sfra + i); |