Removed the other ugly global used in action editor. Now the
ACTWIDTH is a macro that tries to get actwidth from the active SpaceAction (G.saction->actwidth). This should solve any potential problems with having two action editors open editing shapekey actions. Also, I've fixed a compiler warning caused by erwin's constraint commit. Wrong ui call for button.
This commit is contained in:
@@ -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 */
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
||||
|
@@ -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;
|
||||
|
@@ -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;
|
||||
|
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user