diff options
author | Campbell Barton <ideasman42@gmail.com> | 2008-04-15 18:15:56 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2008-04-15 18:15:56 +0400 |
commit | 67e2d05dcd5673e95e574cb32fd71be9baa77507 (patch) | |
tree | 89964b2b152c82bdf9b58a57e1592e49e195fc5e | |
parent | 13ec85aeb5340a02b932875a6ee01d8e3fd679e5 (diff) |
Ipo View Option - Loc View Area - stops using each ipo's view area when changing ipo's.
-rw-r--r-- | source/blender/makesdna/DNA_space_types.h | 3 | ||||
-rw-r--r-- | source/blender/python/api2_2x/doc/Object.py | 2 | ||||
-rw-r--r-- | source/blender/src/editipo.c | 6 | ||||
-rw-r--r-- | source/blender/src/header_ipo.c | 10 |
4 files changed, 16 insertions, 5 deletions
diff --git a/source/blender/makesdna/DNA_space_types.h b/source/blender/makesdna/DNA_space_types.h index 00cccf35fd4..27f2c593095 100644 --- a/source/blender/makesdna/DNA_space_types.h +++ b/source/blender/makesdna/DNA_space_types.h @@ -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 diff --git a/source/blender/python/api2_2x/doc/Object.py b/source/blender/python/api2_2x/doc/Object.py index a198ebc8026..bb57c0b1852 100644 --- a/source/blender/python/api2_2x/doc/Object.py +++ b/source/blender/python/api2_2x/doc/Object.py @@ -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, diff --git a/source/blender/src/editipo.c b/source/blender/src/editipo.c index e5c92de5e98..143d003b986 100644 --- a/source/blender/src/editipo.c +++ b/source/blender/src/editipo.c @@ -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; } diff --git a/source/blender/src/header_ipo.c b/source/blender/src/header_ipo.c index 58d0badde93..9770d2a5866 100644 --- a/source/blender/src/header_ipo.c +++ b/source/blender/src/header_ipo.c @@ -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, ""); |