Ipo View Option - Loc View Area - stops using each ipo's view area when changing ipo's.

This commit is contained in:
2008-04-15 14:15:56 +00:00
parent 13ec85aeb5
commit 67e2d05dcd
4 changed files with 16 additions and 5 deletions

View File

@@ -526,6 +526,9 @@ typedef struct SpaceImaSel {
#define SI_SMOOTH_UV 1<<20
#define SI_DRAW_STRETCH 1<<21
/* SpaceIpo->flag */
#define SIPO_LOCK_VIEW 1<<0
/* SpaceText flags (moved from DNA_text_types.h) */
#define ST_SCROLL_SELECT 0x0001 // scrollable

View File

@@ -417,7 +417,7 @@ class Object:
empty_ob.setMatrix(dupe_matrix)
Blender.Redraw()
@type DupObjects: list of tuples containing (object, matrix)
@ivar enableNLAOverride: Whether the object uses NLA or active Action for animation.
@ivar enableNLAOverride: Whether the object uses NLA or active Action for animation. When True the NLA is used.
@type enableNLAOverride: boolean
@ivar enableDupVerts: The DupliVerts status of the object.
Does not indicate that this object has any dupliVerts,

View File

@@ -984,8 +984,8 @@ static void make_editipo(void)
if(G.sipo->ipo) {
if (G.sipo->pin)
rf= &(G.sipo->v2d.cur);
if (G.sipo->flag & SIPO_LOCK_VIEW || G.sipo->pin)
rf= &(G.sipo->v2d.cur);
else
rf= &(G.sipo->ipo->cur);
@@ -1202,7 +1202,7 @@ void test_editipo(int doit)
if(G.sipo->ipo != ipo) {
G.sipo->ipo= ipo;
/* if lock we don't copy from ipo, this makes the UI jump around confusingly */
if(G.v2d->flag & V2D_VIEWLOCK);
if(G.v2d->flag & V2D_VIEWLOCK || G.sipo->flag & SIPO_LOCK_VIEW);
else if(ipo) G.v2d->cur= ipo->cur;
doit= 1;
}

View File

@@ -745,6 +745,9 @@ static void do_ipo_viewmenu(void *arg, int event)
case 11:
do_ipo_buttons(B_IPOVIEWCENTER);
break;
case 12:
G.sipo->flag ^= SIPO_LOCK_VIEW;
break;
}
}
@@ -765,7 +768,7 @@ static uiBlock *ipo_viewmenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Show Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
else
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Show Keys|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 2, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Zoom Out|NumPad -", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
@@ -784,6 +787,11 @@ static uiBlock *ipo_viewmenu(void *arg_unused)
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Center on Current Frame|Shift C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 10, "");
uiDefIconTextBut(block, BUTM, 1, (G.v2d->flag & V2D_VIEWLOCK)?ICON_CHECKBOX_HLT:ICON_CHECKBOX_DEHLT,
"Lock Time to Other Windows|", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 9, "");
if (G.sipo->flag & SIPO_LOCK_VIEW)
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Lock View Area", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, "");
else
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Lock View Area", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 12, "");
if (ei != NULL && (ei->flag & IPO_EDIT)) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Move Current Frame to Selected|C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 3, "");