From: Joshua Leung Date: Sat, 3 May 2008 02:50:07 +0000 (+0000) Subject: Added missing menu entries for Preview Range tools X-Git-Tag: v2.46~162 X-Git-Url: https://git.blender.org/gitweb/gitweb.cgi/blender.git/commitdiff_plain/f190e4e0e20d73f9fdeb75680c30fe6b0bb7428b Added missing menu entries for Preview Range tools --- diff --git a/source/blender/src/header_action.c b/source/blender/src/header_action.c index 2ed5107da29..9c7046c5111 100644 --- a/source/blender/src/header_action.c +++ b/source/blender/src/header_action.c @@ -95,7 +95,10 @@ enum { ACTMENU_VIEW_NOHIDE, ACTMENU_VIEW_TRANSDELDUPS, ACTMENU_VIEW_HORIZOPTIMISE, - ACTMENU_VIEW_GCOLORS + ACTMENU_VIEW_GCOLORS, + ACTMENU_VIEW_PREVRANGESET, + ACTMENU_VIEW_PREVRANGECLEAR, + ACTMENU_VIEW_PREVRANGEAUTO }; enum { @@ -350,6 +353,15 @@ static void do_action_viewmenu(void *arg, int event) case ACTMENU_VIEW_GCOLORS: /* Draw grouped-action channels using its group's color */ G.saction->flag ^= SACTION_NODRAWGCOLORS; break; + case ACTMENU_VIEW_PREVRANGESET: /* Set preview range */ + anim_previewrange_set(); + break; + case ACTMENU_VIEW_PREVRANGECLEAR: /* Clear preview range */ + anim_previewrange_clear(); + break; + case ACTMENU_VIEW_PREVRANGEAUTO: /* Auto preview-range length */ + action_previewrange_set(G.saction->action); + break; } allqueue(REDRAWVIEW3D, 0); } @@ -447,11 +459,30 @@ static uiBlock *action_viewmenu(void *arg_unused) "Play Back Animation|Alt A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, ACTMENU_VIEW_PLAY3D, ""); + //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, + // "Play Back Animation in 3D View|Alt Shift A", 0, yco-=20, + // menuwidth, 19, NULL, 0.0, 0.0, 1, + // ACTMENU_VIEW_PLAYALL, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, + menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, - "Play Back Animation in 3D View|Alt Shift A", 0, yco-=20, + "Set Preview Range|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, - ACTMENU_VIEW_PLAYALL, ""); - + ACTMENU_VIEW_PREVRANGESET, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, + "Clear Preview Range|Alt P", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, + ACTMENU_VIEW_PREVRANGECLEAR, ""); + + if (G.saction->action) { + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, + "Preview Range from Action Length|Ctrl Alt P", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, + ACTMENU_VIEW_PREVRANGEAUTO, ""); + } + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c index 54a3790574b..81d94725a90 100644 --- a/source/blender/src/header_ipo.c +++ b/source/blender/src/header_ipo.c @@ -745,6 +745,12 @@ static void do_ipo_viewmenu(void *arg, int event) case 12: G.sipo->flag ^= SIPO_LOCK_VIEW; break; + case 13: /* Set Preview Range */ + anim_previewrange_set(); + break; + case 14: /* Clear Preview Range */ + anim_previewrange_clear(); + break; } } @@ -775,10 +781,17 @@ static uiBlock *ipo_viewmenu(void *arg_unused) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Animation|Alt A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Animation in 3D View|Alt Shift A", 0, yco-=20, - menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); + //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Animation in 3D View|Alt Shift A", 0, yco-=20, + // menuwidth, 19, NULL, 0.0, 0.0, 1, 7, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Preview Range|Ctrl P", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Preview Range|Alt P", 0, yco-=20, + menuwidth, 19, NULL, 0.0, 0.0, 1, 14, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center on Current Frame|Shift C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, ""); diff --git a/source/blender/src/header_nla.c b/source/blender/src/header_nla.c index 41e7bc32365..ef4b79c0537 100644 --- a/source/blender/src/header_nla.c +++ b/source/blender/src/header_nla.c @@ -122,6 +122,12 @@ static void do_nla_viewmenu(void *arg, int event) case 7: /* Show timing in Frames or Seconds */ G.snla->flag ^= SNLA_DRAWTIME; break; + case 8: /* Set Preview Range */ + anim_previewrange_set(); + break; + case 9: /* Clear Preview Range */ + anim_previewrange_clear(); + break; } } @@ -154,7 +160,12 @@ static uiBlock *nla_viewmenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation|Alt A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation in 3D View|Alt Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + //uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Play Back Animation in 3D View|Alt Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, ""); + + uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); + + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Set Preview Range|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 8, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Preview Range|Alt P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");