2.5 - Small tweaks to order of buttons for Animation Editor header buttons to have more consistent layout

This commit is contained in:
Joshua Leung 2009-07-29 11:59:21 +00:00
parent 1744061a91
commit b3d0753467
3 changed files with 28 additions and 32 deletions

@ -385,10 +385,7 @@ void action_header_buttons(const bContext *C, ARegion *ar)
uiBlockEndAlign(block); uiBlockEndAlign(block);
xco += 30; xco += 30;
} }
else if (saction->mode == SACTCONT_ACTION) { // not too appropriate for shapekeys atm... else if (saction->mode == SACTCONT_ACTION) {
/* NAME ETC */
//uiClearButLock();
/* NAME ETC */ /* NAME ETC */
xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)saction->action, ID_AC, &saction->pin, xco, yco, xco= uiDefIDPoinButs(block, CTX_data_main(C), NULL, (ID*)saction->action, ID_AC, &saction->pin, xco, yco,
saction_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE|UI_ID_FAKE_USER|UI_ID_ALONE|UI_ID_PIN); saction_idpoin_handle, UI_ID_BROWSE|UI_ID_RENAME|UI_ID_ADD_NEW|UI_ID_DELETE|UI_ID_FAKE_USER|UI_ID_ALONE|UI_ID_PIN);
@ -396,14 +393,6 @@ void action_header_buttons(const bContext *C, ARegion *ar)
xco += 8; xco += 8;
} }
/* COPY PASTE */
uiBlockBeginAlign(block);
uiDefIconButO(block, BUT, "ACT_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco,yco,XIC,YIC, "Copies the selected keyframes to the buffer.");
xco += XIC;
uiDefIconButO(block, BUT, "ACT_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco,yco,XIC,YIC, "Pastes the keyframes from the buffer into the selected channels.");
uiBlockEndAlign(block);
xco += (XIC + 8);
/* draw AUTOSNAP */ /* draw AUTOSNAP */
if (saction->mode != SACTCONT_GPENCIL) { if (saction->mode != SACTCONT_GPENCIL) {
if (saction->flag & SACTION_DRAWTIME) { if (saction->flag & SACTION_DRAWTIME) {
@ -422,12 +411,13 @@ void action_header_buttons(const bContext *C, ARegion *ar)
xco += (70 + 8); xco += (70 + 8);
} }
/* draw LOCK */ /* COPY PASTE */
// XXX this feature is probably not relevant anymore! uiBlockBeginAlign(block);
//uiDefIconButS(block, ICONTOG, B_LOCK, ICON_UNLOCKED, xco, yco, XIC, YIC, uiDefIconButO(block, BUT, "ACT_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco,yco,XIC,YIC, "Copies the selected keyframes to the buffer.");
// &(saction->lock), 0, 0, 0, 0, xco += XIC;
// "Updates other affected window spaces automatically " uiDefIconButO(block, BUT, "ACT_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco,yco,XIC,YIC, "Pastes the keyframes from the buffer into the selected channels.");
// "to reflect changes in real time"); uiBlockEndAlign(block);
xco += (XIC + 8);
} }
/* always as last */ /* always as last */

@ -314,13 +314,6 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
xco += 6*XIC + 15; xco += 6*XIC + 15;
} }
/* copy + paste */
uiBlockBeginAlign(block);
uiDefIconButO(block, BUT, "GRAPH_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
uiDefIconButO(block, BUT, "GRAPH_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
uiBlockEndAlign(block);
xco += (XIC + 8);
/* auto-snap selector */ /* auto-snap selector */
if (sipo->flag & SIPO_DRAWTIME) { if (sipo->flag & SIPO_DRAWTIME) {
uiDefButS(block, MENU, B_REDR, uiDefButS(block, MENU, B_REDR,
@ -336,6 +329,13 @@ void graph_header_buttons(const bContext *C, ARegion *ar)
} }
xco += 98; xco += 98;
/* copy + paste */
uiBlockBeginAlign(block);
uiDefIconButO(block, BUT, "GRAPH_OT_copy", WM_OP_INVOKE_REGION_WIN, ICON_COPYDOWN, xco+=XIC,yco,XIC,YIC, "Copies the selected keyframes from the selected channel(s) to the buffer");
uiDefIconButO(block, BUT, "GRAPH_OT_paste", WM_OP_INVOKE_REGION_WIN, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, "Pastes the keyframes from the buffer");
uiBlockEndAlign(block);
xco += (XIC + 8);
/* ghost curves */ /* ghost curves */
// XXX these icons need to be changed // XXX these icons need to be changed
if (sipo->ghostCurves.first) if (sipo->ghostCurves.first)

@ -457,10 +457,14 @@ typedef struct NlaStrip {
float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */ float blendin, blendout; /* strip blending length (only used when there are no F-Curves) */
short blendmode; /* strip blending mode (layer-based mixing) */ short blendmode; /* strip blending mode (layer-based mixing) */
short extendmode; /* strip extrapolation mode (time-based mixing) */
short flag; /* settings */ short extendmode; /* strip extrapolation mode (time-based mixing) */
short pad1;
short type; /* type of NLA strip */ short type; /* type of NLA strip */
int flag; /* settings */
int pad2;
} NlaStrip; } NlaStrip;
/* NLA Strip Blending Mode */ /* NLA Strip Blending Mode */
@ -498,21 +502,23 @@ typedef enum eNlaStrip_Flag {
NLASTRIP_FLAG_USR_INFLUENCE = (1<<5), NLASTRIP_FLAG_USR_INFLUENCE = (1<<5),
NLASTRIP_FLAG_USR_TIME = (1<<6), NLASTRIP_FLAG_USR_TIME = (1<<6),
/* NLA strip length is synced to the length of the referenced action */
NLASTRIP_FLAG_SYNC_LENGTH = (1<<9),
/* playback flags (may be overriden by F-Curves) */ /* playback flags (may be overriden by F-Curves) */
/* NLA strip blendin/out values are set automatically based on overlaps */ /* NLA strip blendin/out values are set automatically based on overlaps */
NLASTRIP_FLAG_AUTO_BLENDS = (1<<10), NLASTRIP_FLAG_AUTO_BLENDS = (1<<10),
/* NLA strip is played back in reverse order */ /* NLA strip is played back in reverse order */
NLASTRIP_FLAG_REVERSE = (1<<11), NLASTRIP_FLAG_REVERSE = (1<<11),
/* NLA strip is muted (i.e. doesn't contribute in any way) */ /* NLA strip is muted (i.e. doesn't contribute in any way) */
// TODO: this overlaps a lot with the functionality in track
NLASTRIP_FLAG_MUTED = (1<<12), NLASTRIP_FLAG_MUTED = (1<<12),
/* NLA strip length is synced to the length of the referenced action */ /* NLA Strip is played back in 'ping-pong' style */
NLASTRIP_FLAG_SYNC_LENGTH = (1<<13), NLASTRIP_FLAG_MIRROR = (1<<13),
/* temporary editing flags */ /* temporary editing flags */
/* NLA-Strip is really just a temporary meta used to facilitate easier transform code */ /* NLA-Strip is really just a temporary meta used to facilitate easier transform code */
NLASTRIP_FLAG_TEMP_META = (1<<14), NLASTRIP_FLAG_TEMP_META = (1<<30),
NLASTRIP_FLAG_EDIT_TOUCHED = (1<<15), NLASTRIP_FLAG_EDIT_TOUCHED = (1<<31),
} eNlaStrip_Flag; } eNlaStrip_Flag;
/* NLA Strip Type */ /* NLA Strip Type */