diff --git a/source/blender/include/BIF_editaction.h b/source/blender/include/BIF_editaction.h index 172e4b9726f..e6cd5765360 100644 --- a/source/blender/include/BIF_editaction.h +++ b/source/blender/include/BIF_editaction.h @@ -48,6 +48,7 @@ #define CHANNELSKIP 2 #define NAMEWIDTH 128 #define SLIDERWIDTH 125 +#define ACTWIDTH (G.saction->actwidth) #define CHANNEL_FILTER_LOC 0x00000001 /* Show location keys */ #define CHANNEL_FILTER_ROT 0x00000002 /* Show rotation keys */ diff --git a/source/blender/makesdna/DNA_action_types.h b/source/blender/makesdna/DNA_action_types.h index f64da9f3c48..30d1c5c7ab6 100644 --- a/source/blender/makesdna/DNA_action_types.h +++ b/source/blender/makesdna/DNA_action_types.h @@ -116,7 +116,7 @@ typedef struct SpaceAction { View2D v2d; bAction *action; int flag; - short pin, actnr, lock, pad; + short pin, actnr, lock, actwidth; float timeslide; } SpaceAction; diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 77338241f2d..bf695cb30e8 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -1143,7 +1143,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s int textButWidth = ((width/2)-togButWidth); - uiDefButS(block, MENU, B_SWITCHRENDER, "Joint Types%t|Ball%x1|Hinge%x2|Generic6DOF%x3",//|Extra Force%x6", + uiDefButI(block, MENU, B_SWITCHRENDER, "Joint Types%t|Ball%x1|Hinge%x2|Generic6DOF%x3",//|Extra Force%x6", *xco, *yco-25, 150, 18, &data->type, 0, 0, 0, 0, "Choose the joint type"); height = 310; diff --git a/source/blender/src/drawaction.c b/source/blender/src/drawaction.c index 62e5ad1071d..214f0a2e90c 100644 --- a/source/blender/src/drawaction.c +++ b/source/blender/src/drawaction.c @@ -98,8 +98,6 @@ static BezTriple **ob_to_keylist(Object *ob, int flags, int *totvert); static BezTriple **icu_to_keylist(IpoCurve *icu, int flags, int *totvert); void draw_icu_channel(gla2DDrawInfo *di, IpoCurve *icu, int flags, float ypos); -/* implementation ------------------------------------------------------ */ -extern short ACTWIDTH; static void meshactionbuts(SpaceAction *saction, Object *ob, Key *key) { @@ -622,7 +620,7 @@ void drawactionspace(ScrArea *sa, void *spacedata) * they have scrolled off of the screen ... this * oughta fix it */ - + if (key) { if (G.v2d->cur.ymin < -CHANNELHEIGHT) G.v2d->cur.ymin = -CHANNELHEIGHT; diff --git a/source/blender/src/drawipo.c b/source/blender/src/drawipo.c index 1137e2d3468..8590f8898b8 100644 --- a/source/blender/src/drawipo.c +++ b/source/blender/src/drawipo.c @@ -79,6 +79,7 @@ #include "BIF_toolbox.h" #include "BIF_glutil.h" #include "BIF_editseq.h" +#include "BIF_editaction.h" #include "BSE_drawipo.h" #include "BSE_view.h" @@ -107,8 +108,6 @@ static int ipomachtx, ipomachty; static int vertymin, vertymax, horxmin, horxmax; /* globals to test LEFTMOUSE for scrollbar */ -extern short ACTWIDTH; /* this is ugly! */ - static void scroll_prstr(float x, float y, float val, char dir, int disptype) { int len, macht; diff --git a/source/blender/src/editaction.c b/source/blender/src/editaction.c index b39ece4eda4..1bb3bea4aa8 100644 --- a/source/blender/src/editaction.c +++ b/source/blender/src/editaction.c @@ -105,9 +105,6 @@ void down_sel_action(); /* Local Function prototypes, are forward needed */ static void hilight_channel (bAction *act, bActionChannel *chan, short hilight); -/* Implementation */ -short ACTWIDTH = NAMEWIDTH; - /* messy call... */ static void select_poseelement_by_name (char *name, int select) {