Another mega commit... loadsof restructure, and a pretty good one! :)
- changed the BIF_DrawString() function. it used to work different for AA fonts as for default fonts. Now it's identical. Setting color for fonts can just be done with OpenGL, for both font types. Removed: BIF_DrawStringRGB() - added theme color options for Buttons - recoded DefButton, so it automatically chooses the right color. - had to remove a 1000 uiBlockSetCol() calls for that reason... - uiBlockSetCol() still works, to override automatic color - removed entirely the silly old color system (BIFColorID). All color calls can now be done with a BIF_ThemeColor() call, including fonts and buttons and opengl stuff - all buttons in button header have headercolor by default - recoded drawing icons, it was a really bad & old loop doing manually colorshading and blending... which was per pixel a load of code! Now it uses a single OpenGL call to blend or colorize. Quite faster! - (as test, for review) icons don't colorize anymore with button color, but have a different alpha to blend in (when not active) - recoded the entire interface_draw.c file...: - drawing buttons is separated in three parts: 1. main drawing function for text and icons 2. free definable callback for button itself 3. free definable callback for slider - removed a load of redundant code for this! - coded a minimal theme, and adjusted Matt's buttons to match new callback system - adding new drawing themes is piece of cake now - for coders, default 'themes' to be aware of: UI_EMBOSS : the themable drawing style UI_EMBOSSP: the pulldown menu system (apart from color not themable) UI_EMBOSSN: draw nothing, only text and/or icon UI_EMBOSSM: minimal theme, still in use for Logic and Constraintsa this can be set with uiBlockSetEmboss(block) or in the uiNewBlock() call. TODO: make UI API call for button alignment (plus removed another series of warnings from code...) Plus: fixed bug in Matts commit: he used a 'short' button for an 'int'
This commit is contained in:
@@ -88,16 +88,8 @@ FTF_EXPORT void FTF_TransConvString(char* str, char* ustr, unsigned int flag);
|
|||||||
* @param mode flag to forward to FTF_TransConvString()
|
* @param mode flag to forward to FTF_TransConvString()
|
||||||
* @return Width drawing
|
* @return Width drawing
|
||||||
*/
|
*/
|
||||||
FTF_EXPORT float FTF_DrawString(char* str, unsigned int flag, int select);
|
FTF_EXPORT float FTF_DrawString(char* str, unsigned int flag);
|
||||||
|
|
||||||
/**
|
|
||||||
* Draws a string at the current raster postion with rgb coloring.
|
|
||||||
* @param str The string to draw
|
|
||||||
* @param rgb Floats to manipulate the the glyph pixmap coloring.
|
|
||||||
* @param mode flag to forward to FTF_TransConvString()
|
|
||||||
* @return Width drawing
|
|
||||||
*/
|
|
||||||
FTF_EXPORT float FTF_DrawStringRGB(char* str, unsigned int flag, float r, float g, float b);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get a character width
|
* Get a character width
|
||||||
|
|||||||
@@ -84,15 +84,10 @@ FTF_EXPORT float FTF_DrawCharacter(char c, unsigned int flag)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
FTF_EXPORT float FTF_DrawString(char* str, unsigned int flag, int select)
|
/* does color too, using glGet */
|
||||||
|
FTF_EXPORT float FTF_DrawString(char* str, unsigned int flag)
|
||||||
{
|
{
|
||||||
return ttfont.DrawString(str, flag, select);
|
return ttfont.DrawString(str, flag);
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
FTF_EXPORT float FTF_DrawStringRGB(char* str, unsigned int flag, float r, float g, float b)
|
|
||||||
{
|
|
||||||
return ttfont.DrawStringRGB(str, flag, r, g, b);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -225,12 +225,12 @@ int FTF_TTFont::GetSize(void)
|
|||||||
|
|
||||||
int FTF_TTFont::Ascender(void)
|
int FTF_TTFont::Ascender(void)
|
||||||
{
|
{
|
||||||
return font->Ascender();
|
return (int)font->Ascender();
|
||||||
}
|
}
|
||||||
|
|
||||||
int FTF_TTFont::Descender(void)
|
int FTF_TTFont::Descender(void)
|
||||||
{
|
{
|
||||||
return font->Descender();
|
return (int)font->Descender();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -240,8 +240,9 @@ int FTF_TTFont::TransConvString(char* str, char* ustr, unsigned int flag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
float FTF_TTFont::DrawString(char* str, unsigned int flag, int select)
|
float FTF_TTFont::DrawString(char* str, unsigned int flag)
|
||||||
{
|
{
|
||||||
|
float color[4];
|
||||||
wchar_t wstr[FTF_MAX_STR_SIZE-1]={'\0'};
|
wchar_t wstr[FTF_MAX_STR_SIZE-1]={'\0'};
|
||||||
int len=0;
|
int len=0;
|
||||||
|
|
||||||
@@ -250,37 +251,11 @@ float FTF_TTFont::DrawString(char* str, unsigned int flag, int select)
|
|||||||
else
|
else
|
||||||
len=utf8towchar(wstr,str);
|
len=utf8towchar(wstr,str);
|
||||||
|
|
||||||
if(!select) {
|
glGetFloatv(GL_CURRENT_COLOR, color);
|
||||||
glPixelTransferf(GL_RED_SCALE, 0.0);
|
|
||||||
glPixelTransferf(GL_GREEN_SCALE, 0.0);
|
|
||||||
glPixelTransferf(GL_BLUE_SCALE, 0.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
font->Render(wstr);
|
glPixelTransferf(GL_RED_SCALE, color[0]);
|
||||||
|
glPixelTransferf(GL_GREEN_SCALE, color[1]);
|
||||||
if(!select) {
|
glPixelTransferf(GL_BLUE_SCALE, color[2]);
|
||||||
glPixelTransferf(GL_RED_SCALE, 1.0);
|
|
||||||
glPixelTransferf(GL_GREEN_SCALE, 1.0);
|
|
||||||
glPixelTransferf(GL_BLUE_SCALE, 1.0);
|
|
||||||
}
|
|
||||||
|
|
||||||
return font->Advance(wstr);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
float FTF_TTFont::DrawStringRGB(char* str, unsigned int flag, float r, float g, float b)
|
|
||||||
{
|
|
||||||
wchar_t wstr[FTF_MAX_STR_SIZE-1]={'\0'};
|
|
||||||
int len=0;
|
|
||||||
|
|
||||||
if (FTF_USE_GETTEXT & flag)
|
|
||||||
len=utf8towchar(wstr,gettext(str));
|
|
||||||
else
|
|
||||||
len=utf8towchar(wstr,str);
|
|
||||||
|
|
||||||
glPixelTransferf(GL_RED_SCALE, r);
|
|
||||||
glPixelTransferf(GL_GREEN_SCALE, g);
|
|
||||||
glPixelTransferf(GL_BLUE_SCALE, b);
|
|
||||||
|
|
||||||
font->Render(wstr);
|
font->Render(wstr);
|
||||||
|
|
||||||
|
|||||||
@@ -68,13 +68,11 @@ public:
|
|||||||
int TransConvString(char* str, char* ustr, unsigned int flag);
|
int TransConvString(char* str, char* ustr, unsigned int flag);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Draws a string at the current raster position.
|
* Draws a string at the current raster position in current opengl color.
|
||||||
* @param str The string to draw.
|
* @param str The string to draw.
|
||||||
* @param flag Whether use gettext and UTF8 or system encoding.
|
* @param flag Whether use gettext and UTF8 or system encoding.
|
||||||
*/
|
*/
|
||||||
float DrawString(char* str, unsigned int flag, int select);
|
float DrawString(char* str, unsigned int flag);
|
||||||
// float DrawString(char* str, unsigned char r, unsigned char g, unsigned char b, unsigned int flag);
|
|
||||||
float DrawStringRGB(char* str, unsigned int flag, float r, float g, float b);
|
|
||||||
|
|
||||||
float GetStringWidth(char* str, unsigned int flag);
|
float GetStringWidth(char* str, unsigned int flag);
|
||||||
|
|
||||||
|
|||||||
@@ -38,18 +38,12 @@ struct ListBase;
|
|||||||
struct ScrArea;
|
struct ScrArea;
|
||||||
|
|
||||||
/* uiBlock->dt */
|
/* uiBlock->dt */
|
||||||
#define UI_EMBOSSX 0 /* Rounded embossed button */
|
#define UI_EMBOSS 0 /* use one of the themes for drawing */
|
||||||
#define UI_EMBOSSW 1 /* Flat bordered button */
|
#define UI_EMBOSSN 1 /* Nothing */
|
||||||
#define UI_EMBOSSN 2 /* No border */
|
#define UI_EMBOSSM 2 /* Minimal builtin emboss, also for logic buttons */
|
||||||
|
#define UI_EMBOSSP 3 /* Pulldown */
|
||||||
|
|
||||||
#define UI_EMBOSSM 4 /* Colored Border */
|
#define UI_EMBOSSX 0 /* for a python file, which i can't change.... duh! */
|
||||||
#define UI_EMBOSSP 5 /* Borderless coloured button */
|
|
||||||
#define UI_EMBOSSA 6 /* same as EMBOSSX but with arrows to simulate */
|
|
||||||
#define UI_EMBOSSTABL 7
|
|
||||||
#define UI_EMBOSSTABM 8
|
|
||||||
#define UI_EMBOSSTABR 9
|
|
||||||
#define UI_EMBOSST 10
|
|
||||||
#define UI_EMBOSSMB 11 /* emboss menu button */
|
|
||||||
|
|
||||||
/* uiBlock->direction */
|
/* uiBlock->direction */
|
||||||
#define UI_TOP 0
|
#define UI_TOP 0
|
||||||
|
|||||||
@@ -45,8 +45,7 @@ void lang_setlanguage(void); /* usiblender.c */
|
|||||||
char *language_pup(void);
|
char *language_pup(void);
|
||||||
char *fontsize_pup(void);
|
char *fontsize_pup(void);
|
||||||
|
|
||||||
int BIF_DrawString(struct BMF_Font* font, char *str, int translate, int col);
|
int BIF_DrawString(struct BMF_Font* font, char *str, int translate);
|
||||||
int BIF_DrawStringRGB(struct BMF_Font* font, char *str, int translate, float r, float g, float b);
|
|
||||||
float BIF_GetStringWidth(struct BMF_Font* font, char *str, int translate);
|
float BIF_GetStringWidth(struct BMF_Font* font, char *str, int translate);
|
||||||
|
|
||||||
#endif /* BIF_LANGUAGE_H */
|
#endif /* BIF_LANGUAGE_H */
|
||||||
|
|||||||
@@ -258,87 +258,41 @@ typedef enum {
|
|||||||
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
|
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
|
||||||
} BIFIconID;
|
} BIFIconID;
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
#define BIFCOLORSHADE_FIRST (COLORSHADE_DARK)
|
|
||||||
COLORSHADE_DARK,
|
|
||||||
COLORSHADE_GREY,
|
|
||||||
COLORSHADE_LGREY,
|
|
||||||
COLORSHADE_LMEDIUM,
|
|
||||||
COLORSHADE_MEDIUM,
|
|
||||||
COLORSHADE_HILITE,
|
|
||||||
COLORSHADE_LIGHT,
|
|
||||||
COLORSHADE_WHITE,
|
|
||||||
|
|
||||||
#define BIFCOLORSHADE_LAST (COLORSHADE_WHITE)
|
|
||||||
#define BIFNCOLORSHADES (BIFCOLORSHADE_LAST-BIFCOLORSHADE_FIRST + 1)
|
|
||||||
} BIFColorShade;
|
|
||||||
|
|
||||||
typedef enum {
|
|
||||||
#define BIFCOLORID_FIRST (BUTGREY)
|
|
||||||
BUTGREY,
|
|
||||||
BUTGREEN,
|
|
||||||
BUTBLUE,
|
|
||||||
BUTSALMON,
|
|
||||||
MIDGREY,
|
|
||||||
BUTPURPLE,
|
|
||||||
BUTYELLOW,
|
|
||||||
REDALERT,
|
|
||||||
BUTRUST,
|
|
||||||
BUTWHITE,
|
|
||||||
BUTDBLUE,
|
|
||||||
BUTPINK,
|
|
||||||
BUTDPINK,
|
|
||||||
BUTMACTIVE,
|
|
||||||
|
|
||||||
ACTIONBUTCOL,
|
|
||||||
NUMBUTCOL,
|
|
||||||
TEXBUTCOL,
|
|
||||||
TOGBUTCOL,
|
|
||||||
SLIDERCOL,
|
|
||||||
TABCOL,
|
|
||||||
MENUCOL,
|
|
||||||
MENUACTIVECOL,
|
|
||||||
|
|
||||||
BUTIPO,
|
|
||||||
BUTAUDIO,
|
|
||||||
BUTCAMERA,
|
|
||||||
BUTRANDOM,
|
|
||||||
BUTEDITOBJECT,
|
|
||||||
BUTPROPERTY,
|
|
||||||
BUTSCENE,
|
|
||||||
BUTMOTION,
|
|
||||||
BUTMESSAGE,
|
|
||||||
BUTACTION,
|
|
||||||
BUTCD,
|
|
||||||
BUTGAME,
|
|
||||||
BUTVISIBILITY,
|
|
||||||
BUTYUCK,
|
|
||||||
BUTSEASICK,
|
|
||||||
BUTCHOKE,
|
|
||||||
|
|
||||||
HEADERCOL,
|
|
||||||
HEADERCOLSEL,
|
|
||||||
|
|
||||||
BUTIMPERIAL,
|
|
||||||
#define BIFCOLORID_LAST (BUTIMPERIAL)
|
|
||||||
#define BIFNCOLORIDS (BIFCOLORID_LAST-BIFCOLORID_FIRST + 1)
|
|
||||||
} BIFColorID;
|
|
||||||
|
|
||||||
|
|
||||||
/* ---------- theme ----------- */
|
/* ---------- theme ----------- */
|
||||||
|
|
||||||
// uibutton colors
|
|
||||||
|
|
||||||
|
|
||||||
#define TH_THEMEUI 99
|
|
||||||
|
|
||||||
// common colors among spaces
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
TH_BACK = 100,
|
TH_AUTO, /* for buttons, to signal automatic color assignment */
|
||||||
|
|
||||||
|
// uibutton colors
|
||||||
|
TH_BUT_NEUTRAL,
|
||||||
|
TH_BUT_ACTION,
|
||||||
|
TH_BUT_SETTING,
|
||||||
|
TH_BUT_SETTING1,
|
||||||
|
TH_BUT_SETTING2,
|
||||||
|
TH_BUT_NUM,
|
||||||
|
TH_BUT_TEXTFIELD,
|
||||||
|
TH_BUT_POPUP,
|
||||||
|
TH_BUT_TEXT,
|
||||||
|
TH_BUT_TEXT_HI,
|
||||||
|
TH_MENU_BACK,
|
||||||
|
TH_MENU_ITEM,
|
||||||
|
TH_MENU_HILITE,
|
||||||
|
TH_MENU_TEXT,
|
||||||
|
TH_MENU_TEXT_HI,
|
||||||
|
|
||||||
|
TH_BUT_DRAWTYPE,
|
||||||
|
|
||||||
|
TH_REDALERT,
|
||||||
|
|
||||||
|
TH_THEMEUI,
|
||||||
|
// common colors among spaces
|
||||||
|
|
||||||
|
TH_BACK,
|
||||||
TH_TEXT,
|
TH_TEXT,
|
||||||
TH_TEXT_HI,
|
TH_TEXT_HI,
|
||||||
TH_HEADER,
|
TH_HEADER,
|
||||||
|
TH_HEADERDESEL,
|
||||||
TH_PANEL,
|
TH_PANEL,
|
||||||
TH_SHADE1,
|
TH_SHADE1,
|
||||||
TH_SHADE2,
|
TH_SHADE2,
|
||||||
@@ -377,7 +331,8 @@ void BIF_ThemeColorShade(int colorid, int offset);
|
|||||||
void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac);
|
void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac);
|
||||||
|
|
||||||
// returns one value, not scaled
|
// returns one value, not scaled
|
||||||
float BIF_GetThemeColorf(int colorid);
|
float BIF_GetThemeValuef(int colorid);
|
||||||
|
int BIF_GetThemeValue(int colorid);
|
||||||
|
|
||||||
// get three color values, scaled to 0.0-1.0 range
|
// get three color values, scaled to 0.0-1.0 range
|
||||||
void BIF_GetThemeColor3fv(int colorid, float *col);
|
void BIF_GetThemeColor3fv(int colorid, float *col);
|
||||||
@@ -398,9 +353,7 @@ void BIF_resources_free (void);
|
|||||||
int BIF_get_icon_width (BIFIconID icon);
|
int BIF_get_icon_width (BIFIconID icon);
|
||||||
int BIF_get_icon_height (BIFIconID icon);
|
int BIF_get_icon_height (BIFIconID icon);
|
||||||
void BIF_draw_icon (BIFIconID icon);
|
void BIF_draw_icon (BIFIconID icon);
|
||||||
void BIF_draw_icon_blended (BIFIconID icon, BIFColorID color, BIFColorShade shade);
|
void BIF_draw_icon_blended (BIFIconID icon, int colorid, int shade);
|
||||||
|
|
||||||
void BIF_set_color (BIFColorID color, BIFColorShade shade);
|
|
||||||
|
|
||||||
/* only for buttons in theme editor! */
|
/* only for buttons in theme editor! */
|
||||||
char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
|
char *BIF_ThemeGetColorPtr(struct bTheme *btheme, int spacetype, int colorid);
|
||||||
|
|||||||
@@ -128,16 +128,18 @@ struct uiBut {
|
|||||||
void *func_arg1;
|
void *func_arg1;
|
||||||
void *func_arg2;
|
void *func_arg2;
|
||||||
|
|
||||||
void (*embossfunc)(BIFColorID, float, float, float, float, float, int);
|
void (*embossfunc)(int , int , float, float, float, float, float, int);
|
||||||
|
void (*sliderfunc)(int , float, float, float, float, float, float, int);
|
||||||
|
|
||||||
uiLink *link;
|
uiLink *link;
|
||||||
|
|
||||||
char *tip, *lockstr;
|
char *tip, *lockstr;
|
||||||
|
|
||||||
BIFColorID col;
|
int themecol; /* themecolor id */
|
||||||
void *font;
|
void *font;
|
||||||
|
|
||||||
BIFIconID icon;
|
BIFIconID icon;
|
||||||
|
short but_align; /* aligning buttons, horiz/vertical */
|
||||||
short lock, win;
|
short lock, win;
|
||||||
short iconadd;
|
short iconadd;
|
||||||
|
|
||||||
@@ -179,7 +181,8 @@ struct uiBlock {
|
|||||||
/* extra draw function for custom blocks */
|
/* extra draw function for custom blocks */
|
||||||
void (*drawextra)();
|
void (*drawextra)();
|
||||||
|
|
||||||
BIFColorID col;
|
int themecol; /* themecolor id */
|
||||||
|
short but_align; /* aligning buttons, horiz/vertical */
|
||||||
short font; /* indices */
|
short font; /* indices */
|
||||||
int afterval;
|
int afterval;
|
||||||
void *curfont;
|
void *curfont;
|
||||||
@@ -195,6 +198,7 @@ struct uiBlock {
|
|||||||
|
|
||||||
/* interface.c */
|
/* interface.c */
|
||||||
extern void ui_check_but(uiBut *but);
|
extern void ui_check_but(uiBut *but);
|
||||||
|
extern double ui_get_but_val(uiBut *but);
|
||||||
extern void ui_autofill(uiBlock *block);
|
extern void ui_autofill(uiBlock *block);
|
||||||
extern void ui_graphics_to_window(int win, float *x, float *y);
|
extern void ui_graphics_to_window(int win, float *x, float *y);
|
||||||
extern void ui_window_to_graphics(int win, float *x, float *y);
|
extern void ui_window_to_graphics(int win, float *x, float *y);
|
||||||
@@ -203,7 +207,9 @@ extern void ui_window_to_graphics(int win, float *x, float *y);
|
|||||||
extern void ui_draw_panel(uiBlock *block);
|
extern void ui_draw_panel(uiBlock *block);
|
||||||
extern void ui_do_panel(uiBlock *block, uiEvent *uevent);
|
extern void ui_do_panel(uiBlock *block, uiEvent *uevent);
|
||||||
|
|
||||||
|
/* interface_draw.c */
|
||||||
|
extern void ui_set_embossfunc(uiBut *but, int drawtype);
|
||||||
|
extern void ui_draw_but(uiBut *but);
|
||||||
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -40,8 +40,24 @@
|
|||||||
// global, button colors
|
// global, button colors
|
||||||
|
|
||||||
typedef struct ThemeUI {
|
typedef struct ThemeUI {
|
||||||
char back[4];
|
char neutral[4];
|
||||||
|
char action[4];
|
||||||
|
char setting[4];
|
||||||
|
char setting1[4];
|
||||||
|
char setting2[4];
|
||||||
|
char num[4];
|
||||||
|
char textfield[4];
|
||||||
|
char popup[4];
|
||||||
char text[4];
|
char text[4];
|
||||||
|
char text_hi[4];
|
||||||
|
char menu_back[4];
|
||||||
|
char menu_item[4];
|
||||||
|
char menu_hilite[4];
|
||||||
|
char menu_text[4];
|
||||||
|
char menu_text_hi[4];
|
||||||
|
|
||||||
|
char but_drawtype, pad;
|
||||||
|
short pad1;
|
||||||
|
|
||||||
} ThemeUI;
|
} ThemeUI;
|
||||||
|
|
||||||
|
|||||||
@@ -370,21 +370,18 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
float val;
|
float val;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if( uiNewPanel(curarea, block, "Mesh", "Editing", 320, 0, 318, 204)==0) return;
|
if( uiNewPanel(curarea, block, "Mesh", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Auto Smooth",10,178,130,17, &me->flag, 0, 0, 0, 0, "Treats all faces with angles less than Degr: as 'smooth' during render");
|
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Auto Smooth",10,178,130,17, &me->flag, 0, 0, 0, 0, "Treats all faces with angles less than Degr: as 'smooth' during render");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,156,130,17, &me->smoothresh, 1, 80, 0, 0, "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
|
uiDefButS(block, NUM, B_DIFF, "Degr:", 10,156,130,17, &me->smoothresh, 1, 80, 0, 0, "Defines maximum angle between face normals that 'Auto Smooth' will operate on");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,124,130,17, &me->flag, 0, 0, 0, 0, "Treats the active object as a Catmull-Clark Subdivision Surface");
|
uiDefButS(block, TOG|BIT|7, B_MAKEDISP, "SubSurf", 10,124,130,17, &me->flag, 0, 0, 0, 0, "Treats the active object as a Catmull-Clark Subdivision Surface");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,100,18, &me->subdiv, 0, 12, 0, 0, "Defines the level of subdivision to display in real time interactively");
|
uiDefButS(block, NUM, B_MAKEDISP, "Subdiv:", 10,104,100,18, &me->subdiv, 0, 12, 0, 0, "Defines the level of subdivision to display in real time interactively");
|
||||||
uiDefButS(block, NUM, B_MAKEDISP, "", 110, 104, 30, 18, &me->subdivr, 0, 12, 0, 0, "Defines the level of subdivision to apply during rendering");
|
uiDefButS(block, NUM, B_MAKEDISP, "", 110, 104, 30, 18, &me->subdivr, 0, 12, 0, 0, "Defines the level of subdivision to apply during rendering");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
if(me->msticky) val= 1.0; else val= 0.0;
|
if(me->msticky) val= 1.0; else val= 0.0;
|
||||||
uiDefBut(block, LABEL, 0, "Sticky", 10,57,70,20, 0, val, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Sticky", 10,57,70,20, 0, val, 0, 0, 0, "");
|
||||||
if(me->msticky==0) {
|
if(me->msticky==0) {
|
||||||
@@ -416,15 +413,14 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
|
|||||||
if( (dl=ob->disp.first) && dl->mesh);
|
if( (dl=ob->disp.first) && dl->mesh);
|
||||||
else decim_faces= tottria;
|
else decim_faces= tottria;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
uiDefButI(block, NUMSLI,B_DECIM_FACES, "Decimator: ", 173,176,233,19, &decim_faces, 4.0, tottria, 10, 10, "Defines the number of triangular faces to decimate the active Mesh object to");
|
uiDefButI(block, NUMSLI,B_DECIM_FACES, "Decimator: ", 173,176,233,19, &decim_faces, 4.0, tottria, 10, 10, "Defines the number of triangular faces to decimate the active Mesh object to");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT,B_DECIM_CANCEL, "Cancel", 290,156,116,18, 0, 0, 0, 0, 0, "Restores the Mesh to its original number of faces");
|
uiDefBut(block, BUT,B_DECIM_CANCEL, "Cancel", 290,156,116,18, 0, 0, 0, 0, 0, "Restores the Mesh to its original number of faces");
|
||||||
uiDefBut(block, BUT,B_DECIM_APPLY, "Apply", 173,156,115,18, 0, 0, 0, 0, 0, "Applies the decimation to the active Mesh object");
|
uiDefBut(block, BUT,B_DECIM_APPLY, "Apply", 173,156,115,18, 0, 0, 0, 0, 0, "Applies the decimation to the active Mesh object");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIDPoinBut(block, test_meshpoin_but, 0, "TexMesh: ", 174,120,234,19, &me->texcomesh, "Enter the name of a Meshblock");
|
uiDefIDPoinBut(block, test_meshpoin_but, 0, "TexMesh: ", 174,120,234,19, &me->texcomesh, "Enter the name of a Meshblock");
|
||||||
|
|
||||||
if(me->key) {
|
if(me->key) {
|
||||||
@@ -432,17 +428,13 @@ static void editing_panel_mesh_type(Object *ob, Mesh *me)
|
|||||||
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 174,55,100,19, &me->key->type, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 174,55,100,19, &me->key->type, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SLOWERDRAW,"SlowerDraw", 174,35,100,19, 0, 0, 0, 0, 0, "Displays the active object with all possible edges shown");
|
uiDefBut(block, BUT, B_SLOWERDRAW,"SlowerDraw", 174,35,100,19, 0, 0, 0, 0, 0, "Displays the active object with all possible edges shown");
|
||||||
uiDefBut(block, BUT, B_FASTERDRAW,"FasterDraw", 175,15,100,19, 0, 0, 0, 0, 0, "Displays the active object faster by omitting some edges when drawing");
|
uiDefBut(block, BUT, B_FASTERDRAW,"FasterDraw", 175,15,100,19, 0, 0, 0, 0, 0, "Displays the active object faster by omitting some edges when drawing");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 275, 95, 133, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 275, 95, 133, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
||||||
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 275, 75, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
|
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 275, 75, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
|
||||||
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 275, 55, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
|
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 275, 55, 133, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Double Sided", 275,35,133,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
|
uiDefButS(block, TOG|BIT|2, REDRAWVIEW3D, "Double Sided", 275,35,133,19, &me->flag, 0, 0, 0, 0, "Toggles selected faces as doublesided or single-sided");
|
||||||
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "No V.Normal Flip",275,15,133,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
|
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "No V.Normal Flip",275,15,133,19, &me->flag, 0, 0, 0, 0, "Disables flipping of vertexnormals during render");
|
||||||
|
|
||||||
@@ -642,17 +634,14 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
|
|||||||
char *strp;
|
char *strp;
|
||||||
static int packdummy = 0;
|
static int packdummy = 0;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_font_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_font_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Font", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Font", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW,B_MAKEFONT, "Left", 484,139,53,18, &cu->spacemode, 0.0,0.0, 0, 0, "");
|
uiDefButS(block, ROW,B_MAKEFONT, "Left", 484,139,53,18, &cu->spacemode, 0.0,0.0, 0, 0, "");
|
||||||
uiDefButS(block, ROW,B_MAKEFONT, "Middle", 604,139,61,18, &cu->spacemode, 0.0,1.0, 0, 0, "");
|
uiDefButS(block, ROW,B_MAKEFONT, "Middle", 604,139,61,18, &cu->spacemode, 0.0,1.0, 0, 0, "");
|
||||||
uiDefButS(block, ROW,B_MAKEFONT, "Right", 540,139,62,18, &cu->spacemode, 0.0,2.0, 0, 0, "");
|
uiDefButS(block, ROW,B_MAKEFONT, "Right", 540,139,62,18, &cu->spacemode, 0.0,2.0, 0, 0, "");
|
||||||
uiDefButS(block, ROW,B_MAKEFONT, "Flush", 665,139,61,18, &cu->spacemode, 0.0,3.0, 0, 0, "");
|
uiDefButS(block, ROW,B_MAKEFONT, "Flush", 665,139,61,18, &cu->spacemode, 0.0,3.0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, B_TEXTONCURVE, "TextOnCurve:", 484,115,243,19, &cu->textoncurve, "");
|
uiDefIDPoinBut(block, test_obpoin_but, B_TEXTONCURVE, "TextOnCurve:", 484,115,243,19, &cu->textoncurve, "");
|
||||||
uiDefBut(block, TEX,REDRAWVIEW3D, "Ob Family:", 484,85,243,19, cu->family, 0.0, 20.0, 0, 0, "");
|
uiDefBut(block, TEX,REDRAWVIEW3D, "Ob Family:", 484,85,243,19, cu->family, 0.0, 20.0, 0, 0, "");
|
||||||
|
|
||||||
@@ -663,11 +652,8 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
|
|||||||
uiDefButF(block, NUM,B_MAKEFONT, "Shear:", 482,12,121,19, &cu->shear, -1.0,1.0, 10, 0, "");
|
uiDefButF(block, NUM,B_MAKEFONT, "Shear:", 482,12,121,19, &cu->shear, -1.0,1.0, 10, 0, "");
|
||||||
uiDefButF(block, NUM,B_MAKEFONT, "X offset:", 605,12,121,19, &cu->xof, -50.0,50.0, 10, 0, "");
|
uiDefButF(block, NUM,B_MAKEFONT, "X offset:", 605,12,121,19, &cu->xof, -50.0,50.0, 10, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_TOUPPER, "ToUpper", 623,163,103,23, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_TOUPPER, "ToUpper", 623,163,103,23, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
G.buts->texnr= give_vfontnr(cu->vfont);
|
G.buts->texnr= give_vfontnr(cu->vfont);
|
||||||
|
|
||||||
strp= give_vfontbutstr();
|
strp= give_vfontbutstr();
|
||||||
@@ -680,12 +666,10 @@ static void editing_panel_font_type(Object *ob, Curve *cu)
|
|||||||
packdummy = 0;
|
packdummy = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
uiDefIconButI(block, TOG|BIT|0, B_PACKFONT, ICON_PACKAGE, 706,191,20,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Vectorfont");
|
uiDefIconButI(block, TOG|BIT|0, B_PACKFONT, ICON_PACKAGE, 706,191,20,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Vectorfont");
|
||||||
|
|
||||||
MEM_freeN(strp);
|
MEM_freeN(strp);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_LOADFONT, "Load Font", 484,163,103,23, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_LOADFONT, "Load Font", 484,163,103,23, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -859,10 +843,9 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
short *sp;
|
short *sp;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_tools", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_tools", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Curve Tools", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Curve Tools", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
if(ob->type==OB_CURVE) {
|
if(ob->type==OB_CURVE) {
|
||||||
uiDefBut(block, LABEL, 0, "Convert", 463,173,72, 18, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Convert", 463,173,72, 18, 0, 0, 0, 0, 0, "");
|
||||||
uiDefBut(block, BUT,B_CONVERTPOLY,"Poly", 467,152,72, 18, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_CONVERTPOLY,"Poly", 467,152,72, 18, 0, 0, 0, 0, 0, "");
|
||||||
@@ -880,7 +863,7 @@ static void editing_panel_curve_tools(Object *ob, Curve *cu)
|
|||||||
uiDefBut(block, BUT,B_BEZV,"V", 670,112,50, 18, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_BEZV,"V", 670,112,50, 18, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiDefBut(block, BUT,B_SETWEIGHT,"Set Weight", 465,11,95,49, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_SETWEIGHT,"Set Weight", 465,11,95,49, 0, 0, 0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM,0,"Weight:", 564,36,102,22, &editbutweight, 0.01, 10.0, 10, 0, "");
|
uiDefButF(block, NUM,0,"Weight:", 564,36,102,22, &editbutweight, 0.01, 10.0, 10, 0, "");
|
||||||
uiDefBut(block, BUT,B_SETW1,"1.0", 669,36,50,22, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_SETW1,"1.0", 669,36,50,22, 0, 0, 0, 0, 0, "");
|
||||||
uiDefBut(block, BUT,B_SETW2,"sqrt(2)/4",564,11,57,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT,B_SETW2,"sqrt(2)/4",564,11,57,20, 0, 0, 0, 0, 0, "");
|
||||||
@@ -909,17 +892,14 @@ static void editing_panel_curve_tools1(Object *ob, Curve *cu)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_tools1", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_tools1", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Curve Tools1", "Editing", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Curve Tools1", "Editing", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
uiDefBut(block, BUT, B_SUBDIVCURVE, "Subdivide", 400,180,150,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_SUBDIVCURVE, "Subdivide", 400,180,150,20, 0, 0, 0, 0, 0, "");
|
||||||
if(ob->type==OB_SURF) {
|
if(ob->type==OB_SURF) {
|
||||||
uiDefBut(block, BUT, B_SPINNURB, "Spin", 400,160,150,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_SPINNURB, "Spin", 400,160,150,20, 0, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, BUT,B_HIDE, "Hide", 400,120,150,18, 0, 0, 0, 0, 0, "Hides selected faces");
|
uiDefBut(block, BUT,B_HIDE, "Hide", 400,120,150,18, 0, 0, 0, 0, 0, "Hides selected faces");
|
||||||
uiDefBut(block, BUT,B_REVEAL, "Reveal", 400,100,150,18, 0, 0, 0, 0, 0, "Reveals selected faces");
|
uiDefBut(block, BUT,B_REVEAL, "Reveal", 400,100,150,18, 0, 0, 0, 0, 0, "Reveals selected faces");
|
||||||
uiDefBut(block, BUT,B_SELSWAP, "Select Swap", 400,80,150,18, 0, 0, 0, 0, 0, "Selects unselected faces, and deselects selected faces");
|
uiDefBut(block, BUT,B_SELSWAP, "Select Swap", 400,80,150,18, 0, 0, 0, 0, 0, "Selects unselected faces, and deselects selected faces");
|
||||||
@@ -932,21 +912,19 @@ static void editing_panel_curve_type(Object *ob, Curve *cu)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_curve_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Curve and Surface", "Editing", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Curve and Surface", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|5, 0, "UV Orco", 543,160,130,18, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|5, 0, "UV Orco", 543,160,130,18, &cu->flag, 0, 0, 0, 0, "");
|
||||||
if(ob->type==OB_SURF)
|
if(ob->type==OB_SURF)
|
||||||
uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D, "No Puno Flip", 543,140,130,18, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D, "No Puno Flip", 543,140,130,18, &cu->flag, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 543, 115, 140, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 543, 115, 140, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
||||||
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 543, 95, 140, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
|
uiDefBut(block, BUT,B_DOCENTRENEW, "Centre New", 543, 95, 140, 19, 0, 0, 0, 0, 0, "Shifts object's origin to center of object data");
|
||||||
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 543, 75, 140, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
|
uiDefBut(block, BUT,B_DOCENTRECURSOR, "Centre Cursor", 543, 75, 140, 19, 0, 0, 0, 0, 0, "Shifts object's origin to cursor location");
|
||||||
|
|
||||||
if(ob->type==OB_SURF) {
|
if(ob->type==OB_SURF) {
|
||||||
if(cu->key) {
|
if(cu->key) {
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
/* uiDefButS(block, NUM, B_DIFF, "Slurph:", 543,25,140,19, &(cu->key->slurph), -500.0, 500.0,0,0); ,""*/
|
/* uiDefButS(block, NUM, B_DIFF, "Slurph:", 543,25,140,19, &(cu->key->slurph), -500.0, 500.0,0,0); ,""*/
|
||||||
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 543,45,140,19, &cu->key->type, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG, B_RELKEY, "Relative Keys", 543,45,140,19, &cu->key->type, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
@@ -957,29 +935,24 @@ static void editing_panel_curve_type(Object *ob, Curve *cu)
|
|||||||
if(ob->type==OB_CURVE) {
|
if(ob->type==OB_CURVE) {
|
||||||
static float prlen;
|
static float prlen;
|
||||||
char str[32];
|
char str[32];
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_RECALCPATH, "PathLen:", 543,50,140,19, &cu->pathlen, 1.0, 9000.0, 0, 0, "");
|
uiDefButS(block, NUM, B_RECALCPATH, "PathLen:", 543,50,140,19, &cu->pathlen, 1.0, 9000.0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|3, B_RECALCPATH, "CurvePath", 543,30,70,19 , &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|3, B_RECALCPATH, "CurvePath", 543,30,70,19 , &cu->flag, 0, 0, 0, 0, "");
|
||||||
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "CurveFollow",613,30,70,19, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "CurveFollow",613,30,70,19, &cu->flag, 0, 0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
sprintf(str, "%.4f", prlen);
|
sprintf(str, "%.4f", prlen);
|
||||||
uiDefBut(block, BUT, B_PRINTLEN, "PrintLen", 543,10,70,19, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_PRINTLEN, "PrintLen", 543,10,70,19, 0, 0, 0, 0, 0, "");
|
||||||
uiDefBut(block, LABEL, 0, str, 613,10,70,19, 0, 1.0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, str, 613,10,70,19, 0, 1.0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
uiDefButS(block, NUM, B_MAKEDISP, "DefResolU:", 752,163,132,21, &cu->resolu, 1.0, 128.0, 0, 0, "");
|
uiDefButS(block, NUM, B_MAKEDISP, "DefResolU:", 752,163,132,21, &cu->resolu, 1.0, 128.0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SETRESOLU, "Set", 887,163,29,21, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_SETRESOLU, "Set", 887,163,29,21, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_MAKEDISP, "BevResol:", 753,30,163,18, &cu->bevresol, 0.0, 10.0, 0, 0, "");
|
uiDefButS(block, NUM, B_MAKEDISP, "BevResol:", 753,30,163,18, &cu->bevresol, 0.0, 10.0, 0, 0, "");
|
||||||
|
|
||||||
uiDefIDPoinBut(block, test_obcurpoin_but, B_MAKEDISP, "BevOb:", 753,10,163,18, &cu->bevobj, "");
|
uiDefIDPoinBut(block, test_obcurpoin_but, B_MAKEDISP, "BevOb:", 753,10,163,18, &cu->bevobj, "");
|
||||||
uiDefButF(block, NUM, B_MAKEDISP, "Width:", 753,90,163,18, &cu->width, 0.0, 2.0, 1, 0, "");
|
uiDefButF(block, NUM, B_MAKEDISP, "Width:", 753,90,163,18, &cu->width, 0.0, 2.0, 1, 0, "");
|
||||||
uiDefButF(block, NUM, B_MAKEDISP, "Ext1:", 753,70,163,18, &cu->ext1, 0.0, 5.0, 10, 0, "");
|
uiDefButF(block, NUM, B_MAKEDISP, "Ext1:", 753,70,163,18, &cu->ext1, 0.0, 5.0, 10, 0, "");
|
||||||
uiDefButF(block, NUM, B_MAKEDISP, "Ext2:", 753,50,163,18, &cu->ext2, 0.0, 2.0, 1, 0, "");
|
uiDefButF(block, NUM, B_MAKEDISP, "Ext2:", 753,50,163,18, &cu->ext2, 0.0, 2.0, 1, 0, "");
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
|
||||||
|
|
||||||
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButS(block, TOG|BIT|0, B_CU3D, "3D", 867,130,47,18, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|0, B_CU3D, "3D", 867,130,47,18, &cu->flag, 0, 0, 0, 0, "");
|
||||||
uiDefButS(block, TOG|BIT|1, B_MAKEDISP, "Front", 810,130,55,18, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|1, B_MAKEDISP, "Front", 810,130,55,18, &cu->flag, 0, 0, 0, 0, "");
|
||||||
uiDefButS(block, TOG|BIT|2, B_MAKEDISP, "Back", 753,130,53,18, &cu->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|2, B_MAKEDISP, "Back", 753,130,53,18, &cu->flag, 0, 0, 0, 0, "");
|
||||||
@@ -1001,7 +974,7 @@ static void editing_panel_camera_type(Object *ob, Camera *cam)
|
|||||||
if(G.vd) grid= G.vd->grid;
|
if(G.vd) grid= G.vd->grid;
|
||||||
if(grid<1.0) grid= 1.0;
|
if(grid<1.0) grid= 1.0;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_camera_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_camera_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Camera", "Editing", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Camera", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
@@ -1010,19 +983,16 @@ static void editing_panel_camera_type(Object *ob, Camera *cam)
|
|||||||
uiDefButF(block, NUM,REDRAWVIEW3D, "ClipEnd:", 470,125,160,20, &cam->clipend, 1.0, 5000.0*grid, 100, 0, "Specify the endvalue of the the field of view");
|
uiDefButF(block, NUM,REDRAWVIEW3D, "ClipEnd:", 470,125,160,20, &cam->clipend, 1.0, 5000.0*grid, 100, 0, "Specify the endvalue of the the field of view");
|
||||||
uiDefButF(block, NUM,REDRAWVIEW3D, "DrawSize:", 470,90,160,20, &cam->drawsize, 0.1*grid, 10.0, 10, 0, "Specify the drawsize of the camera");
|
uiDefButF(block, NUM,REDRAWVIEW3D, "DrawSize:", 470,90,160,20, &cam->drawsize, 0.1*grid, 10.0, 10, 0, "Specify the drawsize of the camera");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG, REDRAWVIEW3D, "Ortho", 470,49,61,40, &cam->type, 0, 0, 0, 0, "Render orthogonally");
|
uiDefButS(block, TOG, REDRAWVIEW3D, "Ortho", 470,49,61,40, &cam->type, 0, 0, 0, 0, "Render orthogonally");
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D, "ShowLimits", 533,69,97,20, &cam->flag, 0, 0, 0, 0, "Draw the field of view");
|
uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D, "ShowLimits", 533,69,97,20, &cam->flag, 0, 0, 0, 0, "Draw the field of view");
|
||||||
uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D, "Show Mist", 533,49,97,20, &cam->flag, 0, 0, 0, 0, "Draw a line that indicates the mist area");
|
uiDefButS(block, TOG|BIT|1,REDRAWVIEW3D, "Show Mist", 533,49,97,20, &cam->flag, 0, 0, 0, 0, "Draw a line that indicates the mist area");
|
||||||
|
|
||||||
if(G.special1 & G_HOLO) {
|
if(G.special1 & G_HOLO) {
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
if(cam->netend==0.0) cam->netend= EFRA;
|
if(cam->netend==0.0) cam->netend= EFRA;
|
||||||
uiDefButF(block, NUM, REDRAWVIEW3D, "Anim len", 670,80,100,20, &cam->netend, 1.0, 2500.0, 0, 0, "");
|
uiDefButF(block, NUM, REDRAWVIEW3D, "Anim len", 670,80,100,20, &cam->netend, 1.0, 2500.0, 0, 0, "");
|
||||||
uiDefButF(block, NUM, REDRAWVIEW3D, "Path len:", 670,160,100,20, &cam->hololen, 0.1, 25.0, 10, 0, "");
|
uiDefButF(block, NUM, REDRAWVIEW3D, "Path len:", 670,160,100,20, &cam->hololen, 0.1, 25.0, 10, 0, "");
|
||||||
uiDefButF(block, NUM, REDRAWVIEW3D, "Shear fac:", 670,140,100,20, &cam->hololen1, 0.1, 5.0, 10, 0, "");
|
uiDefButF(block, NUM, REDRAWVIEW3D, "Shear fac:", 670,140,100,20, &cam->hololen1, 0.1, 5.0, 10, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "Holo 1", 670,120,100,20, &cam->flag, 0.0, 0.0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "Holo 1", 670,120,100,20, &cam->flag, 0.0, 0.0, 0, 0, "");
|
||||||
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Holo 2", 670,100,100,20, &cam->flag, 0.0, 0.0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|5, REDRAWVIEW3D, "Holo 2", 670,100,100,20, &cam->flag, 0.0, 0.0, 0, 0, "");
|
||||||
|
|
||||||
@@ -1046,7 +1016,7 @@ static void editing_panel_mball_type(Object *ob, MetaBall *mb)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mball_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mball_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "MetaBall", "Editing", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "MetaBall", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if (ob==find_basis_mball(ob)) {
|
if (ob==find_basis_mball(ob)) {
|
||||||
@@ -1054,12 +1024,11 @@ static void editing_panel_mball_type(Object *ob, MetaBall *mb)
|
|||||||
uiDefButF(block, NUMSLI, 0, "Rendersize:", 470,158,250,19, &mb->rendersize, 0.05, 1.0, 0, 0, "");
|
uiDefButF(block, NUMSLI, 0, "Rendersize:", 470,158,250,19, &mb->rendersize, 0.05, 1.0, 0, 0, "");
|
||||||
uiDefButF(block, NUMSLI, B_RECALCMBALL, "Threshold:", 470,138,250,19, &mb->thresh, 0.0001, 5.0, 0, 0, "");
|
uiDefButF(block, NUMSLI, B_RECALCMBALL, "Threshold:", 470,138,250,19, &mb->thresh, 0.0001, 5.0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefBut(block, LABEL, 0, "Update:", 471,108,120,19, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Update:", 471,108,120,19, 0, 0, 0, 0, 0, "");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Always", 471, 85, 120, 19, &mb->flag, 0.0, 0.0, 0, 0, "");
|
uiDefButS(block, ROW, B_DIFF, "Always", 471, 85, 120, 19, &mb->flag, 0.0, 0.0, 0, 0, "");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Half Res", 471, 65, 120, 19, &mb->flag, 0.0, 1.0, 0, 0, "");
|
uiDefButS(block, ROW, B_DIFF, "Half Res", 471, 65, 120, 19, &mb->flag, 0.0, 1.0, 0, 0, "");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Fast", 471, 45, 120, 19, &mb->flag, 0.0, 2.0, 0, 0, "");
|
uiDefButS(block, ROW, B_DIFF, "Fast", 471, 45, 120, 19, &mb->flag, 0.0, 2.0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1069,7 +1038,7 @@ static void editing_panel_mball_tools(Object *ob, MetaBall *mb)
|
|||||||
extern MetaElem *lastelem;
|
extern MetaElem *lastelem;
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mball_tools", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mball_tools", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if( uiNewPanel(curarea, block, "MetaBall tools", "Editing", 640, 0, 318, 204)==0) return;
|
if( uiNewPanel(curarea, block, "MetaBall tools", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(ob==G.obedit && lastelem) {
|
if(ob==G.obedit && lastelem) {
|
||||||
@@ -1082,7 +1051,6 @@ static void editing_panel_mball_tools(Object *ob, MetaBall *mb)
|
|||||||
if((lastelem->type==MB_CUBE)||(lastelem->type==MB_ELIPSOID))
|
if((lastelem->type==MB_CUBE)||(lastelem->type==MB_ELIPSOID))
|
||||||
uiDefButF(block, NUMSLI, B_RECALCMBALL, "dz:", 750,118,250,19, &lastelem->expz, 0.0, 20.0, 0, 0, "");
|
uiDefButF(block, NUMSLI, B_RECALCMBALL, "dz:", 750,118,250,19, &lastelem->expz, 0.0, 20.0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, B_RECALCMBALL, "Negative",753,16,60,19, &lastelem->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|1, B_RECALCMBALL, "Negative",753,16,60,19, &lastelem->flag, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiDefButS(block, ROW, B_RECALCMBALL, "Ball", 753,83,60,19, &lastelem->type, 1.0, 0.0, 0, 0, "");
|
uiDefButS(block, ROW, B_RECALCMBALL, "Ball", 753,83,60,19, &lastelem->type, 1.0, 0.0, 0, 0, "");
|
||||||
@@ -1134,7 +1102,7 @@ static void editing_panel_lattice_type(Object *ob, Lattice *lt)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_lattice_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_lattice_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Latice", "Editing", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Latice", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
@@ -1145,7 +1113,6 @@ static void editing_panel_lattice_type(Object *ob, Lattice *lt)
|
|||||||
uiDefButS(block, NUM, B_RESIZELAT, "W:", 470,138,100,19, <->pntsw, 1.0, 64.0, 0, 0, "");
|
uiDefButS(block, NUM, B_RESIZELAT, "W:", 470,138,100,19, <->pntsw, 1.0, 64.0, 0, 0, "");
|
||||||
uiClearButLock();
|
uiClearButLock();
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButC(block, ROW, B_LATTCHANGED, "Lin", 572, 178, 40, 19, <->typeu, 1.0, (float)KEY_LINEAR, 0, 0, "");
|
uiDefButC(block, ROW, B_LATTCHANGED, "Lin", 572, 178, 40, 19, <->typeu, 1.0, (float)KEY_LINEAR, 0, 0, "");
|
||||||
uiDefButC(block, ROW, B_LATTCHANGED, "Card", 612, 178, 40, 19, <->typeu, 1.0, (float)KEY_CARDINAL, 0, 0, "");
|
uiDefButC(block, ROW, B_LATTCHANGED, "Card", 612, 178, 40, 19, <->typeu, 1.0, (float)KEY_CARDINAL, 0, 0, "");
|
||||||
uiDefButC(block, ROW, B_LATTCHANGED, "B", 652, 178, 40, 19, <->typeu, 1.0, (float)KEY_BSPLINE, 0, 0, "");
|
uiDefButC(block, ROW, B_LATTCHANGED, "B", 652, 178, 40, 19, <->typeu, 1.0, (float)KEY_BSPLINE, 0, 0, "");
|
||||||
@@ -1158,10 +1125,8 @@ static void editing_panel_lattice_type(Object *ob, Lattice *lt)
|
|||||||
uiDefButC(block, ROW, B_LATTCHANGED, "Card", 612, 138, 40, 19, <->typew, 3.0, (float)KEY_CARDINAL, 0, 0, "");
|
uiDefButC(block, ROW, B_LATTCHANGED, "Card", 612, 138, 40, 19, <->typew, 3.0, (float)KEY_CARDINAL, 0, 0, "");
|
||||||
uiDefButC(block, ROW, B_LATTCHANGED, "B", 652, 138, 40, 19, <->typew, 3.0, (float)KEY_BSPLINE, 0, 0, "");
|
uiDefButC(block, ROW, B_LATTCHANGED, "B", 652, 138, 40, 19, <->typew, 3.0, (float)KEY_BSPLINE, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_RESIZELAT, "Make Regular", 470,101,99,32, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_RESIZELAT, "Make Regular", 470,101,99,32, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, B_LATTCHANGED, "Outside", 571,101,120,31, <->flag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|1, B_LATTCHANGED, "Outside", 571,101,120,31, <->flag, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
if(lt->key) {
|
if(lt->key) {
|
||||||
@@ -1324,10 +1289,9 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
int bx=148, by=100;
|
int bx=148, by=100;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_armature_type", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_armature_type", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Armature", "Editing", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Armature", "Editing", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|ARM_RESTPOSBIT,REDRAWVIEW3D, "Rest Pos", bx,by,97,20, &arm->flag, 0, 0, 0, 0, "Disable all animation for this object");
|
uiDefButI(block, TOG|BIT|ARM_RESTPOSBIT,REDRAWVIEW3D, "Rest Pos", bx,by,97,20, &arm->flag, 0, 0, 0, 0, "Disable all animation for this object");
|
||||||
uiDefButI(block, TOG|BIT|ARM_DRAWAXESBIT,REDRAWVIEW3D, "Draw Axes", bx,by-46,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
|
uiDefButI(block, TOG|BIT|ARM_DRAWAXESBIT,REDRAWVIEW3D, "Draw Axes", bx,by-46,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone axes");
|
||||||
uiDefButI(block, TOG|BIT|ARM_DRAWNAMESBIT,REDRAWVIEW3D, "Draw Names", bx,by-69,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
|
uiDefButI(block, TOG|BIT|ARM_DRAWNAMESBIT,REDRAWVIEW3D, "Draw Names", bx,by-69,97,20, &arm->flag, 0, 0, 0, 0, "Draw bone names");
|
||||||
@@ -1348,7 +1312,7 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm)
|
|||||||
|
|
||||||
/* Draw the bone name block */
|
/* Draw the bone name block */
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_armature_bones", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_armature_bones", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Armature Bones", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Armature Bones", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* this is a variable height panel, newpanel doesnt force new size on existing panels */
|
/* this is a variable height panel, newpanel doesnt force new size on existing panels */
|
||||||
@@ -1362,11 +1326,9 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm)
|
|||||||
if (curBone->flag & (BONE_SELECTED)) {
|
if (curBone->flag & (BONE_SELECTED)) {
|
||||||
|
|
||||||
/* Hide in posemode flag */
|
/* Hide in posemode flag */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|BONE_HIDDENBIT, REDRAWVIEW3D, "Hide", bx-55,by,45,18, &curBone->flag, 0, 0, 0, 0, "Toggles display of this bone in posemode");
|
uiDefButI(block, TOG|BIT|BONE_HIDDENBIT, REDRAWVIEW3D, "Hide", bx-55,by,45,18, &curBone->flag, 0, 0, 0, 0, "Toggles display of this bone in posemode");
|
||||||
|
|
||||||
/* Bone naming button */
|
/* Bone naming button */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
strcpy (curBone->oldname, curBone->name);
|
strcpy (curBone->oldname, curBone->name);
|
||||||
but=uiDefBut(block, TEX, REDRAWVIEW3D, "BO:", bx-10,by,117,18, &curBone->name, 0, 24, 0, 0, "Change the bone name");
|
but=uiDefBut(block, TEX, REDRAWVIEW3D, "BO:", bx-10,by,117,18, &curBone->name, 0, 24, 0, 0, "Change the bone name");
|
||||||
uiButSetFunc(but, validate_editbonebutton_cb, curBone, NULL);
|
uiButSetFunc(but, validate_editbonebutton_cb, curBone, NULL);
|
||||||
@@ -1384,13 +1346,11 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm)
|
|||||||
|
|
||||||
/* IK to parent flag */
|
/* IK to parent flag */
|
||||||
if (curBone->parent){
|
if (curBone->parent){
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
but=uiDefButI(block, TOG|BIT|BONE_IK_TOPARENTBIT, REDRAWVIEW3D, "IK", bx+300,by,32,18, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "IK link to parent");
|
but=uiDefButI(block, TOG|BIT|BONE_IK_TOPARENTBIT, REDRAWVIEW3D, "IK", bx+300,by,32,18, &curBone->flag, 0.0, 0.0, 0.0, 0.0, "IK link to parent");
|
||||||
uiButSetFunc(but, attach_bone_to_parent_cb, curBone, NULL);
|
uiButSetFunc(but, attach_bone_to_parent_cb, curBone, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Dist and weight buttons */
|
/* Dist and weight buttons */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
but=uiDefButS(block, MENU, REDRAWVIEW3D,
|
but=uiDefButS(block, MENU, REDRAWVIEW3D,
|
||||||
"Skinnable %x0|"
|
"Skinnable %x0|"
|
||||||
"Unskinnable %x1|"
|
"Unskinnable %x1|"
|
||||||
@@ -1413,7 +1373,6 @@ static void editing_panel_armature_bones(Object *ob, bArmature *arm)
|
|||||||
"Classification of armature element");
|
"Classification of armature element");
|
||||||
|
|
||||||
/* Dist and weight buttons */
|
/* Dist and weight buttons */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM,REDRAWVIEW3D, "Dist:", bx+110, by-19,
|
uiDefButF(block, NUM,REDRAWVIEW3D, "Dist:", bx+110, by-19,
|
||||||
105, 18, &curBone->dist, 0.0, 1000.0, 10.0, 0.0,
|
105, 18, &curBone->dist, 0.0, 1000.0, 10.0, 0.0,
|
||||||
"Bone deformation distance");
|
"Bone deformation distance");
|
||||||
@@ -1625,13 +1584,10 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_tools", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_tools", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Mesh Tools", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Mesh Tools", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|2, 0, "Beauty", 477,195,80,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters");
|
uiDefButS(block, TOG|BIT|2, 0, "Beauty", 477,195,80,19, &editbutflag, 0, 0, 0, 0, "Causes 'Subdivide' to split faces in halves instead of quarters");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_SPLIT,"Split", 477,175,80,19, 0, 0, 0, 0, 0, "Separates selected faces from unselected faces");
|
uiDefBut(block, BUT,B_SPLIT,"Split", 477,175,80,19, 0, 0, 0, 0, 0, "Separates selected faces from unselected faces");
|
||||||
uiDefBut(block, BUT,B_TOSPHERE,"To Sphere", 477,155,80,19, 0, 0, 0, 0, 0, "Moves selected vertices outwards into a spherical shape");
|
uiDefBut(block, BUT,B_TOSPHERE,"To Sphere", 477,155,80,19, 0, 0, 0, 0, 0, "Moves selected vertices outwards into a spherical shape");
|
||||||
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 477,135,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
|
uiDefBut(block, BUT,B_SUBDIV,"Subdivide", 477,135,80,19, 0, 0, 0, 0, 0, "Splits selected faces into halves or quarters");
|
||||||
@@ -1642,21 +1598,16 @@ static void editing_panel_mesh_tools(Object *ob, Mesh *me)
|
|||||||
uiDefBut(block, BUT,B_XSORT,"Xsort", 557,135,80,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
|
uiDefBut(block, BUT,B_XSORT,"Xsort", 557,135,80,19, 0, 0, 0, 0, 0, "Sorts selected vertice data in the X direction");
|
||||||
|
|
||||||
uiDefBut(block, BUT,B_HASH,"Hash", 637,195,80,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
|
uiDefBut(block, BUT,B_HASH,"Hash", 637,195,80,19, 0, 0, 0, 0, 0, "Randomizes selected vertice sequence data");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_DIFF, "Limit:", 637,175,80,19, &doublimit, 0.0001, 1.0, 10, 0, "Specifies the max distance 'Rem Doubles' will consider vertices as 'doubled'");
|
uiDefButF(block, NUM, B_DIFF, "Limit:", 637,175,80,19, &doublimit, 0.0001, 1.0, 10, 0, "Specifies the max distance 'Rem Doubles' will consider vertices as 'doubled'");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_REMDOUB,"Rem Doubles", 637,155,80,19, 0, 0, 0, 0, 0, "Removes duplicates from selected vertices");
|
uiDefBut(block, BUT,B_REMDOUB,"Rem Doubles", 637,155,80,19, 0, 0, 0, 0, 0, "Removes duplicates from selected vertices");
|
||||||
uiDefBut(block, BUT,B_FLIPNORM,"Flip Normals", 637,135,80,19, 0, 0, 0, 0, 0, "Toggles the direction of the selected face's normals");
|
uiDefBut(block, BUT,B_FLIPNORM,"Flip Normals", 637,135,80,19, 0, 0, 0, 0, 0, "Toggles the direction of the selected face's normals");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_EXTR,"Extrude", 477,100,249,24, 0, 0, 0, 0, 0, "Converts selected edges to faces and selects the new vertices");
|
uiDefBut(block, BUT,B_EXTR,"Extrude", 477,100,249,24, 0, 0, 0, 0, 0, "Converts selected edges to faces and selects the new vertices");
|
||||||
uiDefBut(block, BUT,B_SPINDUP,"Spin Dupe", 639,75,87,24, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a circle around the cursor in the indicated viewport");
|
uiDefBut(block, BUT,B_SPINDUP,"Spin Dupe", 639,75,87,24, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a circle around the cursor in the indicated viewport");
|
||||||
uiDefBut(block, BUT,B_SPIN, "Spin", 558,75,78,24, 0, 0, 0, 0, 0, "Extrudes the selected vertices in a circle around the cursor in the indicated viewport");
|
uiDefBut(block, BUT,B_SPIN, "Spin", 558,75,78,24, 0, 0, 0, 0, 0, "Extrudes the selected vertices in a circle around the cursor in the indicated viewport");
|
||||||
uiDefBut(block, BUT,B_SCREW,"Screw", 477,75,79,24, 0, 0, 0, 0, 0, "Activates the screw tool"); // Bish - This could use some more definition
|
uiDefBut(block, BUT,B_SCREW,"Screw", 477,75,79,24, 0, 0, 0, 0, 0, "Activates the screw tool"); // Bish - This could use some more definition
|
||||||
uiDefBut(block, BUT,B_EXTREP, "Extrude Dupe", 477,15,128,19, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a straight line away from the current viewport");
|
uiDefBut(block, BUT,B_EXTREP, "Extrude Dupe", 477,15,128,19, 0, 0, 0, 0, 0, "Creates copies of the selected vertices in a straight line away from the current viewport");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_DIFF, "Degr:", 477,55,78,19, °r,10.0,360.0, 0, 0, "Specifies the number of degrees 'Spin' revolves");
|
uiDefButS(block, NUM, B_DIFF, "Degr:", 477,55,78,19, °r,10.0,360.0, 0, 0, "Specifies the number of degrees 'Spin' revolves");
|
||||||
uiDefButS(block, NUM, B_DIFF, "Steps:", 558,55,78,19, &step,1.0,180.0, 0, 0, "Specifies the total number of 'Spin' slices");
|
uiDefButS(block, NUM, B_DIFF, "Steps:", 558,55,78,19, &step,1.0,180.0, 0, 0, "Specifies the total number of 'Spin' slices");
|
||||||
uiDefButS(block, NUM, B_DIFF, "Turns:", 639,55,86,19, &turn,1.0,360.0, 0, 0, "Specifies the number of revolutions the screw turns");
|
uiDefButS(block, NUM, B_DIFF, "Turns:", 639,55,86,19, &turn,1.0,360.0, 0, 0, "Specifies the number of revolutions the screw turns");
|
||||||
@@ -1679,18 +1630,15 @@ static void editing_panel_mesh_tools1(Object *ob, Mesh *me)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_tools1", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_tools1", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Mesh Tools 1", "Editing", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Mesh Tools 1", "Editing", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 1091, 200, 100, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
uiDefBut(block, BUT,B_DOCENTRE, "Centre", 1091, 200, 100, 19, 0, 0, 0, 0, 0, "Shifts object data to be centered about object's origin");
|
||||||
|
|
||||||
|
|
||||||
uiDefBut(block, BUT,B_HIDE, "Hide", 1091,152,77,18, 0, 0, 0, 0, 0, "Hides selected faces");
|
uiDefBut(block, BUT,B_HIDE, "Hide", 1091,152,77,18, 0, 0, 0, 0, 0, "Hides selected faces");
|
||||||
uiDefBut(block, BUT,B_REVEAL, "Reveal", 1171,152,86,18, 0, 0, 0, 0, 0, "Reveals selected faces");
|
uiDefBut(block, BUT,B_REVEAL, "Reveal", 1171,152,86,18, 0, 0, 0, 0, 0, "Reveals selected faces");
|
||||||
uiDefBut(block, BUT,B_SELSWAP, "Select Swap", 1091,129,166,18, 0, 0, 0, 0, 0, "Selects unselected faces, and deselects selected faces");
|
uiDefBut(block, BUT,B_SELSWAP, "Select Swap", 1091,129,166,18, 0, 0, 0, 0, 0, "Selects unselected faces, and deselects selected faces");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, REDRAWVIEW3D, "NSize:", 1090, 90, 164, 19, &editbutsize, 0.001, 2.0, 10, 0, "Sets the length to use when displaying face normals");
|
uiDefButF(block, NUM, REDRAWVIEW3D, "NSize:", 1090, 90, 164, 19, &editbutsize, 0.001, 2.0, 10, 0, "Sets the length to use when displaying face normals");
|
||||||
uiDefButI(block, TOG|BIT|6, REDRAWVIEW3D, "Draw Normals", 1090,70,164,19, &G.f, 0, 0, 0, 0, "Displays face normals as lines");
|
uiDefButI(block, TOG|BIT|6, REDRAWVIEW3D, "Draw Normals", 1090,70,164,19, &G.f, 0, 0, 0, 0, "Displays face normals as lines");
|
||||||
uiDefButI(block, TOG|BIT|7, REDRAWVIEW3D, "Draw Faces", 1090,50,164,19, &G.f, 0, 0, 0, 0, "Displays all faces as shades");
|
uiDefButI(block, TOG|BIT|7, REDRAWVIEW3D, "Draw Faces", 1090,50,164,19, &G.f, 0, 0, 0, 0, "Displays all faces as shades");
|
||||||
@@ -1707,7 +1655,6 @@ static void editing_panel_mesh_tools1(Object *ob, Mesh *me)
|
|||||||
bDeformGroup *dg;
|
bDeformGroup *dg;
|
||||||
int min, by=210, index;
|
int min, by=210, index;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, LABEL,0,"Vertex Groups", 940,by-=19,113,18, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL,0,"Vertex Groups", 940,by-=19,113,18, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
defCount=BLI_countlist(&ob->defbase);
|
defCount=BLI_countlist(&ob->defbase);
|
||||||
@@ -1738,16 +1685,13 @@ static void editing_panel_mesh_tools1(Object *ob, Mesh *me)
|
|||||||
|
|
||||||
if (G.obedit && G.obedit==ob){
|
if (G.obedit && G.obedit==ob){
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
/* uiDefBut(block, BUT,B_AUTOVGROUP,"Auto Weight", 740,by-=22,93,18, 0, 0, 0, 0, 0, "Automatically assigns deformation groups"); */
|
/* uiDefBut(block, BUT,B_AUTOVGROUP,"Auto Weight", 740,by-=22,93,18, 0, 0, 0, 0, 0, "Automatically assigns deformation groups"); */
|
||||||
uiDefBut(block, BUT,B_NEWVGROUP,"New", 940,by-=22,45,18, 0, 0, 0, 0, 0, "Creates a new vertex group");
|
uiDefBut(block, BUT,B_NEWVGROUP,"New", 940,by-=22,45,18, 0, 0, 0, 0, 0, "Creates a new vertex group");
|
||||||
uiDefBut(block, BUT,B_DELVGROUP,"Delete", 988,by,45,18, 0, 0, 0, 0, 0, "Removes the current vertex group");
|
uiDefBut(block, BUT,B_DELVGROUP,"Delete", 988,by,45,18, 0, 0, 0, 0, 0, "Removes the current vertex group");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_ASSIGNVGROUP,"Assign", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Assigns selected vertices to the current vertex group");
|
uiDefBut(block, BUT,B_ASSIGNVGROUP,"Assign", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Assigns selected vertices to the current vertex group");
|
||||||
uiDefBut(block, BUT,B_REMOVEVGROUP,"Remove", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Removes selected vertices from the current vertex group");
|
uiDefBut(block, BUT,B_REMOVEVGROUP,"Remove", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Removes selected vertices from the current vertex group");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, BUT,B_SELVGROUP,"Select", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Selects vertices belonging to the current vertex group");
|
uiDefBut(block, BUT,B_SELVGROUP,"Select", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Selects vertices belonging to the current vertex group");
|
||||||
uiDefBut(block, BUT,B_DESELVGROUP,"Deselect", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Deselects vertices belonging to the current vertex group");
|
uiDefBut(block, BUT,B_DESELVGROUP,"Deselect", 940,by-=22,93,18, 0, 0, 0, 0, 0, "Deselects vertices belonging to the current vertex group");
|
||||||
}
|
}
|
||||||
@@ -1766,7 +1710,7 @@ static void editing_panel_materials(Object *ob)
|
|||||||
char str[64];
|
char str[64];
|
||||||
uiBut *but;
|
uiBut *but;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_materials", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_materials", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Link and Materials", "Editing", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Link and Materials", "Editing", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
buttons_active_id(&id, &idfrom);
|
buttons_active_id(&id, &idfrom);
|
||||||
@@ -1806,12 +1750,10 @@ static void editing_panel_materials(Object *ob)
|
|||||||
alone= B_LATTALONE;
|
alone= B_LATTALONE;
|
||||||
local= B_LATTLOCAL;
|
local= B_LATTLOCAL;
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
|
||||||
xco= std_libbuttons(block, 143, 180, 0, NULL, browse, id, idfrom, &(G.buts->menunr), alone, local, 0, 0, B_KEEPDATA);
|
xco= std_libbuttons(block, 143, 180, 0, NULL, browse, id, idfrom, &(G.buts->menunr), alone, local, 0, 0, B_KEEPDATA);
|
||||||
|
|
||||||
}
|
}
|
||||||
if(ob) {
|
if(ob) {
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
but = uiDefBut(block, TEX, B_IDNAME, "OB:", xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 19.0, 0, 0, "Displays Active Object name. Click to change.");
|
but = uiDefBut(block, TEX, B_IDNAME, "OB:", xco, 180, 454-xco, YIC, ob->id.name+2, 0.0, 19.0, 0, 0, "Displays Active Object name. Click to change.");
|
||||||
uiButSetFunc(but, test_idbutton_cb, ob->id.name, NULL);
|
uiButSetFunc(but, test_idbutton_cb, ob->id.name, NULL);
|
||||||
}
|
}
|
||||||
@@ -1839,12 +1781,10 @@ static void editing_panel_materials(Object *ob)
|
|||||||
uiDefButC(block, NUM, B_REDR, str, 318,123,103,30, &ob->actcol, min, (float)(ob->totcol), 0, 0, "Displays total number of material indices and the current index");
|
uiDefButC(block, NUM, B_REDR, str, 318,123,103,30, &ob->actcol, min, (float)(ob->totcol), 0, 0, "Displays total number of material indices and the current index");
|
||||||
uiDefBut(block, BUT,B_MATWICH, "?", 423,123,31,30, 0, 0, 0, 0, 0, "In EditMode, sets the active material index from selected faces");
|
uiDefBut(block, BUT,B_MATWICH, "?", 423,123,31,30, 0, 0, 0, 0, 0, "In EditMode, sets the active material index from selected faces");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_MATNEW, "New", 292,101,80,21, 0, 0, 0, 0, 0, "Adds a new Material index");
|
uiDefBut(block, BUT,B_MATNEW, "New", 292,101,80,21, 0, 0, 0, 0, 0, "Adds a new Material index");
|
||||||
uiDefBut(block, BUT,B_MATDEL, "Delete", 374,101,80,21, 0, 0, 0, 0, 0, "Deletes this Material index");
|
uiDefBut(block, BUT,B_MATDEL, "Delete", 374,101,80,21, 0, 0, 0, 0, 0, "Deletes this Material index");
|
||||||
uiDefBut(block, BUT,B_MATASS, "Assign", 291,47,162,26, 0, 0, 0, 0, 0, "In EditMode, assigns the active index to selected faces");
|
uiDefBut(block, BUT,B_MATASS, "Assign", 291,47,162,26, 0, 0, 0, 0, 0, "In EditMode, assigns the active index to selected faces");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, BUT,B_MATSEL, "Select", 292,76,79,22, 0, 0, 0, 0, 0, "In EditMode, selects faces that have the active index");
|
uiDefBut(block, BUT,B_MATSEL, "Select", 292,76,79,22, 0, 0, 0, 0, 0, "In EditMode, selects faces that have the active index");
|
||||||
uiDefBut(block, BUT,B_MATDESEL, "Deselect", 373,76,79,21, 0, 0, 0, 0, 0, "Deselects everything with current indexnumber");
|
uiDefBut(block, BUT,B_MATDESEL, "Deselect", 373,76,79,21, 0, 0, 0, 0, 0, "Deselects everything with current indexnumber");
|
||||||
|
|
||||||
@@ -1954,11 +1894,9 @@ static void editing_panel_mesh_paint(void)
|
|||||||
extern VPaint Gvp; /* from vpaint */
|
extern VPaint Gvp; /* from vpaint */
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_paint", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_paint", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Paint", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Paint", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButF(block, NUMSLI, 0, "R ", 979,160,194,19, &Gvp.r, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of red used for painting");
|
uiDefButF(block, NUMSLI, 0, "R ", 979,160,194,19, &Gvp.r, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of red used for painting");
|
||||||
uiDefButF(block, NUMSLI, 0, "G ", 979,140,194,19, &Gvp.g, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of green used for painting");
|
uiDefButF(block, NUMSLI, 0, "G ", 979,140,194,19, &Gvp.g, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of green used for painting");
|
||||||
uiDefButF(block, NUMSLI, 0, "B ", 979,120,194,19, &Gvp.b, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of blue used for painting");
|
uiDefButF(block, NUMSLI, 0, "B ", 979,120,194,19, &Gvp.b, 0.0, 1.0, B_VPCOLSLI, 0, "The amount of blue used for painting");
|
||||||
@@ -1973,18 +1911,14 @@ static void editing_panel_mesh_paint(void)
|
|||||||
uiDefButS(block, ROW, B_DIFF, "Mul", 1212, 100,63,19, &Gvp.mode, 1.0, 3.0, 0, 0, "Multiply the vertex colour");
|
uiDefButS(block, ROW, B_DIFF, "Mul", 1212, 100,63,19, &Gvp.mode, 1.0, 3.0, 0, 0, "Multiply the vertex colour");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Filter", 1212, 80,63,19, &Gvp.mode, 1.0, 4.0, 0, 0, "Mix the colours with an alpha factor");
|
uiDefButS(block, ROW, B_DIFF, "Filter", 1212, 80,63,19, &Gvp.mode, 1.0, 4.0, 0, 0, "Mix the colours with an alpha factor");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, 0, "Area", 980,50,80,19, &Gvp.flag, 0, 0, 0, 0, "Set the area the brush covers");
|
uiDefButS(block, TOG|BIT|1, 0, "Area", 980,50,80,19, &Gvp.flag, 0, 0, 0, 0, "Set the area the brush covers");
|
||||||
uiDefButS(block, TOG|BIT|2, 0, "Soft", 1061,50,112,19, &Gvp.flag, 0, 0, 0, 0, "Use a soft brush");
|
uiDefButS(block, TOG|BIT|2, 0, "Soft", 1061,50,112,19, &Gvp.flag, 0, 0, 0, 0, "Use a soft brush");
|
||||||
uiDefButS(block, TOG|BIT|3, 0, "Normals", 1174,50,102,19, &Gvp.flag, 0, 0, 0, 0, "Use vertex normal for painting");
|
uiDefButS(block, TOG|BIT|3, 0, "Normals", 1174,50,102,19, &Gvp.flag, 0, 0, 0, 0, "Use vertex normal for painting");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_VPGAMMA, "Set", 980,30,80,19, 0, 0, 0, 0, 0, "Apply Mul and Gamma to vertex colours");
|
uiDefBut(block, BUT, B_VPGAMMA, "Set", 980,30,80,19, 0, 0, 0, 0, 0, "Apply Mul and Gamma to vertex colours");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_DIFF, "Mul:", 1061,30,112,19, &Gvp.mul, 0.1, 50.0, 10, 0, "Set the number to multiply vertex colours with");
|
uiDefButF(block, NUM, B_DIFF, "Mul:", 1061,30,112,19, &Gvp.mul, 0.1, 50.0, 10, 0, "Set the number to multiply vertex colours with");
|
||||||
uiDefButF(block, NUM, B_DIFF, "Gamma:", 1174,30,102,19, &Gvp.gamma, 0.1, 5.0, 10, 0, "Change the clarity of the vertex colours");
|
uiDefButF(block, NUM, B_DIFF, "Gamma:", 1174,30,102,19, &Gvp.gamma, 0.1, 5.0, 10, 0, "Change the clarity of the vertex colours");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SET_VCOL, "Set VertCol", 980,5,103,28, 0, 0, 0, 0, 0, "Set Vertex colour of selection to current (Shift+K)");
|
uiDefBut(block, BUT, B_SET_VCOL, "Set VertCol", 980,5,103,28, 0, 0, 0, 0, 0, "Set Vertex colour of selection to current (Shift+K)");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -1995,13 +1929,12 @@ static void editing_panel_mesh_texface(void)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
extern TFace *lasttface;
|
extern TFace *lasttface;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_texface", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "editing_panel_mesh_texface", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Texture face", "Editing", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Texture face", "Editing", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
set_lasttface(); // checks for ob type
|
set_lasttface(); // checks for ob type
|
||||||
if(lasttface) {
|
if(lasttface) {
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|2, B_REDR_3D_IMA, "Tex", 600,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face with texture");
|
uiDefButS(block, TOG|BIT|2, B_REDR_3D_IMA, "Tex", 600,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Render face with texture");
|
||||||
uiDefButS(block, TOG|BIT|7, B_REDR_3D_IMA, "Tiles", 660,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use tilemode for face");
|
uiDefButS(block, TOG|BIT|7, B_REDR_3D_IMA, "Tiles", 660,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use tilemode for face");
|
||||||
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "Light", 720,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use light for face");
|
uiDefButS(block, TOG|BIT|4, REDRAWVIEW3D, "Light", 720,160,60,19, &lasttface->mode, 0, 0, 0, 0, "Use light for face");
|
||||||
@@ -2017,13 +1950,13 @@ static void editing_panel_mesh_texface(void)
|
|||||||
uiDefButS(block, TOG|BIT|13, REDRAWVIEW3D, "Shadow", 720,120,60,19, &lasttface->mode, 0, 0, 0, 0, "Face is used for shadow");
|
uiDefButS(block, TOG|BIT|13, REDRAWVIEW3D, "Shadow", 720,120,60,19, &lasttface->mode, 0, 0, 0, 0, "Face is used for shadow");
|
||||||
uiDefButS(block, TOG|BIT|14, REDRAWVIEW3D, "Text", 780,120,60,19, &lasttface->mode, 0, 0, 0, 0, "Enable bitmap text on face");
|
uiDefButS(block, TOG|BIT|14, REDRAWVIEW3D, "Text", 780,120,60,19, &lasttface->mode, 0, 0, 0, 0, "Enable bitmap text on face");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
uiDefButC(block, ROW, REDRAWVIEW3D, "Opaque", 600,100,60,19, &lasttface->transp, 2.0, 0.0, 0, 0, "Render colour of textured face as colour");
|
uiDefButC(block, ROW, REDRAWVIEW3D, "Opaque", 600,100,60,19, &lasttface->transp, 2.0, 0.0, 0, 0, "Render colour of textured face as colour");
|
||||||
uiDefButC(block, ROW, REDRAWVIEW3D, "Add", 660,100,60,19, &lasttface->transp, 2.0, 1.0, 0, 0, "Render face transparent and add colour of face");
|
uiDefButC(block, ROW, REDRAWVIEW3D, "Add", 660,100,60,19, &lasttface->transp, 2.0, 1.0, 0, 0, "Render face transparent and add colour of face");
|
||||||
uiDefButC(block, ROW, REDRAWVIEW3D, "Alpha", 720,100,60,19, &lasttface->transp, 2.0, 2.0, 0, 0, "Render polygon transparent, depending on alpha channel of the texture");
|
uiDefButC(block, ROW, REDRAWVIEW3D, "Alpha", 720,100,60,19, &lasttface->transp, 2.0, 2.0, 0, 0, "Render polygon transparent, depending on alpha channel of the texture");
|
||||||
/* uiDefButC(block, ROW, REDRAWVIEW3D, "Sub", 780,100,60,19, &lasttface->transp, 2.0, 3.0, 0, 0); ,""*/
|
/* uiDefButC(block, ROW, REDRAWVIEW3D, "Sub", 780,100,60,19, &lasttface->transp, 2.0, 3.0, 0, 0); ,""*/
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_COPY_TF_MODE, "Copy DrawMode", 600,7,117,28, 0, 0, 0, 0, 0, "Copy the drawmode");
|
uiDefBut(block, BUT, B_COPY_TF_MODE, "Copy DrawMode", 600,7,117,28, 0, 0, 0, 0, 0, "Copy the drawmode");
|
||||||
uiDefBut(block, BUT, B_COPY_TF_UV, "Copy UV+tex", 721,7,85,28, 0, 0, 0, 0, 0, "Copy UV information and textures");
|
uiDefBut(block, BUT, B_COPY_TF_UV, "Copy UV+tex", 721,7,85,28, 0, 0, 0, 0, 0, "Copy UV information and textures");
|
||||||
uiDefBut(block, BUT, B_COPY_TF_COL, "Copy VertCol", 809,7,103,28, 0, 0, 0, 0, 0, "Copy vertex colours");
|
uiDefBut(block, BUT, B_COPY_TF_COL, "Copy VertCol", 809,7,103,28, 0, 0, 0, 0, 0, "Copy vertex colours");
|
||||||
|
|||||||
@@ -872,27 +872,27 @@ static ID **get_selected_and_linked_obs(short *count, short scavisflag)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static BIFColorID get_col_sensor(int type)
|
static int get_col_sensor(int type)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case SENS_ALWAYS: return BUTACTION;
|
case SENS_ALWAYS: return TH_BUT_ACTION;
|
||||||
case SENS_TOUCH: return BUTCAMERA;
|
case SENS_TOUCH: return TH_BUT_NEUTRAL;
|
||||||
case SENS_COLLISION: return BUTCAMERA;
|
case SENS_COLLISION: return TH_BUT_SETTING;
|
||||||
case SENS_NEAR: return BUTRANDOM;
|
case SENS_NEAR: return TH_BUT_SETTING1;
|
||||||
case SENS_KEYBOARD: return BUTIPO;
|
case SENS_KEYBOARD: return TH_BUT_SETTING2;
|
||||||
case SENS_PROPERTY: return BUTPROPERTY;
|
case SENS_PROPERTY: return TH_BUT_NUM;
|
||||||
case SENS_MOUSE: return BUTAUDIO;
|
case SENS_MOUSE: return TH_BUT_TEXTFIELD;
|
||||||
case SENS_RADAR: return BUTEDITOBJECT;
|
case SENS_RADAR: return TH_BUT_POPUP;
|
||||||
case SENS_RANDOM: return BUTSCENE;
|
case SENS_RANDOM: return TH_BUT_NEUTRAL;
|
||||||
case SENS_RAY: return BUTMOTION;
|
case SENS_RAY: return TH_BUT_SETTING1;
|
||||||
case SENS_MESSAGE: return BUTMESSAGE;
|
case SENS_MESSAGE: return TH_BUT_SETTING2;
|
||||||
default: return BUTGREY;
|
default: return TH_BUT_NEUTRAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void set_col_sensor(int type, int medium)
|
static void set_col_sensor(int type, int medium)
|
||||||
{
|
{
|
||||||
BIFColorID col= get_col_sensor(type);
|
int col= get_col_sensor(type);
|
||||||
BIF_set_color(col, medium?COLORSHADE_LIGHT:COLORSHADE_MEDIUM);
|
BIF_ThemeColorShade(col, medium?30:0);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -943,7 +943,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
|
|||||||
|
|
||||||
/* yco is at the top of the rect, draw downwards */
|
/* yco is at the top of the rect, draw downwards */
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
|
|
||||||
set_col_sensor(sens->type, 0);
|
set_col_sensor(sens->type, 0);
|
||||||
|
|
||||||
@@ -1091,7 +1091,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
|
|||||||
uiDefBut(block, LABEL, 0, "Hold", xco, yco-68, 40, 19, NULL, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Hold", xco, yco-68, 40, 19, NULL, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
/* part of line 1 */
|
/* part of line 1 */
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
uiDefButS(block, TOG|BIT|0, 0, "All keys", xco+40+(width/2), yco-44, (width/2)-50, 19,
|
uiDefButS(block, TOG|BIT|0, 0, "All keys", xco+40+(width/2), yco-44, (width/2)-50, 19,
|
||||||
&ks->type, 0, 0, 0, 0, "");
|
&ks->type, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
@@ -1260,7 +1260,7 @@ static short draw_sensorbuttons(bSensor *sens, uiBlock *block, short xco, short
|
|||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSM);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
return yco-4;
|
return yco-4;
|
||||||
}
|
}
|
||||||
@@ -1273,13 +1273,13 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
|
|||||||
bPythonCont *pc;
|
bPythonCont *pc;
|
||||||
short ysize;
|
short ysize;
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
|
|
||||||
switch (cont->type) {
|
switch (cont->type) {
|
||||||
case CONT_EXPRESSION:
|
case CONT_EXPRESSION:
|
||||||
ysize= 28;
|
ysize= 28;
|
||||||
|
|
||||||
BIF_set_color(BUTPROPERTY, COLORSHADE_GREY);
|
BIF_ThemeColor(TH_BUT_SETTING);
|
||||||
glRects(xco, yco-ysize, xco+width, yco);
|
glRects(xco, yco-ysize, xco+width, yco);
|
||||||
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
||||||
|
|
||||||
@@ -1298,7 +1298,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
|
|||||||
if(cont->data==NULL) init_controller(cont);
|
if(cont->data==NULL) init_controller(cont);
|
||||||
pc= cont->data;
|
pc= cont->data;
|
||||||
|
|
||||||
BIF_set_color(BUTMESSAGE, COLORSHADE_GREY);
|
BIF_ThemeColor(TH_BUT_SETTING1);
|
||||||
glRects(xco, yco-ysize, xco+width, yco);
|
glRects(xco, yco-ysize, xco+width, yco);
|
||||||
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
||||||
|
|
||||||
@@ -1310,7 +1310,7 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
|
|||||||
default:
|
default:
|
||||||
ysize= 4;
|
ysize= 4;
|
||||||
|
|
||||||
BIF_set_color(BUTIPO, COLORSHADE_GREY);
|
BIF_ThemeColor(TH_BUT_NEUTRAL);
|
||||||
glRects(xco, yco-ysize, xco+width, yco);
|
glRects(xco, yco-ysize, xco+width, yco);
|
||||||
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
||||||
|
|
||||||
@@ -1318,39 +1318,37 @@ static short draw_controllerbuttons(bController *cont, uiBlock *block, short xco
|
|||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSM);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
return yco;
|
return yco;
|
||||||
}
|
}
|
||||||
|
|
||||||
static BIFColorID get_col_actuator(int type)
|
static int get_col_actuator(int type)
|
||||||
{
|
{
|
||||||
switch(type) {
|
switch(type) {
|
||||||
case ACT_ACTION: return BUTACTION;
|
case ACT_ACTION: return TH_BUT_ACTION;
|
||||||
case ACT_OBJECT: return BUTMOTION;
|
case ACT_OBJECT: return TH_BUT_NEUTRAL;
|
||||||
case ACT_IPO: return BUTIPO;
|
case ACT_IPO: return TH_BUT_SETTING;
|
||||||
case ACT_PROPERTY: return BUTPROPERTY;
|
case ACT_PROPERTY: return TH_BUT_SETTING1;
|
||||||
case ACT_SOUND: return BUTAUDIO;
|
case ACT_SOUND: return TH_BUT_SETTING2;
|
||||||
case ACT_CD: return BUTCD;
|
case ACT_CD: return TH_BUT_NUM;
|
||||||
case ACT_CAMERA: return BUTCAMERA;
|
case ACT_CAMERA: return TH_BUT_TEXTFIELD;
|
||||||
case ACT_EDIT_OBJECT: return BUTEDITOBJECT;
|
case ACT_EDIT_OBJECT: return TH_BUT_POPUP;
|
||||||
case ACT_GROUP: return BUTYELLOW;
|
case ACT_GROUP: return TH_BUT_ACTION;
|
||||||
case ACT_RANDOM: return BUTRANDOM;
|
case ACT_RANDOM: return TH_BUT_NEUTRAL;
|
||||||
case ACT_SCENE: return BUTSCENE;
|
case ACT_SCENE: return TH_BUT_SETTING;
|
||||||
case ACT_MESSAGE: return BUTMESSAGE;
|
case ACT_MESSAGE: return TH_BUT_SETTING1;
|
||||||
case ACT_GAME: return BUTGAME;
|
case ACT_GAME: return TH_BUT_SETTING2;
|
||||||
case ACT_VISIBILITY: return BUTVISIBILITY;
|
case ACT_VISIBILITY: return TH_BUT_NUM;
|
||||||
default: return BUTGREY;
|
case ACT_CONSTRAINT: return TH_BUT_ACTION;
|
||||||
|
default: return TH_BUT_NEUTRAL;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
static void set_col_actuator(int item, int medium)
|
static void set_col_actuator(int item, int medium)
|
||||||
{
|
{
|
||||||
if (item==ACT_CONSTRAINT) {
|
int col= get_col_actuator(item);
|
||||||
BIF_set_color(BUTRUST, medium?COLORSHADE_HILITE:COLORSHADE_MEDIUM);
|
BIF_ThemeColorShade(col, medium?30:10);
|
||||||
} else {
|
|
||||||
BIFColorID col= get_col_actuator(item);
|
|
||||||
BIF_set_color(col, medium?COLORSHADE_MEDIUM:COLORSHADE_GREY);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, short yco, short width)
|
static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, short yco, short width)
|
||||||
@@ -1377,7 +1375,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
int myline;
|
int myline;
|
||||||
|
|
||||||
/* yco is at the top of the rect, draw downwards */
|
/* yco is at the top of the rect, draw downwards */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
set_col_actuator(act->type, 0);
|
set_col_actuator(act->type, 0);
|
||||||
|
|
||||||
switch (act->type)
|
switch (act->type)
|
||||||
@@ -1388,7 +1386,6 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
|
|
||||||
glRects(xco, yco-ysize, xco+width, yco);
|
glRects(xco, yco-ysize, xco+width, yco);
|
||||||
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
oa = act->data;
|
oa = act->data;
|
||||||
wval = (width-100)/3;
|
wval = (width-100)/3;
|
||||||
@@ -1423,7 +1420,6 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
uiDefButF(block, NUM, 0, "", xco+45+wval, yco-125, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, "");
|
uiDefButF(block, NUM, 0, "", xco+45+wval, yco-125, wval, 19, oa->angularvelocity+1, -10000.0, 10000.0, 10, 0, "");
|
||||||
uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-125, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, "");
|
uiDefButF(block, NUM, 0, "", xco+45+2*wval, yco-125, wval, 19, oa->angularvelocity+2, -10000.0, 10000.0, 10, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|0, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
uiDefButI(block, TOG|BIT|0, 0, "L", xco+45+3*wval, yco-22, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
||||||
uiDefButI(block, TOG|BIT|1, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
uiDefButI(block, TOG|BIT|1, 0, "L", xco+45+3*wval, yco-41, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
||||||
uiDefButI(block, TOG|BIT|2, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
uiDefButI(block, TOG|BIT|2, 0, "L", xco+45+3*wval, yco-64, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
||||||
@@ -1431,9 +1427,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
uiDefButI(block, TOG|BIT|4, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
uiDefButI(block, TOG|BIT|4, 0, "L", xco+45+3*wval, yco-106, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
||||||
uiDefButI(block, TOG|BIT|5, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
uiDefButI(block, TOG|BIT|5, 0, "L", xco+45+3*wval, yco-125, 15, 19, &oa->flag, 0.0, 0.0, 0, 0, "Local transformation");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|6, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
|
uiDefButI(block, TOG|BIT|6, 0, "add",xco+45+3*wval+15, yco-106, 35, 19, &oa->flag, 0.0, 0.0, 0, 0, "Toggles between ADD and SET linV");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
yco-= ysize;
|
yco-= ysize;
|
||||||
break;
|
break;
|
||||||
@@ -1453,7 +1447,6 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
aa = act->data;
|
aa = act->data;
|
||||||
wval = (width-60)/3;
|
wval = (width-60)/3;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
// str= "Action types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
|
// str= "Action types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
|
||||||
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
|
#ifdef __NLA_ACTION_BY_MOTION_ACTUATOR
|
||||||
str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6|Displacement %x7";
|
str= "Action types %t|Play %x0|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6|Displacement %x7";
|
||||||
@@ -1503,18 +1496,15 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
|
str = "Ipo types %t|Play %x0|Ping Pong %x1|Flipper %x2|Loop Stop %x3|Loop End %x4|Property %x6";
|
||||||
|
|
||||||
uiDefButS(block, MENU, B_REDR, str, xco+20, yco-24, width-40 - (width-40)/3, 19, &ia->type, 0, 0, 0, 0, "");
|
uiDefButS(block, MENU, B_REDR, str, xco+20, yco-24, width-40 - (width-40)/3, 19, &ia->type, 0, 0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|ACT_IPOCHILD_BIT, B_REDR,
|
uiDefButS(block, TOG|BIT|ACT_IPOCHILD_BIT, B_REDR,
|
||||||
"Child", xco+20+0.666*(width-40), yco-24, (width-40)/3, 19,
|
"Child", xco+20+0.666*(width-40), yco-24, (width-40)/3, 19,
|
||||||
&ia->flag, 0, 0, 0, 0,
|
&ia->flag, 0, 0, 0, 0,
|
||||||
"Add all children Objects as well");
|
"Add all children Objects as well");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
/*
|
/*
|
||||||
Key2key was disabled.... the settings below should not be reused without
|
Key2key was disabled.... the settings below should not be reused without
|
||||||
thought, because they interfere with other variables.
|
thought, because they interfere with other variables.
|
||||||
|
|
||||||
if(ia->type==ACT_IPO_KEY2KEY) {
|
if(ia->type==ACT_IPO_KEY2KEY) {
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0, 0, "Prev", xco+20, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play backwards");
|
uiDefButS(block, TOG|BIT|0, 0, "Prev", xco+20, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play backwards");
|
||||||
uiDefButS(block, TOG|BIT|1, 0, "Cycl", xco+20+(width-40)/3, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play cyclic");
|
uiDefButS(block, TOG|BIT|1, 0, "Cycl", xco+20+(width-40)/3, yco-44, (width-40)/3, 19, &ia->flag, 0, 0, 0, 0, "Play cyclic");
|
||||||
@@ -1539,7 +1529,6 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
&ia->end, 0.0, 18000.0, 0, 0,
|
&ia->end, 0.0, 18000.0, 0, 0,
|
||||||
"End frame");
|
"End frame");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|ACT_IPOFORCE_BIT, B_REDR,
|
uiDefButS(block, TOG|BIT|ACT_IPOFORCE_BIT, B_REDR,
|
||||||
"Force", xco+width-78, yco-44, 43, 19,
|
"Force", xco+width-78, yco-44, 43, 19,
|
||||||
&ia->flag, 0, 0, 0, 0,
|
&ia->flag, 0, 0, 0, 0,
|
||||||
@@ -1735,9 +1724,7 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
|
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Track to this Object");
|
uiDefIDPoinBut(block, test_obpoin_but, 1, "OB:", xco+10, yco-44, (width-20)/2, 19, &(eoa->ob), "Track to this Object");
|
||||||
uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes");
|
uiDefButI(block, NUM, 0, "Time:", xco+10+(width-20)/2, yco-44, (width-20)/2-40, 19, &eoa->time, 0.0, 2000.0, 0, 0, "Duration the tracking takes");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking");
|
uiDefButS(block, TOG, 0, "3D", xco+width-50, yco-44, 40, 19, &eoa->flag, 0.0, 0.0, 0, 0, "Enable 3D tracking");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3";
|
str= "Edit Object %t|Add Object %x0|End Object %x1|Replace Mesh %x2|Track to %x3";
|
||||||
@@ -2113,7 +2100,6 @@ static short draw_actuatorbuttons(bActuator *act, uiBlock *block, short xco, sho
|
|||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSM);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
return yco-4;
|
return yco-4;
|
||||||
}
|
}
|
||||||
@@ -2154,7 +2140,6 @@ static uiBlock *sensor_menu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
||||||
uiBlockSetButmFunc(block, do_sensor_menu, NULL);
|
uiBlockSetButmFunc(block, do_sensor_menu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -2203,7 +2188,6 @@ static uiBlock *controller_menu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
||||||
uiBlockSetButmFunc(block, do_controller_menu, NULL);
|
uiBlockSetButmFunc(block, do_controller_menu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefBut(block, BUTM, 1, "Hide Objects", 0,(short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefBut(block, BUTM, 1, "Hide Objects", 0,(short)(yco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -2252,7 +2236,6 @@ static uiBlock *actuator_menu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "filemenu", UI_EMBOSSP, UI_HELV, curarea->win);
|
||||||
uiBlockSetButmFunc(block, do_actuator_menu, NULL);
|
uiBlockSetButmFunc(block, do_actuator_menu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefBut(block, BUTM, 1, "Show Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefBut(block, BUTM, 1, "Hide Objects", 0, (short)(xco-=20), 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -2292,12 +2275,10 @@ void logic_buts(void)
|
|||||||
uiSetButLock(ob->id.lib!=0, "Can't edit library data");
|
uiSetButLock(ob->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
sprintf(name, "buttonswin %d", curarea->win);
|
sprintf(name, "buttonswin %d", curarea->win);
|
||||||
block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
// uiDefButI(block, TOG|BIT|0, B_REDR, "X",
|
|
||||||
// 15,205,10,19, &ob->gameflag2, 0, 0, 0, 0,
|
|
||||||
// "Toggle to always ignore activity culling.");
|
|
||||||
uiDefButI(block, TOG|BIT|2, B_REDR, "Actor",
|
uiDefButI(block, TOG|BIT|2, B_REDR, "Actor",
|
||||||
25,205,60,19, &ob->gameflag, 0, 0, 0, 0,
|
25,205,60,19, &ob->gameflag, 0, 0, 0, 0,
|
||||||
"Objects that are evaluated by the engine ");
|
"Objects that are evaluated by the engine ");
|
||||||
@@ -2313,8 +2294,6 @@ void logic_buts(void)
|
|||||||
uiDefButI(block, TOG|BIT|6, B_DIFF, "Do Fh", 10,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use Fh settings in Materials");
|
uiDefButI(block, TOG|BIT|6, B_DIFF, "Do Fh", 10,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use Fh settings in Materials");
|
||||||
uiDefButI(block, TOG|BIT|7, B_DIFF, "Rot Fh", 60,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use face normal to rotate Object");
|
uiDefButI(block, TOG|BIT|7, B_DIFF, "Rot Fh", 60,185,50,19, &ob->gameflag, 0, 0, 0, 0, "Use face normal to rotate Object");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButF(block, NUM, B_DIFF, "Mass:", 110, 185, 80, 19, &ob->mass, 0.01, 100.0, 10, 0, "The mass of the Object");
|
uiDefButF(block, NUM, B_DIFF, "Mass:", 110, 185, 80, 19, &ob->mass, 0.01, 100.0, 10, 0, "The mass of the Object");
|
||||||
uiDefButF(block, NUM, REDRAWVIEW3D, "Size:", 190, 185, 80, 19, &ob->inertia, 0.01, 10.0, 10, 0, "Bounding sphere size");
|
uiDefButF(block, NUM, REDRAWVIEW3D, "Size:", 190, 185, 80, 19, &ob->inertia, 0.01, 10.0, 10, 0, "Bounding sphere size");
|
||||||
uiDefButF(block, NUM, B_DIFF, "Form:", 270, 185, 80, 19, &ob->formfactor, 0.01, 100.0, 10, 0, "Form factor");
|
uiDefButF(block, NUM, B_DIFF, "Form:", 270, 185, 80, 19, &ob->formfactor, 0.01, 100.0, 10, 0, "Form factor");
|
||||||
@@ -2339,7 +2318,7 @@ void logic_buts(void)
|
|||||||
"Relative friction coefficient in the z-direction.");
|
"Relative friction coefficient in the z-direction.");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_ADD_PROP, "ADD property", 10, 110, 340, 24,
|
uiDefBut(block, BUT, B_ADD_PROP, "ADD property", 10, 110, 340, 24,
|
||||||
NULL, 0.0, 100.0, 100, 0,
|
NULL, 0.0, 100.0, 100, 0,
|
||||||
"");
|
"");
|
||||||
@@ -2350,10 +2329,8 @@ void logic_buts(void)
|
|||||||
prop= ob->prop.first;
|
prop= ob->prop.first;
|
||||||
while(prop) {
|
while(prop) {
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
but= uiDefBut(block, BUT, 1, "Del", 10, (short)(90-20*a), 40, 19, NULL, 0.0, 0.0, 1, (float)a, "");
|
but= uiDefBut(block, BUT, 1, "Del", 10, (short)(90-20*a), 40, 19, NULL, 0.0, 0.0, 1, (float)a, "");
|
||||||
uiButSetFunc(but, del_property, prop, NULL);
|
uiButSetFunc(but, del_property, prop, NULL);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(90-20*a), 60, 19, &prop->type, 0, 0, 0, 0, "");
|
uiDefButS(block, MENU, B_CHANGE_PROP, pupstr, 50, (short)(90-20*a), 60, 19, &prop->type, 0, 0, 0, 0, "");
|
||||||
but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(90-20*a), 105, 19, prop->name, 0, 31, 0, 0, "");
|
but= uiDefBut(block, TEX, 1, "Name:", 110, (short)(90-20*a), 105, 19, prop->name, 0, 31, 0, 0, "");
|
||||||
uiButSetFunc(but, make_unique_prop_names_cb, prop->name, (void*) 1);
|
uiButSetFunc(but, make_unique_prop_names_cb, prop->name, (void*) 1);
|
||||||
@@ -2365,10 +2342,8 @@ void logic_buts(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if(prop->type==PROP_BOOL) {
|
if(prop->type==PROP_BOOL) {
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|0, B_REDR, "True", 215, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
|
uiDefButI(block, TOG|BIT|0, B_REDR, "True", 215, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
|
||||||
uiDefButI(block, TOGN|BIT|0, B_REDR, "False", 270, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
|
uiDefButI(block, TOGN|BIT|0, B_REDR, "False", 270, (short)(90-20*a), 55, 19, &prop->data, 0, 0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
else if(prop->type==PROP_INT)
|
else if(prop->type==PROP_INT)
|
||||||
uiDefButI(block, NUM, butreturn, "", 215, (short)(90-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, "");
|
uiDefButI(block, NUM, butreturn, "", 215, (short)(90-20*a), 110, 19, &prop->data, -10000, 10000, 0, 0, "");
|
||||||
@@ -2392,11 +2367,9 @@ void logic_buts(void)
|
|||||||
/* ******************************* */
|
/* ******************************* */
|
||||||
xco= 375; yco= 170; width= 230;
|
xco= 375; yco= 170; width= 230;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 80, 19, "");
|
uiDefBlockBut(block, sensor_menu, NULL, "Sensors", xco-10, yco+35, 80, 19, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
uiDefButS(block, TOG|BIT|0, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
||||||
uiDefButS(block, TOG|BIT|1, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
uiDefButS(block, TOG|BIT|1, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
||||||
uiDefButS(block, TOG|BIT|2, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
|
uiDefButS(block, TOG|BIT|2, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
|
||||||
@@ -2409,13 +2382,10 @@ void logic_buts(void)
|
|||||||
if( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
|
if( (ob->scavisflag & OB_VIS_SENS) == 0) continue;
|
||||||
|
|
||||||
/* presume it is only objects for now */
|
/* presume it is only objects for now */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
if(ob->sensors.first) uiSetCurFont(block, UI_HELVB);
|
if(ob->sensors.first) uiSetCurFont(block, UI_HELVB);
|
||||||
uiBlockSetCol(block, MIDGREY);
|
|
||||||
uiDefButS(block, TOG|BIT|6, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
|
uiDefButS(block, TOG|BIT|6, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide sensors");
|
||||||
if(ob->sensors.first) uiSetCurFont(block, UI_HELV);
|
if(ob->sensors.first) uiSetCurFont(block, UI_HELV);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefButS(block, TOG|BIT|8, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
|
uiDefButS(block, TOG|BIT|8, B_ADD_SENS, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Sensor");
|
||||||
yco-=20;
|
yco-=20;
|
||||||
|
|
||||||
@@ -2423,23 +2393,18 @@ void logic_buts(void)
|
|||||||
|
|
||||||
sens= ob->sensors.first;
|
sens= ob->sensors.first;
|
||||||
while(sens) {
|
while(sens) {
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefIconButS(block, TOG|BIT|1, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor");
|
uiDefIconButS(block, TOG|BIT|1, B_DEL_SENS, ICON_X, xco, yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Delete Sensor");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings");
|
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &sens->flag, 0, 0, 0, 0, "Sensor settings");
|
||||||
|
|
||||||
ycoo= yco;
|
ycoo= yco;
|
||||||
if(sens->flag & SENS_SHOW)
|
if(sens->flag & SENS_SHOW)
|
||||||
{
|
{
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
|
|
||||||
uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 100, 19, &sens->type, 0, 0, 0, 0, "Sensor type");
|
uiDefButS(block, MENU, B_CHANGE_SENS, sensor_pup(), (short)(xco+22), yco, 100, 19, &sens->type, 0, 0, 0, 0, "Sensor type");
|
||||||
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, sens->name, 0, 31, 0, 0, "Sensor name");
|
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, sens->name, 0, 31, 0, 0, "Sensor name");
|
||||||
uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
|
uiButSetFunc(but, make_unique_prop_names_cb, sens->name, (void*) 0);
|
||||||
|
|
||||||
sens->otype= sens->type;
|
sens->otype= sens->type;
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name);
|
yco= draw_sensorbuttons(sens, block, xco, yco, width,ob->id.name);
|
||||||
if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
|
if(yco-6 < ycoo) ycoo= (yco+ycoo-20)/2;
|
||||||
}
|
}
|
||||||
@@ -2466,11 +2431,9 @@ void logic_buts(void)
|
|||||||
/* ******************************* */
|
/* ******************************* */
|
||||||
xco= 675; yco= 170; width= 230;
|
xco= 675; yco= 170; width= 230;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, 19, "");
|
uiDefBlockBut(block, controller_menu, NULL, "Controllers", xco-10, yco+35, 100, 19, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
uiDefButS(block, TOG|BIT|3, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
uiDefButS(block, TOG|BIT|3, B_REDR, "Sel", xco+110, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
||||||
uiDefButS(block, TOG|BIT|4, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
uiDefButS(block, TOG|BIT|4, B_REDR, "Act", xco+110+(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
||||||
uiDefButS(block, TOG|BIT|5, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
|
uiDefButS(block, TOG|BIT|5, B_REDR, "Link", xco+110+2*(width-100)/3, yco+35, (width-100)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Sensor/Actuator");
|
||||||
@@ -2484,10 +2447,8 @@ void logic_buts(void)
|
|||||||
if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
|
if( (ob->scavisflag & OB_VIS_CONT) == 0) continue;
|
||||||
|
|
||||||
/* presume it is only objects for now */
|
/* presume it is only objects for now */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefButS(block, TOG|BIT|9, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
|
uiDefButS(block, TOG|BIT|9, B_ADD_CONT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Controller");
|
||||||
uiBlockSetCol(block, MIDGREY);
|
|
||||||
if(ob->controllers.first) uiSetCurFont(block, UI_HELVB);
|
if(ob->controllers.first) uiSetCurFont(block, UI_HELVB);
|
||||||
uiDefButS(block, TOG|BIT|11, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
|
uiDefButS(block, TOG|BIT|11, B_REDR, ob->id.name+2,(short)(xco-10), yco, (short)(width-30), 19, &ob->scaflag, 0, 0, 0, 0, "Active Object name");
|
||||||
if(ob->controllers.first) uiSetCurFont(block, UI_HELV);
|
if(ob->controllers.first) uiSetCurFont(block, UI_HELV);
|
||||||
@@ -2497,19 +2458,15 @@ void logic_buts(void)
|
|||||||
|
|
||||||
cont= ob->controllers.first;
|
cont= ob->controllers.first;
|
||||||
while(cont) {
|
while(cont) {
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefIconButS(block, TOG|BIT|1, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller");
|
uiDefIconButS(block, TOG|BIT|1, B_DEL_CONT, ICON_X, xco, yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Delete Controller");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings");
|
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &cont->flag, 0, 0, 0, 0, "Controller settings");
|
||||||
|
|
||||||
if(cont->flag & CONT_SHOW) {
|
if(cont->flag & CONT_SHOW) {
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
cont->otype= cont->type;
|
cont->otype= cont->type;
|
||||||
uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 100, 19, &cont->type, 0, 0, 0, 0, "Controller type");
|
uiDefButS(block, MENU, B_CHANGE_CONT, controller_pup(),(short)(xco+22), yco, 100, 19, &cont->type, 0, 0, 0, 0, "Controller type");
|
||||||
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, cont->name, 0, 31, 0, 0, "Controller name");
|
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, cont->name, 0, 31, 0, 0, "Controller name");
|
||||||
uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0);
|
uiButSetFunc(but, make_unique_prop_names_cb, cont->name, (void*) 0);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
ycoo= yco;
|
ycoo= yco;
|
||||||
yco= draw_controllerbuttons(cont, block, xco, yco, width);
|
yco= draw_controllerbuttons(cont, block, xco, yco, width);
|
||||||
@@ -2541,11 +2498,9 @@ void logic_buts(void)
|
|||||||
/* ******************************* */
|
/* ******************************* */
|
||||||
xco= 985; yco= 170; width= 280;
|
xco= 985; yco= 170; width= 280;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 100, 19, "");
|
uiDefBlockBut(block, actuator_menu, NULL, "Actuators", xco-10, yco+35, 100, 19, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
uiDefButS(block, TOG|BIT|6, B_REDR, "Sel", xco+110, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
uiDefButS(block, TOG|BIT|6, B_REDR, "Sel", xco+110, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show all selected Objects");
|
||||||
uiDefButS(block, TOG|BIT|7, B_REDR, "Act", xco+110+(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
uiDefButS(block, TOG|BIT|7, B_REDR, "Act", xco+110+(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show active Object");
|
||||||
uiDefButS(block, TOG|BIT|8, B_REDR, "Link", xco+110+2*(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
|
uiDefButS(block, TOG|BIT|8, B_REDR, "Link", xco+110+2*(width-110)/3, yco+35, (width-110)/3, 19, &G.buts->scaflag, 0, 0, 0, 0, "Show linked Objects to Controller");
|
||||||
@@ -2557,13 +2512,10 @@ void logic_buts(void)
|
|||||||
if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
|
if( (ob->scavisflag & OB_VIS_ACT) == 0) continue;
|
||||||
|
|
||||||
/* presume it is only objects for now */
|
/* presume it is only objects for now */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
if(ob->actuators.first) uiSetCurFont(block, UI_HELVB);
|
if(ob->actuators.first) uiSetCurFont(block, UI_HELVB);
|
||||||
uiBlockSetCol(block, MIDGREY);
|
|
||||||
uiDefButS(block, TOG|BIT|7, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
|
uiDefButS(block, TOG|BIT|7, B_REDR, ob->id.name+2,(short)(xco-10), yco,(short)(width-30), 19, &ob->scaflag, 0, 31, 0, 0, "Object name, click to show/hide actuators");
|
||||||
if(ob->actuators.first) uiSetCurFont(block, UI_HELV);
|
if(ob->actuators.first) uiSetCurFont(block, UI_HELV);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefButS(block, TOG|BIT|10, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
|
uiDefButS(block, TOG|BIT|10, B_ADD_ACT, "Add",(short)(xco+width-40), yco, 50, 19, &ob->scaflag, 0, 0, 0, 0, "Add a new Actuator");
|
||||||
yco-=20;
|
yco-=20;
|
||||||
|
|
||||||
@@ -2571,19 +2523,15 @@ void logic_buts(void)
|
|||||||
|
|
||||||
act= ob->actuators.first;
|
act= ob->actuators.first;
|
||||||
while(act) {
|
while(act) {
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefIconButS(block, TOG|BIT|1, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator");
|
uiDefIconButS(block, TOG|BIT|1, B_DEL_ACT, ICON_X, xco, yco, 22, 19, &act->flag, 0, 0, 0, 0, "Delete Actuator");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings");
|
uiDefIconButS(block, ICONTOG|BIT|0, B_REDR, ICON_RIGHTARROW, (short)(xco+width-22), yco, 22, 19, &act->flag, 0, 0, 0, 0, "Actuator settings");
|
||||||
|
|
||||||
if(act->flag & ACT_SHOW) {
|
if(act->flag & ACT_SHOW) {
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
act->otype= act->type;
|
act->otype= act->type;
|
||||||
uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 100, 19, &act->type, 0, 0, 0, 0, "Actuator type");
|
uiDefButS(block, MENU, B_CHANGE_ACT, actuator_pup(ob), (short)(xco+22), yco, 100, 19, &act->type, 0, 0, 0, 0, "Actuator type");
|
||||||
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, act->name, 0, 31, 0, 0, "Actuator name");
|
but= uiDefBut(block, TEX, 1, "", (short)(xco+122), yco, (short)(width-144), 19, act->name, 0, 31, 0, 0, "Actuator name");
|
||||||
uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0);
|
uiButSetFunc(but, make_unique_prop_names_cb, act->name, (void*) 0);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
ycoo= yco;
|
ycoo= yco;
|
||||||
yco= draw_actuatorbuttons(act, block, xco, yco, width);
|
yco= draw_actuatorbuttons(act, block, xco, yco, width);
|
||||||
|
|||||||
@@ -284,23 +284,23 @@ static void get_constraint_typestring (char *str, bConstraint *con)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static BIFColorID get_constraint_col(bConstraint *con)
|
static int get_constraint_col(bConstraint *con)
|
||||||
{
|
{
|
||||||
switch (con->type) {
|
switch (con->type) {
|
||||||
case CONSTRAINT_TYPE_NULL:
|
case CONSTRAINT_TYPE_NULL:
|
||||||
return BUTWHITE;
|
return TH_BUT_NEUTRAL;
|
||||||
case CONSTRAINT_TYPE_KINEMATIC:
|
case CONSTRAINT_TYPE_KINEMATIC:
|
||||||
return BUTPURPLE;
|
return TH_BUT_SETTING2;
|
||||||
case CONSTRAINT_TYPE_TRACKTO:
|
case CONSTRAINT_TYPE_TRACKTO:
|
||||||
return BUTGREEN;
|
return TH_BUT_SETTING;
|
||||||
case CONSTRAINT_TYPE_ROTLIKE:
|
case CONSTRAINT_TYPE_ROTLIKE:
|
||||||
return BUTBLUE;
|
return TH_BUT_SETTING1;
|
||||||
case CONSTRAINT_TYPE_LOCLIKE:
|
case CONSTRAINT_TYPE_LOCLIKE:
|
||||||
return BUTYELLOW;
|
return TH_BUT_POPUP;
|
||||||
case CONSTRAINT_TYPE_ACTION:
|
case CONSTRAINT_TYPE_ACTION:
|
||||||
return BUTPINK;
|
return TH_BUT_ACTION;
|
||||||
default:
|
default:
|
||||||
return REDALERT;
|
return TH_REDALERT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,27 +309,25 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
uiBut *but;
|
uiBut *but;
|
||||||
char typestr[64];
|
char typestr[64];
|
||||||
short height, width = 238;
|
short height, width = 238;
|
||||||
BIFColorID curCol;
|
int curCol;
|
||||||
|
|
||||||
/* there is something weird in this function... opengl draw (glrects) doesnt match the buttons... */
|
/* there is something weird in this function... opengl draw (glrects) doesnt match the buttons... */
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
|
|
||||||
get_constraint_typestring (typestr, con);
|
get_constraint_typestring (typestr, con);
|
||||||
|
|
||||||
curCol = get_constraint_col(con);
|
curCol = get_constraint_col(con);
|
||||||
/* Draw constraint header */
|
/* Draw constraint header */
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
but = uiDefIconBut(block, BUT, B_CONSTRAINT_REDRAW, ICON_X, *xco, *yco, 20, 20, list, 0.0, 0.0, 0.0, 0.0, "Delete constraint");
|
but = uiDefIconBut(block, BUT, B_CONSTRAINT_REDRAW, ICON_X, *xco, *yco, 20, 20, list, 0.0, 0.0, 0.0, 0.0, "Delete constraint");
|
||||||
|
|
||||||
uiButSetFunc(but, del_constraint_func, con, list);
|
uiButSetFunc(but, del_constraint_func, con, list);
|
||||||
|
|
||||||
if (con->flag & CONSTRAINT_EXPAND) {
|
if (con->flag & CONSTRAINT_EXPAND) {
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
|
|
||||||
if (con->flag & CONSTRAINT_DISABLE)
|
if (con->flag & CONSTRAINT_DISABLE)
|
||||||
uiBlockSetCol(block, REDALERT);
|
uiBlockSetCol(block, TH_REDALERT);
|
||||||
|
|
||||||
if (type==TARGET_BONE)
|
if (type==TARGET_BONE)
|
||||||
but = uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Bone Constraint%t|Track To%x2|IK Solver%x3|Copy Rotation%x8|Copy Location%x9|Action%x12|Null%x0", *xco+20, *yco, 100, 20, &con->type, 0.0, 0.0, 0.0, 0.0, "Constraint type");
|
but = uiDefButC(block, MENU, B_CONSTRAINT_TEST, "Bone Constraint%t|Track To%x2|IK Solver%x3|Copy Rotation%x8|Copy Location%x9|Action%x12|Null%x0", *xco+20, *yco, 100, 20, &con->type, 0.0, 0.0, 0.0, 0.0, "Constraint type");
|
||||||
@@ -344,14 +342,13 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if (con->flag & CONSTRAINT_DISABLE) {
|
if (con->flag & CONSTRAINT_DISABLE) {
|
||||||
uiBlockSetCol(block, REDALERT);
|
uiBlockSetCol(block, TH_REDALERT);
|
||||||
BIF_set_color(REDALERT, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(TH_REDALERT);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
|
|
||||||
glRects(*xco+34, *yco-12, *xco+266, *yco+5);
|
glRects(*xco+34, *yco-12, *xco+266, *yco+5);
|
||||||
|
|
||||||
@@ -361,9 +358,9 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
uiButSetFunc(but, move_constraint_func, con, NULL);
|
uiButSetFunc(but, move_constraint_func, con, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, B_CONSTRAINT_REDRAW, ICON_RIGHTARROW, *xco+248, *yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse");
|
uiDefIconButS(block, ICONTOG|BIT|CONSTRAINT_EXPAND_BIT, B_CONSTRAINT_REDRAW, ICON_RIGHTARROW, *xco+248, *yco, 20, 20, &con->flag, 0.0, 0.0, 0.0, 0.0, "Collapse");
|
||||||
|
|
||||||
|
|
||||||
@@ -390,7 +387,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
|
|
||||||
height = 86;
|
height = 86;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
|
|
||||||
@@ -422,7 +419,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
bLocateLikeConstraint *data = con->data;
|
bLocateLikeConstraint *data = con->data;
|
||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
height = 66;
|
height = 66;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
|
|
||||||
@@ -447,7 +444,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
bRotateLikeConstraint *data = con->data;
|
bRotateLikeConstraint *data = con->data;
|
||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
height = 46;
|
height = 46;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
|
|
||||||
@@ -468,7 +465,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
|
|
||||||
height = 66;
|
height = 66;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
|
|
||||||
@@ -489,7 +486,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
case CONSTRAINT_TYPE_NULL:
|
case CONSTRAINT_TYPE_NULL:
|
||||||
{
|
{
|
||||||
height = 20;
|
height = 20;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
}
|
}
|
||||||
@@ -500,7 +497,7 @@ static void draw_constraint (uiBlock *block, ListBase *list, bConstraint *con, s
|
|||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
|
|
||||||
height = 46;
|
height = 46;
|
||||||
BIF_set_color(curCol, COLORSHADE_MEDIUM);
|
BIF_ThemeColor(curCol);
|
||||||
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
glRects(*xco+34, *yco-height-16, *xco+width+24, *yco-14);
|
||||||
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
uiEmboss((float)*xco+34, (float)*yco-height-16, (float)*xco+width+24, (float)*yco-14, 1);
|
||||||
|
|
||||||
@@ -592,7 +589,7 @@ static void object_panel_constraint(void)
|
|||||||
short xco, yco, type;
|
short xco, yco, type;
|
||||||
char ownerstr[64];
|
char ownerstr[64];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "object_panel_constraint", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "object_panel_constraint", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Effects", "Object");
|
uiNewPanelTabbed("Effects", "Object");
|
||||||
if(uiNewPanel(curarea, block, "Constraints", "Object", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Constraints", "Object", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
@@ -604,7 +601,6 @@ static void object_panel_constraint(void)
|
|||||||
|
|
||||||
if (conlist) {
|
if (conlist) {
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_CONSTRAINT_ADD, "Add", 10, 190, 95, 20, 0, 0.0, 0, 0, 0,"Add new constraint");
|
uiDefBut(block, BUT, B_CONSTRAINT_ADD, "Add", 10, 190, 95, 20, 0, 0.0, 0, 0, 0,"Add new constraint");
|
||||||
|
|
||||||
/* Go through the list of constraints and draw them */
|
/* Go through the list of constraints and draw them */
|
||||||
@@ -907,7 +903,7 @@ void object_panel_draw(Object *ob)
|
|||||||
int xco, a, dx, dy;
|
int xco, a, dx, dy;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "object_panel_draw", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "object_panel_draw", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Draw", "Object", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Draw", "Object", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* LAYERS */
|
/* LAYERS */
|
||||||
@@ -925,7 +921,6 @@ void object_panel_draw(Object *ob)
|
|||||||
id= ob->data;
|
id= ob->data;
|
||||||
if(id && id->lib) uiSetButLock(1, "Can't edit library data");
|
if(id && id->lib) uiSetButLock(1, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, LABEL, 0, "Drawtype", 28,200,100,18, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Drawtype", 28,200,100,18, 0, 0, 0, 0, 0, "");
|
||||||
uiDefButC(block, MENU, REDRAWVIEW3D, "Drawtype%t|Bounds %x1|Wire %x2|Solid %x3|Shaded %x4",
|
uiDefButC(block, MENU, REDRAWVIEW3D, "Drawtype%t|Bounds %x1|Wire %x2|Solid %x3|Shaded %x4",
|
||||||
28,180,100,18, &ob->dt, 0, 0, 0, 0, "Sets the drawing type of the active object");
|
28,180,100,18, &ob->dt, 0, 0, 0, 0, "Sets the drawing type of the active object");
|
||||||
@@ -938,7 +933,6 @@ void object_panel_draw(Object *ob)
|
|||||||
uiDefButC(block, TOG|BIT|2, REDRAWVIEW3D, "TexSpace", 28, 60, 100, 18, &ob->dtx, 0, 0, 0, 0, "Displays the active object's texture space");
|
uiDefButC(block, TOG|BIT|2, REDRAWVIEW3D, "TexSpace", 28, 60, 100, 18, &ob->dtx, 0, 0, 0, 0, "Displays the active object's texture space");
|
||||||
uiDefButC(block, TOG|BIT|3, REDRAWVIEW3D, "Name", 28, 40, 100, 18, &ob->dtx, 0, 0, 0, 0, "Displays the active object's name");
|
uiDefButC(block, TOG|BIT|3, REDRAWVIEW3D, "Name", 28, 40, 100, 18, &ob->dtx, 0, 0, 0, 0, "Displays the active object's name");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1136,11 +1130,9 @@ void object_panel_effects(Object *ob)
|
|||||||
int a;
|
int a;
|
||||||
short x, y;
|
short x, y;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "object_panel_effects", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "object_panel_effects", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Effects", "Object", 640, 0, 418, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Effects", "Object", 640, 0, 418, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
/* EFFECTS */
|
/* EFFECTS */
|
||||||
|
|
||||||
if (ob->type == OB_MESH) {
|
if (ob->type == OB_MESH) {
|
||||||
@@ -1148,8 +1140,6 @@ void object_panel_effects(Object *ob)
|
|||||||
uiDefBut(block, BUT, B_DELEFFECT, "Delete", 676,187,62,27, 0, 0, 0, 0, 0, "Delete the effect");
|
uiDefBut(block, BUT, B_DELEFFECT, "Delete", 676,187,62,27, 0, 0, 0, 0, 0, "Delete the effect");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
/* select effs */
|
/* select effs */
|
||||||
eff= ob->effect.first;
|
eff= ob->effect.first;
|
||||||
a= 0;
|
a= 0;
|
||||||
@@ -1186,12 +1176,10 @@ void object_panel_effects(Object *ob)
|
|||||||
|
|
||||||
wav= (WaveEff *)eff;
|
wav= (WaveEff *)eff;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, B_CALCEFFECT, "X", 782,135,54,23, &wav->flag, 0, 0, 0, 0, "Enable X axis");
|
uiDefButS(block, TOG|BIT|1, B_CALCEFFECT, "X", 782,135,54,23, &wav->flag, 0, 0, 0, 0, "Enable X axis");
|
||||||
uiDefButS(block, TOG|BIT|2, B_CALCEFFECT, "Y", 840,135,47,23, &wav->flag, 0, 0, 0, 0, "Enable Y axis");
|
uiDefButS(block, TOG|BIT|2, B_CALCEFFECT, "Y", 840,135,47,23, &wav->flag, 0, 0, 0, 0, "Enable Y axis");
|
||||||
uiDefButS(block, TOG|BIT|3, B_CALCEFFECT, "Cycl", 890,135,111,23, &wav->flag, 0, 0, 0, 0, "Enable cyclic wave efefct");
|
uiDefButS(block, TOG|BIT|3, B_CALCEFFECT, "Cycl", 890,135,111,23, &wav->flag, 0, 0, 0, 0, "Enable cyclic wave efefct");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Sta x:", 550,135,113,24, &wav->startx, -100.0, 100.0, 100, 0, "Starting position for the X axis");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Sta x:", 550,135,113,24, &wav->startx, -100.0, 100.0, 100, 0, "Starting position for the X axis");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Sta y:", 665,135,104,24, &wav->starty, -100.0, 100.0, 100, 0, "Starting position for the Y axis");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Sta y:", 665,135,104,24, &wav->starty, -100.0, 100.0, 100, 0, "Starting position for the Y axis");
|
||||||
|
|
||||||
@@ -1212,9 +1200,7 @@ void object_panel_effects(Object *ob)
|
|||||||
paf= (PartEff *)eff;
|
paf= (PartEff *)eff;
|
||||||
|
|
||||||
uiDefBut(block, BUT, B_RECALCAL, "RecalcAll", 741,187,67,27, 0, 0, 0, 0, 0, "Update the particle system");
|
uiDefBut(block, BUT, B_RECALCAL, "RecalcAll", 741,187,67,27, 0, 0, 0, 0, 0, "Update the particle system");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|2, B_CALCEFFECT, "Static", 825,187,67,27, &paf->flag, 0, 0, 0, 0, "Make static particles");
|
uiDefButS(block, TOG|BIT|2, B_CALCEFFECT, "Static", 825,187,67,27, &paf->flag, 0, 0, 0, 0, "Make static particles");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButI(block, NUM, B_CALCEFFECT, "Tot:", 550,146,91,20, &paf->totpart, 1.0, 100000.0, 0, 0, "Set the total number of particles");
|
uiDefButI(block, NUM, B_CALCEFFECT, "Tot:", 550,146,91,20, &paf->totpart, 1.0, 100000.0, 0, 0, "Set the total number of particles");
|
||||||
if(paf->flag & PAF_STATIC) {
|
if(paf->flag & PAF_STATIC) {
|
||||||
@@ -1227,9 +1213,7 @@ void object_panel_effects(Object *ob)
|
|||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Life:", 831,146,88,20, &paf->lifetime, 1.0, 9000.0, 100, 0, "Specify the life span of the particles");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Life:", 831,146,88,20, &paf->lifetime, 1.0, 9000.0, 100, 0, "Specify the life span of the particles");
|
||||||
uiDefButI(block, NUM, B_CALCEFFECT, "Keys:", 922,146,80,20, &paf->totkey, 1.0, 32.0, 0, 0, "Specify the number of key positions");
|
uiDefButI(block, NUM, B_CALCEFFECT, "Keys:", 922,146,80,20, &paf->totkey, 1.0, 32.0, 0, 0, "Specify the number of key positions");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, NUM, B_REDR, "CurMul:", 550,124,91,20, &paf->curmult, 0.0, 3.0, 0, 0, "Multiply the particles");
|
uiDefButS(block, NUM, B_REDR, "CurMul:", 550,124,91,20, &paf->curmult, 0.0, 3.0, 0, 0, "Multiply the particles");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_CALCEFFECT, "Mat:", 644,124,84,20, paf->mat+paf->curmult, 1.0, 8.0, 0, 0, "Specify the material used for the particles");
|
uiDefButS(block, NUM, B_CALCEFFECT, "Mat:", 644,124,84,20, paf->mat+paf->curmult, 1.0, 8.0, 0, 0, "Specify the material used for the particles");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Mult:", 730,124,98,20, paf->mult+paf->curmult, 0.0, 1.0, 10, 0, "Probability \"dying\" particle spawns a new one.");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Mult:", 730,124,98,20, paf->mult+paf->curmult, 0.0, 1.0, 10, 0, "Probability \"dying\" particle spawns a new one.");
|
||||||
uiDefButS(block, NUM, B_CALCEFFECT, "Child:", 922,124,80,20, paf->child+paf->curmult, 1.0, 600.0, 100, 0, "Specify the number of children of a particle that multiply itself");
|
uiDefButS(block, NUM, B_CALCEFFECT, "Child:", 922,124,80,20, paf->child+paf->curmult, 1.0, 600.0, 100, 0, "Specify the number of children of a particle that multiply itself");
|
||||||
@@ -1239,30 +1223,28 @@ void object_panel_effects(Object *ob)
|
|||||||
uiDefButI(block, NUM, B_CALCEFFECT, "Seed:", 652,96,80,20, &paf->seed, 0.0, 255.0, 0, 0, "Set an offset in the random table");
|
uiDefButI(block, NUM, B_CALCEFFECT, "Seed:", 652,96,80,20, &paf->seed, 0.0, 255.0, 0, 0, "Set an offset in the random table");
|
||||||
|
|
||||||
uiDefButF(block, NUM, B_DIFF, "VectSize", 885,96,116,20, &paf->vectsize, 0.0, 1.0, 10, 0, "Set the speed for Vect");
|
uiDefButF(block, NUM, B_DIFF, "VectSize", 885,96,116,20, &paf->vectsize, 0.0, 1.0, 10, 0, "Set the speed for Vect");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|3, B_CALCEFFECT, "Face", 735,96,46,20, &paf->flag, 0, 0, 0, 0, "Emit particles also from faces");
|
uiDefButS(block, TOG|BIT|3, B_CALCEFFECT, "Face", 735,96,46,20, &paf->flag, 0, 0, 0, 0, "Emit particles also from faces");
|
||||||
uiDefButS(block, TOG|BIT|1, B_CALCEFFECT, "Bspline", 782,96,54,20, &paf->flag, 0, 0, 0, 0, "Use B spline formula for particle interpolation");
|
uiDefButS(block, TOG|BIT|1, B_CALCEFFECT, "Bspline", 782,96,54,20, &paf->flag, 0, 0, 0, 0, "Use B spline formula for particle interpolation");
|
||||||
uiDefButS(block, TOG, REDRAWVIEW3D, "Vect", 837,96,45,20, &paf->stype, 0, 0, 0, 0, "Give the particles a rotation direction");
|
uiDefButS(block, TOG, REDRAWVIEW3D, "Vect", 837,96,45,20, &paf->stype, 0, 0, 0, 0, "Give the particles a rotation direction");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Norm:", 550,67,96,20, &paf->normfac, -2.0, 2.0, 10, 0, "Let the mesh give the particle a starting speed");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Norm:", 550,67,96,20, &paf->normfac, -2.0, 2.0, 10, 0, "Let the mesh give the particle a starting speed");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Ob:", 649,67,86,20, &paf->obfac, -1.0, 1.0, 10, 0, "Let the object give the particle a starting speed");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Ob:", 649,67,86,20, &paf->obfac, -1.0, 1.0, 10, 0, "Let the object give the particle a starting speed");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Rand:", 738,67,86,20, &paf->randfac, 0.0, 2.0, 10, 0, "Give the startingspeed a random variation");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Rand:", 738,67,86,20, &paf->randfac, 0.0, 2.0, 10, 0, "Give the startingspeed a random variation");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Tex:", 826,67,85,20, &paf->texfac, 0.0, 2.0, 10, 0, "Let the texture give the particle a starting speed");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Tex:", 826,67,85,20, &paf->texfac, 0.0, 2.0, 10, 0, "Let the texture give the particle a starting speed");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Damp:", 913,67,89,20, &paf->damp, 0.0, 1.0, 10, 0, "Specify the damping factor");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Damp:", 913,67,89,20, &paf->damp, 0.0, 1.0, 10, 0, "Specify the damping factor");
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "X:", 550,31,72,20, paf->force, -1.0, 1.0, 1, 0, "Specify the X axis of a continues force");
|
uiDefButF(block, NUM, B_CALCEFFECT, "X:", 550,31,72,20, paf->force, -1.0, 1.0, 1, 0, "Specify the X axis of a continues force");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Y:", 624,31,78,20, paf->force+1,-1.0, 1.0, 1, 0, "Specify the Y axis of a continues force");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Y:", 624,31,78,20, paf->force+1,-1.0, 1.0, 1, 0, "Specify the Y axis of a continues force");
|
||||||
uiDefBut(block, LABEL, 0, "Force:", 550,9,72,20, 0, 1.0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Force:", 550,9,72,20, 0, 1.0, 0, 0, 0, "");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Z:", 623,9,79,20, paf->force+2, -1.0, 1.0, 1, 0, "Specify the Z axis of a continues force");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Z:", 623,9,79,20, paf->force+2, -1.0, 1.0, 1, 0, "Specify the Z axis of a continues force");
|
||||||
|
|
||||||
uiDefBut(block, LABEL, 0, "Texture:", 722,9,74,20, 0, 1.0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Texture:", 722,9,74,20, 0, 1.0, 0, 0, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_CALCEFFECT, "Int", 875,9,32,43, &paf->texmap, 14.0, 0.0, 0, 0, "Use texture intensity as a factor for texture force");
|
uiDefButS(block, ROW, B_CALCEFFECT, "Int", 875,9,32,43, &paf->texmap, 14.0, 0.0, 0, 0, "Use texture intensity as a factor for texture force");
|
||||||
uiDefButS(block, ROW, B_CALCEFFECT, "RGB", 911,31,45,20, &paf->texmap, 14.0, 1.0, 0, 0, "Use RGB values as a factor for particle speed");
|
uiDefButS(block, ROW, B_CALCEFFECT, "RGB", 911,31,45,20, &paf->texmap, 14.0, 1.0, 0, 0, "Use RGB values as a factor for particle speed");
|
||||||
uiDefButS(block, ROW, B_CALCEFFECT, "Grad", 958,31,44,20, &paf->texmap, 14.0, 2.0, 0, 0, "Use texture gradient as a factor for particle speed");
|
uiDefButS(block, ROW, B_CALCEFFECT, "Grad", 958,31,44,20, &paf->texmap, 14.0, 2.0, 0, 0, "Use texture gradient as a factor for particle speed");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Nabla:", 911,9,91,20, &paf->nabla, 0.0001, 1.0, 1, 0, "Specify the dimension of the area for gradient calculation");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Nabla:", 911,9,91,20, &paf->nabla, 0.0001, 1.0, 1, 0, "Specify the dimension of the area for gradient calculation");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "X:", 722,31,74,20, paf->defvec, -1.0, 1.0, 1, 0, "Specify the X axis of a force, determined by the texture");
|
uiDefButF(block, NUM, B_CALCEFFECT, "X:", 722,31,74,20, paf->defvec, -1.0, 1.0, 1, 0, "Specify the X axis of a force, determined by the texture");
|
||||||
uiDefButF(block, NUM, B_CALCEFFECT, "Y:", 798,31,74,20, paf->defvec+1,-1.0, 1.0, 1, 0, "Specify the Y axis of a force, determined by the texture");
|
uiDefButF(block, NUM, B_CALCEFFECT, "Y:", 798,31,74,20, paf->defvec+1,-1.0, 1.0, 1, 0, "Specify the Y axis of a force, determined by the texture");
|
||||||
@@ -1277,10 +1259,9 @@ static void object_panel_anim(Object *ob)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "object_panel_anim", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "object_panel_anim", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Anim settings", "Object", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Anim settings", "Object", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButC(block, ROW,REDRAWVIEW3D,"TrackX", 27,190,58,17, &ob->trackflag, 12.0, 0.0, 0, 0, "Specify the axis that points to another object");
|
uiDefButC(block, ROW,REDRAWVIEW3D,"TrackX", 27,190,58,17, &ob->trackflag, 12.0, 0.0, 0, 0, "Specify the axis that points to another object");
|
||||||
uiDefButC(block, ROW,REDRAWVIEW3D,"Y", 85,190,19,17, &ob->trackflag, 12.0, 1.0, 0, 0, "Specify the axis that points to another object");
|
uiDefButC(block, ROW,REDRAWVIEW3D,"Y", 85,190,19,17, &ob->trackflag, 12.0, 1.0, 0, 0, "Specify the axis that points to another object");
|
||||||
uiDefButC(block, ROW,REDRAWVIEW3D,"Z", 104,190,19,17, &ob->trackflag, 12.0, 2.0, 0, 0, "Specify the axis that points to another object");
|
uiDefButC(block, ROW,REDRAWVIEW3D,"Z", 104,190,19,17, &ob->trackflag, 12.0, 2.0, 0, 0, "Specify the axis that points to another object");
|
||||||
@@ -1291,39 +1272,30 @@ static void object_panel_anim(Object *ob)
|
|||||||
uiDefButC(block, ROW,REDRAWVIEW3D,"Y", 274,190,20,17, &ob->upflag, 13.0, 1.0, 0, 0, "Specify the axis that points up");
|
uiDefButC(block, ROW,REDRAWVIEW3D,"Y", 274,190,20,17, &ob->upflag, 13.0, 1.0, 0, 0, "Specify the axis that points up");
|
||||||
uiDefButC(block, ROW,REDRAWVIEW3D,"Z", 297,190,19,17, &ob->upflag, 13.0, 2.0, 0, 0, "Specify the axis that points up");
|
uiDefButC(block, ROW,REDRAWVIEW3D,"Z", 297,190,19,17, &ob->upflag, 13.0, 2.0, 0, 0, "Specify the axis that points up");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButC(block, TOG|BIT|0, REDRAWVIEW3D, "Draw Key", 25,160,70,19, &ob->ipoflag, 0, 0, 0, 0, "Draw object as key position");
|
uiDefButC(block, TOG|BIT|0, REDRAWVIEW3D, "Draw Key", 25,160,70,19, &ob->ipoflag, 0, 0, 0, 0, "Draw object as key position");
|
||||||
uiDefButC(block, TOG|BIT|1, REDRAWVIEW3D, "Draw Key Sel", 97,160,81,20, &ob->ipoflag, 0, 0, 0, 0, "Limit the drawing of object keys");
|
uiDefButC(block, TOG|BIT|1, REDRAWVIEW3D, "Draw Key Sel", 97,160,81,20, &ob->ipoflag, 0, 0, 0, 0, "Limit the drawing of object keys");
|
||||||
uiDefButS(block, TOG|BIT|4, 0, "SlowPar", 261,160,56,20, &ob->partype, 0, 0, 0, 0, "Create a delay in the parent relationship");
|
uiDefButS(block, TOG|BIT|4, 0, "SlowPar", 261,160,56,20, &ob->partype, 0, 0, 0, 0, "Create a delay in the parent relationship");
|
||||||
uiDefButC(block, TOG|BIT|7, REDRAWVIEW3D, "Powertrack", 180,160,78,19, &ob->transflag, 0, 0, 0, 0, "Switch objects rotation off");
|
uiDefButC(block, TOG|BIT|7, REDRAWVIEW3D, "Powertrack", 180,160,78,19, &ob->transflag, 0, 0, 0, 0, "Switch objects rotation off");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButC(block, TOG|BIT|3, REDRAWVIEW3D, "DupliFrames", 24,128,88,19, &ob->transflag, 0, 0, 0, 0, "Make copy of object for every frame");
|
uiDefButC(block, TOG|BIT|3, REDRAWVIEW3D, "DupliFrames", 24,128,88,19, &ob->transflag, 0, 0, 0, 0, "Make copy of object for every frame");
|
||||||
uiDefButC(block, TOG|BIT|4, REDRAWVIEW3D, "DupliVerts", 114,128,82,19, &ob->transflag, 0, 0, 0, 0, "Duplicate child objects on all vertices");
|
uiDefButC(block, TOG|BIT|4, REDRAWVIEW3D, "DupliVerts", 114,128,82,19, &ob->transflag, 0, 0, 0, 0, "Duplicate child objects on all vertices");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButC(block, TOG|BIT|5, REDRAWVIEW3D, "Rot", 200,128,31,20, &ob->transflag, 0, 0, 0, 0, "Rotate dupli according to facenormal");
|
uiDefButC(block, TOG|BIT|5, REDRAWVIEW3D, "Rot", 200,128,31,20, &ob->transflag, 0, 0, 0, 0, "Rotate dupli according to facenormal");
|
||||||
uiDefButC(block, TOG|BIT|6, REDRAWVIEW3D, "No Speed", 234,128,82,19, &ob->transflag, 0, 0, 0, 0, "Set dupliframes to still, regardless of frame");
|
uiDefButC(block, TOG|BIT|6, REDRAWVIEW3D, "No Speed", 234,128,82,19, &ob->transflag, 0, 0, 0, 0, "Set dupliframes to still, regardless of frame");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, REDRAWVIEW3D, "DupSta:", 24,105,141,18, &ob->dupsta, 1.0, 1500.0, 0, 0, "Specify startframe for Dupliframes");
|
uiDefButS(block, NUM, REDRAWVIEW3D, "DupSta:", 24,105,141,18, &ob->dupsta, 1.0, 1500.0, 0, 0, "Specify startframe for Dupliframes");
|
||||||
uiDefButS(block, NUM, REDRAWVIEW3D, "DupEnd", 24,83,140,19, &ob->dupend, 1.0, 2500.0, 0, 0, "Specify endframe for Dupliframes");
|
uiDefButS(block, NUM, REDRAWVIEW3D, "DupEnd", 24,83,140,19, &ob->dupend, 1.0, 2500.0, 0, 0, "Specify endframe for Dupliframes");
|
||||||
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOn:", 169,104,146,19, &ob->dupon, 1.0, 1500.0, 0, 0, "");
|
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOn:", 169,104,146,19, &ob->dupon, 1.0, 1500.0, 0, 0, "");
|
||||||
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOff", 169,82,145,19, &ob->dupoff, 0.0, 1500.0, 0, 0, "");
|
uiDefButS(block, NUM, REDRAWVIEW3D, "DupOff", 169,82,145,19, &ob->dupoff, 0.0, 1500.0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButC(block, TOG|BIT|2, REDRAWALL, "Offs Ob", 23,51,56,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on its own objectipo");
|
uiDefButC(block, TOG|BIT|2, REDRAWALL, "Offs Ob", 23,51,56,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on its own objectipo");
|
||||||
uiDefButC(block, TOG|BIT|6, REDRAWALL, "Offs Par", 82,51,56,20 , &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the parent");
|
uiDefButC(block, TOG|BIT|6, REDRAWALL, "Offs Par", 82,51,56,20 , &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the parent");
|
||||||
uiDefButC(block, TOG|BIT|7, REDRAWALL, "Offs Particle", 141,51,103,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the particle effect");
|
uiDefButC(block, TOG|BIT|7, REDRAWALL, "Offs Particle", 141,51,103,20, &ob->ipoflag, 0, 0, 0, 0, "Let the timeoffset work on the particle effect");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
sprintf(str, "%.4f", prspeed);
|
sprintf(str, "%.4f", prspeed);
|
||||||
uiDefBut(block, LABEL, 0, str, 247,40,63,31, 0, 1.0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, str, 247,40,63,31, 0, 1.0, 0, 0, 0, "");
|
||||||
uiDefBut(block, BUT, B_PRINTSPEED, "PrSpeed", 246,17,67,31, 0, 0, 0, 0, 0, "Print objectspeed");
|
uiDefBut(block, BUT, B_PRINTSPEED, "PrSpeed", 246,17,67,31, 0, 0, 0, 0, 0, "Print objectspeed");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, REDRAWALL, "TimeOffset:", 23,17,114,30, &ob->sf, -9000.0, 9000.0, 100, 0, "Specify an offset in frames");
|
uiDefButF(block, NUM, REDRAWALL, "TimeOffset:", 23,17,114,30, &ob->sf, -9000.0, 9000.0, 100, 0, "Specify an offset in frames");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_AUTOTIMEOFS, "Automatic Time", 139,17,104,31, 0, 0, 0, 0, 0, "Generate automatic timeoffset values for all selected frames");
|
uiDefBut(block, BUT, B_AUTOTIMEOFS, "Automatic Time", 139,17,104,31, 0, 0, 0, 0, 0, "Generate automatic timeoffset values for all selected frames");
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
@@ -1343,8 +1315,6 @@ static void object_panel_anim(Object *ob)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
sprintf(str, "%.3f", G.sipo->v2d.tot.xmin);
|
sprintf(str, "%.3f", G.sipo->v2d.tot.xmin);
|
||||||
uiDefBut(block, LABEL, 0, str, 1020, 140, 100, 19, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, str, 1020, 140, 100, 19, 0, 0, 0, 0, 0, "");
|
||||||
sprintf(str, "%.3f", G.sipo->v2d.tot.xmax);
|
sprintf(str, "%.3f", G.sipo->v2d.tot.xmax);
|
||||||
@@ -1361,15 +1331,12 @@ static void object_panel_anim(Object *ob)
|
|||||||
uiDefButF(block, NUM, B_DIFF, "Ymin:", 1020, 80, 100, 19, &G.sipo->tot.ymin, -G.sipo->v2d.max[1], G.sipo->v2d.max[1], 100, 0, "");
|
uiDefButF(block, NUM, B_DIFF, "Ymin:", 1020, 80, 100, 19, &G.sipo->tot.ymin, -G.sipo->v2d.max[1], G.sipo->v2d.max[1], 100, 0, "");
|
||||||
uiDefButF(block, NUM, B_DIFF, "Ymax:", 1120, 80, 100, 19, &G.sipo->tot.ymax, -G.sipo->v2d.max[1], G.sipo->v2d.max[1], 100, 0, "");
|
uiDefButF(block, NUM, B_DIFF, "Ymax:", 1120, 80, 100, 19, &G.sipo->tot.ymax, -G.sipo->v2d.max[1], G.sipo->v2d.max[1], 100, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_MUL_IPO, "SET", 1220,79,50,62, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_MUL_IPO, "SET", 1220,79,50,62, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
|
|
||||||
/* SPEED BUTTON */
|
/* SPEED BUTTON */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_DIFF, "Speed:", 1020,23,164,28, &hspeed, 0.0, 180.0, 1, 0, "");
|
uiDefButF(block, NUM, B_DIFF, "Speed:", 1020,23,164,28, &hspeed, 0.0, 180.0, 1, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SETSPEED, "SET", 1185,23,83,29, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_SETSPEED, "SET", 1185,23,83,29, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -264,10 +264,9 @@ static void sound_panel_listener()
|
|||||||
int xco= 100, yco=100, mixrate;
|
int xco= 100, yco=100, mixrate;
|
||||||
char mixrateinfo[256];
|
char mixrateinfo[256];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "sound_panel_listener", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "sound_panel_listener", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Listener", "Sound", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Listener", "Sound", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
mixrate = sound_get_mixrate();
|
mixrate = sound_get_mixrate();
|
||||||
sprintf(mixrateinfo, "Game Mixrate: %d Hz", mixrate);
|
sprintf(mixrateinfo, "Game Mixrate: %d Hz", mixrate);
|
||||||
uiDefBut(block, LABEL, 0, mixrateinfo, xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, mixrateinfo, xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
||||||
@@ -295,7 +294,7 @@ static void sound_panel_sequencer()
|
|||||||
short xco, yco;
|
short xco, yco;
|
||||||
char mixrateinfo[256];
|
char mixrateinfo[256];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "sound_panel_sequencer", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "sound_panel_sequencer", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Sequencer", "Sound", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Sequencer", "Sound", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* audio sequence engine settings ------------------------------------------------------------------ */
|
/* audio sequence engine settings ------------------------------------------------------------------ */
|
||||||
@@ -310,14 +309,11 @@ static void sound_panel_sequencer()
|
|||||||
uiDefBut(block, LABEL, 0, mixrateinfo, xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, mixrateinfo, xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
yco -= 25;
|
yco -= 25;
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButI(block, ROW, B_SOUND_RATECHANGED, "44.1 kHz", xco,yco,75,20, &G.scene->audio.mixrate, 2.0, 44100.0, 0, 0, "Mix at 44.1 kHz");
|
uiDefButI(block, ROW, B_SOUND_RATECHANGED, "44.1 kHz", xco,yco,75,20, &G.scene->audio.mixrate, 2.0, 44100.0, 0, 0, "Mix at 44.1 kHz");
|
||||||
uiDefButI(block, ROW, B_SOUND_RATECHANGED, "48.0 kHz", xco+80,yco,75,20, &G.scene->audio.mixrate, 2.0, 48000.0, 0, 0, "Mix at 48 kHz");
|
uiDefButI(block, ROW, B_SOUND_RATECHANGED, "48.0 kHz", xco+80,yco,75,20, &G.scene->audio.mixrate, 2.0, 48000.0, 0, 0, "Mix at 48 kHz");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SOUND_RECALC, "Recalc", xco+160,yco,75,20, 0, 0, 0, 0, 0, "Recalculate samples");
|
uiDefBut(block, BUT, B_SOUND_RECALC, "Recalc", xco+160,yco,75,20, 0, 0, 0, 0, 0, "Recalculate samples");
|
||||||
|
|
||||||
yco -= 25;
|
yco -= 25;
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync", xco,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
|
uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync", xco,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
|
||||||
uiDefButS(block, TOG|BIT|2, B_SOUND_CHANGED, "Scrub", xco+120,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Scrub when changing frames");
|
uiDefButS(block, TOG|BIT|2, B_SOUND_CHANGED, "Scrub", xco+120,yco,115,20, &G.scene->audio.flag, 0, 0, 0, 0, "Scrub when changing frames");
|
||||||
|
|
||||||
@@ -325,7 +321,6 @@ static void sound_panel_sequencer()
|
|||||||
uiDefBut(block, LABEL, 0, "Main mix", xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Main mix", xco,yco,295,20, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
yco -= 25;
|
yco -= 25;
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Main (dB): ",
|
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Main (dB): ",
|
||||||
xco,yco,235,24,&G.scene->audio.main, -24.0, 6.0, 0, 0, "Set the audio master gain/attenuation in dB");
|
xco,yco,235,24,&G.scene->audio.main, -24.0, 6.0, 0, 0, "Set the audio master gain/attenuation in dB");
|
||||||
|
|
||||||
@@ -333,7 +328,6 @@ static void sound_panel_sequencer()
|
|||||||
uiDefButS(block, TOG|BIT|0, 0, "Mute", xco,yco,235,24, &G.scene->audio.flag, 0, 0, 0, 0, "Mute audio from sequencer");
|
uiDefButS(block, TOG|BIT|0, 0, "Mute", xco,yco,235,24, &G.scene->audio.flag, 0, 0, 0, 0, "Mute audio from sequencer");
|
||||||
|
|
||||||
yco -= 35;
|
yco -= 35;
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SOUND_MIXDOWN, "MIXDOWN", xco,yco,235,24, 0, 0, 0, 0, 0, "Create WAV file from sequenced audio");
|
uiDefBut(block, BUT, B_SOUND_MIXDOWN, "MIXDOWN", xco,yco,235,24, 0, 0, 0, 0, 0, "Create WAV file from sequenced audio");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -346,7 +340,7 @@ static void sound_panel_sound(bSound *sound)
|
|||||||
bSample *sample;
|
bSample *sample;
|
||||||
char *strp, str[32], ch[256];
|
char *strp, str[32], ch[256];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "sound_panel_sound", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "sound_panel_sound", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Sound", "Sound", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Sound", "Sound", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiDefBut(block, LABEL, 0, "Blender Sound block",10,180,195,20, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Blender Sound block",10,180,195,20, 0, 0, 0, 0, 0, "");
|
||||||
@@ -394,14 +388,10 @@ static void sound_panel_sound(bSound *sound)
|
|||||||
uiDefIconButI(block, TOG|BIT|0, B_SOUND_UNPACK_SAMPLE, ICON_PACKAGE,
|
uiDefIconButI(block, TOG|BIT|0, B_SOUND_UNPACK_SAMPLE, ICON_PACKAGE,
|
||||||
285, 120,25,24, &packdummy, 0, 0, 0, 0,"Pack/Unpack this sample");
|
285, 120,25,24, &packdummy, 0, 0, 0, 0,"Pack/Unpack this sample");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_SOUND_LOAD_SAMPLE, "Load sample", 10, 95,150,24, 0, 0, 0, 0, 0, "Load a different sample file");
|
uiDefBut(block, BUT, B_SOUND_LOAD_SAMPLE, "Load sample", 10, 95,150,24, 0, 0, 0, 0, 0, "Load a different sample file");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
|
||||||
uiDefBut(block, BUT, B_SOUND_PLAY_SAMPLE, "Play", 160, 95, 150, 24, 0, 0.0, 0, 0, 0, "Playback sample using settings below");
|
uiDefBut(block, BUT, B_SOUND_PLAY_SAMPLE, "Play", 160, 95, 150, 24, 0, 0.0, 0, 0, 0, "Playback sample using settings below");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Volume: ",
|
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Volume: ",
|
||||||
10,70,150,20, &sound->volume, 0.0, 1.0, 0, 0, "Set the volume of this sound");
|
10,70,150,20, &sound->volume, 0.0, 1.0, 0, 0, "Set the volume of this sound");
|
||||||
|
|
||||||
@@ -409,7 +399,6 @@ static void sound_panel_sound(bSound *sound)
|
|||||||
160,70,150,20, &sound->pitch, -12.0, 12.0, 0, 0, "Set the pitch of this sound");
|
160,70,150,20, &sound->pitch, -12.0, 12.0, 0, 0, "Set the pitch of this sound");
|
||||||
|
|
||||||
/* looping */
|
/* looping */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|SOUND_FLAGS_LOOP_BIT, B_SOUND_REDRAW, "Loop",
|
uiDefButI(block, TOG|BIT|SOUND_FLAGS_LOOP_BIT, B_SOUND_REDRAW, "Loop",
|
||||||
10, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Toggle between looping on/off");
|
10, 50, 95, 20, &sound->flags, 0.0, 0.0, 0, 0, "Toggle between looping on/off");
|
||||||
|
|
||||||
@@ -423,12 +412,10 @@ static void sound_panel_sound(bSound *sound)
|
|||||||
/* 3D settings ------------------------------------------------------------------ */
|
/* 3D settings ------------------------------------------------------------------ */
|
||||||
|
|
||||||
if (sound->sample->channels == 1) {
|
if (sound->sample->channels == 1) {
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButI(block, TOG|BIT|SOUND_FLAGS_3D_BIT, B_SOUND_REDRAW, "3D Sound",
|
uiDefButI(block, TOG|BIT|SOUND_FLAGS_3D_BIT, B_SOUND_REDRAW, "3D Sound",
|
||||||
10, 10, 90, 20, &sound->flags, 0, 0, 0, 0, "Turns 3D sound on");
|
10, 10, 90, 20, &sound->flags, 0, 0, 0, 0, "Turns 3D sound on");
|
||||||
|
|
||||||
if (sound->flags & SOUND_FLAGS_3D) {
|
if (sound->flags & SOUND_FLAGS_3D) {
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Scale: ",
|
uiDefButF(block, NUMSLI, B_SOUND_CHANGED, "Scale: ",
|
||||||
100,10,210,20, &sound->attenuation, 0.0, 5.0, 1.0, 0, "Sets the surround scaling factor for this sound");
|
100,10,210,20, &sound->attenuation, 0.0, 5.0, 1.0, 0, "Sets the surround scaling factor for this sound");
|
||||||
|
|
||||||
@@ -796,53 +783,29 @@ static uiBlock *edge_render_menu(void *arg_unused)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks,
|
block= uiNewBlock(&curarea->uiblocks, "edge render", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
"edge render", UI_EMBOSSX, UI_HELV,
|
|
||||||
curarea->win);
|
|
||||||
|
|
||||||
/* use this for a fake extra empy space around the buttons */
|
/* use this for a fake extra empy space around the buttons */
|
||||||
uiDefBut(block, LABEL, 0, "",
|
uiDefBut(block, LABEL, 0, "", 285, -20, 230, 120, NULL, 0, 0, 0, 0, "");
|
||||||
/* 285, -20, 230, 100, NULL, */
|
|
||||||
285, -20, 230, 120, NULL,
|
|
||||||
0, 0, 0, 0, "");
|
|
||||||
|
|
||||||
uiDefButS(block, NUM, 0,"Eint:",
|
uiDefButS(block, NUM, 0,"Eint:", 295,50,70,19, &G.scene->r.edgeint, 0.0, 255.0, 0, 0,
|
||||||
295,50,70,19,
|
|
||||||
&G.scene->r.edgeint, 0.0, 255.0, 0, 0,
|
|
||||||
"Sets edge intensity for Toon shading");
|
"Sets edge intensity for Toon shading");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiDefButI(block, TOG, 0,"Shift", 365,50,70,19, &G.compat, 0, 0, 0, 0,
|
||||||
uiDefButI(block, TOG, 0,"Shift",
|
|
||||||
365,50,70,19,
|
|
||||||
&G.compat, 0, 0, 0, 0,
|
|
||||||
"For unified renderer: use old offsets for edges");
|
"For unified renderer: use old offsets for edges");
|
||||||
uiDefButI(block, TOG, 0,"All", 435,50,70,19,
|
uiDefButI(block, TOG, 0,"All", 435,50,70,19, &G.notonlysolid, 0, 0, 0, 0,
|
||||||
&G.notonlysolid, 0, 0, 0, 0,
|
"For unified renderer: also consider transparent faces for toon shading");
|
||||||
"For unified renderer: also consider transparent "
|
|
||||||
"faces for toon shading");
|
|
||||||
|
|
||||||
/* colour settings for the toon shading */
|
/* colour settings for the toon shading */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiDefButF(block, COL, B_EDGECOLSLI, "", 295,-10,30,60, &(G.scene->r.edgeR), 0, 0, 0, 0, "");
|
||||||
uiDefButF(block, COL, B_EDGECOLSLI, "",
|
|
||||||
295,-10,30,60,
|
|
||||||
&(G.scene->r.edgeR), 0, 0, 0, 0,
|
|
||||||
"");
|
|
||||||
|
|
||||||
uiDefButF(block, NUMSLI, 0, "R ",
|
uiDefButF(block, NUMSLI, 0, "R ", 325, 30, 180,19, &G.scene->r.edgeR, 0.0, 1.0, B_EDGECOLSLI, 0,
|
||||||
325, 30, 180,19,
|
|
||||||
&G.scene->r.edgeR, 0.0, 1.0, B_EDGECOLSLI, 0,
|
|
||||||
"For unified renderer: Colour for edges in toon shading mode.");
|
"For unified renderer: Colour for edges in toon shading mode.");
|
||||||
uiDefButF(block, NUMSLI, 0, "G ",
|
uiDefButF(block, NUMSLI, 0, "G ", 325, 10, 180,19, &G.scene->r.edgeG, 0.0, 1.0, B_EDGECOLSLI, 0,
|
||||||
325, 10, 180,19,
|
|
||||||
&G.scene->r.edgeG, 0.0, 1.0, B_EDGECOLSLI, 0,
|
|
||||||
"For unified renderer: Colour for edges in toon shading mode.");
|
"For unified renderer: Colour for edges in toon shading mode.");
|
||||||
uiDefButF(block, NUMSLI, 0, "B ",
|
uiDefButF(block, NUMSLI, 0, "B ", 325, -10, 180,19, &G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0,
|
||||||
325, -10, 180,19,
|
|
||||||
&G.scene->r.edgeB, 0.0, 1.0, B_EDGECOLSLI, 0,
|
|
||||||
"For unified renderer: Colour for edges in toon shading mode.");
|
"For unified renderer: Colour for edges in toon shading mode.");
|
||||||
|
|
||||||
uiDefButS(block, NUM, 0,"AntiShift",
|
uiDefButS(block, NUM, 0,"AntiShift", 365,70,140,19, &(G.scene->r.same_mat_redux), 0, 255.0, 0, 0,
|
||||||
365,70,140,19,
|
|
||||||
&(G.scene->r.same_mat_redux), 0, 255.0, 0, 0,
|
|
||||||
"For unified renderer: reduce intensity on boundaries "
|
"For unified renderer: reduce intensity on boundaries "
|
||||||
"with identical materials with this number.");
|
"with identical materials with this number.");
|
||||||
|
|
||||||
@@ -855,17 +818,14 @@ static uiBlock *post_render_menu(void *arg_unused)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "post render", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "post render", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
/* use this for a fake extra empy space around the buttons */
|
/* use this for a fake extra empy space around the buttons */
|
||||||
uiDefBut(block, LABEL, 0, "", -10, 10, 200, 80, NULL, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "", -10, 10, 200, 80, NULL, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiDefButF(block, NUMSLI, 0,"Add:", 0,60,180,19,
|
uiDefButF(block, NUMSLI, 0,"Add:", 0,60,180,19, &G.scene->r.postadd, -1.0, 1.0, 0, 0, "");
|
||||||
&G.scene->r.postadd, -1.0, 1.0, 0, 0, "");
|
uiDefButF(block, NUMSLI, 0,"Mul:", 0,40,180,19, &G.scene->r.postmul, 0.01, 4.0, 0, 0, "");
|
||||||
uiDefButF(block, NUMSLI, 0,"Mul:", 0,40,180,19,
|
uiDefButF(block, NUMSLI, 0,"Gamma:", 0,20,180,19, &G.scene->r.postgamma, 0.2, 2.0, 0, 0, "");
|
||||||
&G.scene->r.postmul, 0.01, 4.0, 0, 0, "");
|
|
||||||
uiDefButF(block, NUMSLI, 0,"Gamma:", 0,20,180,19,
|
|
||||||
&G.scene->r.postgamma, 0.2, 2.0, 0, 0, "");
|
|
||||||
|
|
||||||
uiBlockSetDirection(block, UI_TOP);
|
uiBlockSetDirection(block, UI_TOP);
|
||||||
|
|
||||||
@@ -879,7 +839,7 @@ static uiBlock *framing_render_menu(void *arg_unused)
|
|||||||
short yco = 60, xco = 0;
|
short yco = 60, xco = 0;
|
||||||
int randomcolorindex = 1234;
|
int randomcolorindex = 1234;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "framing_options", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "framing_options", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
/* use this for a fake extra empy space around the buttons */
|
/* use this for a fake extra empy space around the buttons */
|
||||||
uiDefBut(block, LABEL, 0, "", -10, -10, 300, 100, NULL, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "", -10, -10, 300, 100, NULL, 0, 0, 0, 0, "");
|
||||||
@@ -989,7 +949,7 @@ static void render_panel_output()
|
|||||||
char *strp;
|
char *strp;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "render_panel_output", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "render_panel_output", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Output", "Render", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Output", "Render", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiDefBut(block, TEX,0,"", 30, 170, 268, 19,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
|
uiDefBut(block, TEX,0,"", 30, 170, 268, 19,G.scene->r.pic, 0.0,79.0, 0, 0, "Directory/name to save rendered Pics to");
|
||||||
@@ -999,10 +959,8 @@ static void render_panel_output()
|
|||||||
uiDefBut(block, TEX,0,"", 30, 125, 268, 19,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
|
uiDefBut(block, TEX,0,"", 30, 125, 268, 19,G.scene->r.ftype,0.0,79.0, 0, 0, "Image to use with FTYPE Image type");
|
||||||
uiDefBut(block, BUT,B_FS_FTYPE," ", 15, 125, 10, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
|
uiDefBut(block, BUT,B_FS_FTYPE," ", 15, 125, 10, 19, 0, 0, 0, 0, 0, "Open Fileselect to get Ftype image");
|
||||||
uiDefIconBut(block, BUT, B_CLEARSET, ICON_X, 131, 95, 20, 19, 0, 0, 0, 0, 0, "Remove Set link");
|
uiDefIconBut(block, BUT, B_CLEARSET, ICON_X, 131, 95, 20, 19, 0, 0, 0, 0, 0, "Remove Set link");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_IS_BACKBUF," ", 8, 148, 10, 19, 0, 0, 0, 0, 0, "Open Imageselect to get Backbuf image");
|
uiDefBut(block, BUT,B_IS_BACKBUF," ", 8, 148, 10, 19, 0, 0, 0, 0, 0, "Open Imageselect to get Backbuf image");
|
||||||
uiDefBut(block, BUT,B_IS_FTYPE," ", 8, 125, 10, 19, 0, 0, 0, 0, 0, "Open Imageselect to get Ftype image");
|
uiDefBut(block, BUT,B_IS_FTYPE," ", 8, 125, 10, 19, 0, 0, 0, 0, 0, "Open Imageselect to get Ftype image");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
/* SET BUTTON */
|
/* SET BUTTON */
|
||||||
id= (ID *)G.scene->set;
|
id= (ID *)G.scene->set;
|
||||||
@@ -1011,7 +969,7 @@ static void render_panel_output()
|
|||||||
uiDefButS(block, MENU, B_SETBROWSE, strp, 8, 96, 20, 19, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
|
uiDefButS(block, MENU, B_SETBROWSE, strp, 8, 96, 20, 19, &(G.buts->menunr), 0, 0, 0, 0, "Scene to link as a Set");
|
||||||
MEM_freeN(strp);
|
MEM_freeN(strp);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
if(G.scene->set) {
|
if(G.scene->set) {
|
||||||
uiSetButLock(1, NULL);
|
uiSetButLock(1, NULL);
|
||||||
@@ -1022,7 +980,7 @@ static void render_panel_output()
|
|||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0, 0,"Backbuf", 8, 70, 62, 19, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");
|
uiDefButS(block, TOG|BIT|0, 0,"Backbuf", 8, 70, 62, 19, &G.scene->r.bufflag, 0, 0, 0, 0, "Enable/Disable use of Backbuf image");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
for(b=0; b<3; b++)
|
for(b=0; b<3; b++)
|
||||||
for(a=0; a<3; a++)
|
for(a=0; a<3; a++)
|
||||||
@@ -1053,15 +1011,11 @@ static void render_panel_render()
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "render_panel_render", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "render_panel_render", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Render", "Render", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Render", "Render", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
uiDefBut(block, BUT,B_DORENDER,"RENDER", 369,142,192,47, 0, 0, 0, 0, 0, "Start the rendering");
|
uiDefBut(block, BUT,B_DORENDER,"RENDER", 369,142,192,47, 0, 0, 0, 0, 0, "Start the rendering");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0, 0, "OSA", 369,114,124,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
|
uiDefButS(block, TOG|BIT|0, 0, "OSA", 369,114,124,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Oversampling (Anti-aliasing)");
|
||||||
uiDefButF(block, NUM,B_DIFF,"Bf:", 495,90,65,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 0, "Sets motion blur factor");
|
uiDefButF(block, NUM,B_DIFF,"Bf:", 495,90,65,20,&G.scene->r.blurfac, 0.01, 5.0, 10, 0, "Sets motion blur factor");
|
||||||
uiDefButS(block, TOG|BIT|14, 0, "MBLUR", 495,114,66,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
|
uiDefButS(block, TOG|BIT|14, 0, "MBLUR", 495,114,66,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables Motion Blur calculation");
|
||||||
@@ -1078,7 +1032,6 @@ static void render_panel_render()
|
|||||||
uiDefButS(block, ROW,800,"Premul", 410,11,54,24,&G.scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance");
|
uiDefButS(block, ROW,800,"Premul", 410,11,54,24,&G.scene->r.alphamode,3.0,1.0, 0, 0, "Multiply alpha in advance");
|
||||||
uiDefButS(block, ROW,800,"Key", 467,11,44,24,&G.scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and colour values remain unchanged");
|
uiDefButS(block, ROW,800,"Key", 467,11,44,24,&G.scene->r.alphamode,3.0,2.0, 0, 0, "Alpha and colour values remain unchanged");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, TOG|BIT|1,0,"Shadow", 565,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
|
uiDefButS(block, TOG|BIT|1,0,"Shadow", 565,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable shadow calculation");
|
||||||
uiDefButS(block, TOG|BIT|4,0,"EnvMap", 626,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map renering");
|
uiDefButS(block, TOG|BIT|4,0,"EnvMap", 626,167,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable environment map renering");
|
||||||
uiDefButS(block, TOG|BIT|10,0,"Pano", 565,142,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
|
uiDefButS(block, TOG|BIT|10,0,"Pano", 565,142,61,22, &G.scene->r.mode, 0, 0, 0, 0, "Enable panorama rendering (output width is multiplied by Xparts)");
|
||||||
@@ -1105,19 +1058,17 @@ static void render_panel_anim()
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "render_panel_anim", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "render_panel_anim", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Anim", "Render", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Anim", "Render", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT,B_DOANIM,"ANIM", 692,142,192,47, 0, 0, 0, 0, 0, "Start rendering a sequence");
|
uiDefBut(block, BUT,B_DOANIM,"ANIM", 692,142,192,47, 0, 0, 0, 0, 0, "Start rendering a sequence");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0, 0, "Do Sequence", 692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
|
uiDefButS(block, TOG|BIT|0, 0, "Do Sequence", 692,114,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Enables sequence output rendering (Default: 3D rendering)");
|
||||||
uiDefButS(block, TOG|BIT|1, 0, "Render Daemon", 692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
|
uiDefButS(block, TOG|BIT|1, 0, "Render Daemon", 692,90,192,20, &G.scene->r.scemode, 0, 0, 0, 0, "Let external network render current scene");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT,B_PLAYANIM, "PLAY", 692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)");
|
uiDefBut(block, BUT,B_PLAYANIM, "PLAY", 692,40,94,33, 0, 0, 0, 0, 0, "Play animation of rendered images/avi (searches Pics: field)");
|
||||||
uiDefButS(block, NUM, B_RTCHANGED, "rt:", 790,40,95,33, &G.rt, 0.0, 256.0, 0, 0, "General testing/debug button");
|
uiDefButS(block, NUM, B_RTCHANGED, "rt:", 790,40,95,33, &G.rt, 0.0, 256.0, 0, 0, "General testing/debug button");
|
||||||
|
|
||||||
@@ -1132,7 +1083,7 @@ static void render_panel_format()
|
|||||||
int yofs;
|
int yofs;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "render_panel_format", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "render_panel_format", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Format", "Render", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Format", "Render", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiDefBlockBut(block, framing_render_menu, NULL, "Game framing settings |>> ", 892, 169, 227, 20, "Display game framing settings");
|
uiDefBlockBut(block, framing_render_menu, NULL, "Game framing settings |>> ", 892, 169, 227, 20, "Display game framing settings");
|
||||||
@@ -1148,15 +1099,11 @@ static void render_panel_format()
|
|||||||
#ifdef __sgi
|
#ifdef __sgi
|
||||||
yofs = 76;
|
yofs = 76;
|
||||||
uiDefButS(block, NUM,B_DIFF,"MaxSize:", 892,32,165,20, &G.scene->r.maximsize, 0.0, 500.0, 0, 0, "Maximum size per frame to save in an SGI movie");
|
uiDefButS(block, NUM,B_DIFF,"MaxSize:", 892,32,165,20, &G.scene->r.maximsize, 0.0, 500.0, 0, 0, "Maximum size per frame to save in an SGI movie");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|12,0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
|
uiDefButS(block, TOG|BIT|12,0,"Cosmo", 1059,32,60,20, &G.scene->r.mode, 0, 0, 0, 0, "Attempt to save SGI movies using Cosmo hardware");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(), 892,yofs,174,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
|
uiDefButS(block, MENU,B_FILETYPEMENU,imagetype_pup(), 892,yofs,174,20, &G.scene->r.imtype, 0, 0, 0, 0, "Images are saved in this file format");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|11,0, "Crop", 1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
|
uiDefButS(block, TOG|BIT|11,0, "Crop", 1068,yofs,51,20, &G.scene->r.mode, 0, 0, 0, 0, "Exclude border rendering from total image");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
yofs -= 22;
|
yofs -= 22;
|
||||||
|
|
||||||
@@ -1246,7 +1193,7 @@ void anim_panels()
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "anim_panels", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "anim_panels", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 320,17,93,27,&G.scene->r.sfra,1.0,18000.0, 0, 0, "Specify the start frame of the animation");
|
uiDefButS(block, NUM,REDRAWSEQ,"Sta:", 320,17,93,27,&G.scene->r.sfra,1.0,18000.0, 0, 0, "Specify the start frame of the animation");
|
||||||
uiDefButS(block, NUM,REDRAWSEQ,"End:", 416,17,95,27,&G.scene->r.efra,1.0,18000.0, 0, 0, "Specify the end frame of the animation");
|
uiDefButS(block, NUM,REDRAWSEQ,"End:", 416,17,95,27,&G.scene->r.efra,1.0,18000.0, 0, 0, "Specify the end frame of the animation");
|
||||||
@@ -1256,7 +1203,6 @@ void anim_panels()
|
|||||||
|
|
||||||
uiDefButS(block, NUM,REDRAWSEQ,"Frs/sec:", 320,47,93,19, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
|
uiDefButS(block, NUM,REDRAWSEQ,"Frs/sec:", 320,47,93,19, &G.scene->r.frs_sec, 1.0, 120.0, 100.0, 0, "Frames per second");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync", 416,47,95,19, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
|
uiDefButS(block, TOG|BIT|1, B_SOUND_CHANGED, "Sync", 416,47,95,19, &G.scene->audio.flag, 0, 0, 0, 0, "Use sample clock for syncing animation to audio");
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -228,8 +228,6 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce
|
|||||||
{
|
{
|
||||||
char str[256];
|
char str[256];
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if (script->totscript) {
|
if (script->totscript) {
|
||||||
strcpy(str, "FrameChanged%x 1|");
|
strcpy(str, "FrameChanged%x 1|");
|
||||||
strcat(str, "Redraw%x 4|");
|
strcat(str, "Redraw%x 4|");
|
||||||
@@ -245,8 +243,6 @@ void draw_scriptlink(uiBlock *block, ScriptLink *script, int sx, int sy, int sce
|
|||||||
sprintf(str,"%d Scr:", script->totscript);
|
sprintf(str,"%d Scr:", script->totscript);
|
||||||
uiDefButS(block, NUM, REDRAWBUTSSCRIPT, str, (short)(sx+140), (short)sy-20,60,19, &script->actscript, 1, script->totscript, 0, 0, "Total / Active Script link (LeftMouse + Drag to change)");
|
uiDefButS(block, NUM, REDRAWBUTSSCRIPT, str, (short)(sx+140), (short)sy-20,60,19, &script->actscript, 1, script->totscript, 0, 0, "Total / Active Script link (LeftMouse + Drag to change)");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
if (scene) {
|
if (scene) {
|
||||||
if (script->totscript<32767)
|
if (script->totscript<32767)
|
||||||
uiDefBut(block, BUT, B_SSCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
|
uiDefBut(block, BUT, B_SSCRIPT_ADD, "New", (short)(sx+240), (short)sy-20, 40, 19, 0, 0, 0, 0, 0, "Add a new Script link");
|
||||||
@@ -276,7 +272,7 @@ static void script_panel_scriptlink(void)
|
|||||||
Material *ma;
|
Material *ma;
|
||||||
int xco = 10;
|
int xco = 10;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "script_panel_scriptlink", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Scriptlinks", "Script", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -628,7 +628,7 @@ static void texture_panel_plugin(Tex *tex)
|
|||||||
PluginTex *pit;
|
PluginTex *pit;
|
||||||
short xco, yco, a;
|
short xco, yco, a;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_plugin", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_plugin", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Plugin", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Plugin", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
@@ -636,12 +636,10 @@ static void texture_panel_plugin(Tex *tex)
|
|||||||
|
|
||||||
pit= tex->plugin;
|
pit= tex->plugin;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
for(a=0; a<pit->stypes; a++) {
|
for(a=0; a<pit->stypes; a++) {
|
||||||
uiDefButS(block, ROW, B_MATPRV, pit->stnames+16*a, (350+75*a), 170, 75, 18, &tex->stype, 2.0, (float)a, 0, 0, "");
|
uiDefButS(block, ROW, B_MATPRV, pit->stnames+16*a, (350+75*a), 170, 75, 18, &tex->stype, 2.0, (float)a, 0, 0, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
varstr= pit->varstr;
|
varstr= pit->varstr;
|
||||||
if(varstr) {
|
if(varstr) {
|
||||||
for(a=0; a<pit->vars; a++, varstr++) {
|
for(a=0; a<pit->vars; a++, varstr++) {
|
||||||
@@ -654,7 +652,6 @@ static void texture_panel_plugin(Tex *tex)
|
|||||||
uiDefBut(block, TEX, B_NAMEPLUGIN, "", 350,130,290,24, pit->name, 0.0, 159.0, 0, 0, "");
|
uiDefBut(block, TEX, B_NAMEPLUGIN, "", 350,130,290,24, pit->name, 0.0, 159.0, 0, 0, "");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_LOADPLUGIN, "Load Plugin", 350,150,137,24, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, BUT, B_LOADPLUGIN, "Load Plugin", 350,150,137,24, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -664,11 +661,10 @@ static void texture_panel_magic(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_magic", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_magic", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Magic", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Magic", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Size :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the pattern");
|
uiDefButF(block, NUM, B_MATPRV, "Size :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the pattern");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "Depth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 10.0, 0, 0, "Set the depth of the pattern");
|
uiDefButS(block, NUM, B_MATPRV, "Depth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 10.0, 0, 0, "Set the depth of the pattern");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the strength of the pattern");
|
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the strength of the pattern");
|
||||||
@@ -678,11 +674,10 @@ static void texture_panel_blend(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_blend", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_blend", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Blend", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Blend", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Lin", 10, 180, 75, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use a linear progresion");
|
uiDefButS(block, ROW, B_MATPRV, "Lin", 10, 180, 75, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use a linear progresion");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Quad", 85, 180, 75, 19, &tex->stype, 2.0, 1.0, 0, 0, "Use a quadratic progression");
|
uiDefButS(block, ROW, B_MATPRV, "Quad", 85, 180, 75, 19, &tex->stype, 2.0, 1.0, 0, 0, "Use a quadratic progression");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Ease", 160, 180, 75, 19, &tex->stype, 2.0, 2.0, 0, 0, "");
|
uiDefButS(block, ROW, B_MATPRV, "Ease", 160, 180, 75, 19, &tex->stype, 2.0, 2.0, 0, 0, "");
|
||||||
@@ -700,11 +695,10 @@ static void texture_panel_wood(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_wood", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_wood", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Wood", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Wood", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Bands", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard wood texture");
|
uiDefButS(block, ROW, B_MATPRV, "Bands", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard wood texture");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Rings", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use wood rings");
|
uiDefButS(block, ROW, B_MATPRV, "Rings", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use wood rings");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "BandNoise", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Add noise to standard wood");
|
uiDefButS(block, ROW, B_MATPRV, "BandNoise", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Add noise to standard wood");
|
||||||
@@ -713,7 +707,6 @@ static void texture_panel_wood(Tex *tex)
|
|||||||
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 85, 160, 75, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 85, 160, 75, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 160, 130, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the bandnoise and ringnoise types");
|
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 160, 130, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the bandnoise and ringnoise types");
|
||||||
|
|
||||||
@@ -724,18 +717,16 @@ static void texture_panel_stucci(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_stucci", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_stucci", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Stucci", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Stucci", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Plastic", 10, 180, 100, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use standard stucci");
|
uiDefButS(block, ROW, B_MATPRV, "Plastic", 10, 180, 100, 19, &tex->stype, 2.0, 0.0, 0, 0, "Use standard stucci");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Wall In", 110, 180, 100, 19, &tex->stype, 2.0, 1.0, 0, 0, "Set start value");
|
uiDefButS(block, ROW, B_MATPRV, "Wall In", 110, 180, 100, 19, &tex->stype, 2.0, 1.0, 0, 0, "Set start value");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Wall Out", 210, 180, 100, 19, &tex->stype, 2.0, 2.0, 0, 0, "Set end value");
|
uiDefButS(block, ROW, B_MATPRV, "Wall Out", 210, 180, 100, 19, &tex->stype, 2.0, 2.0, 0, 0, "Set end value");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 90, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the depth of the stucci");
|
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 90, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the depth of the stucci");
|
||||||
}
|
}
|
||||||
@@ -744,11 +735,10 @@ static void texture_panel_marble(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_marble", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_marble", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Marble", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Marble", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Soft", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use soft marble");
|
uiDefButS(block, ROW, B_MATPRV, "Soft", 10, 180, 75, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use soft marble");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Sharp", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use more clearly defined marble");
|
uiDefButS(block, ROW, B_MATPRV, "Sharp", 85, 180, 75, 18, &tex->stype, 2.0, 1.0, 0, 0, "Use more clearly defined marble");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Sharper", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Use very clear defined marble");
|
uiDefButS(block, ROW, B_MATPRV, "Sharper", 160, 180, 75, 18, &tex->stype, 2.0, 2.0, 0, 0, "Use very clear defined marble");
|
||||||
@@ -756,7 +746,6 @@ static void texture_panel_marble(Tex *tex)
|
|||||||
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 10, 160, 100, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 110, 160, 100, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 110, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "NoiseDepth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the marble calculation");
|
uiDefButS(block, NUM, B_MATPRV, "NoiseDepth:", 10, 90, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the marble calculation");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the sine bands");
|
uiDefButF(block, NUM, B_MATPRV, "Turbulence:", 10, 70, 150, 19, &tex->turbul, 0.0, 200.0, 10, 0, "Set the turbulence of the sine bands");
|
||||||
@@ -768,17 +757,15 @@ static void texture_panel_clouds(Tex *tex)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_clouds", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_clouds", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Clouds", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Clouds", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Default", 10, 180, 70, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard noise");
|
uiDefButS(block, ROW, B_MATPRV, "Default", 10, 180, 70, 18, &tex->stype, 2.0, 0.0, 0, 0, "Use standard noise");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Color", 80, 180, 70, 18, &tex->stype, 2.0, 1.0, 0, 0, "Let Noise give RGB value");
|
uiDefButS(block, ROW, B_MATPRV, "Color", 80, 180, 70, 18, &tex->stype, 2.0, 1.0, 0, 0, "Let Noise give RGB value");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 155, 180, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
uiDefButS(block, ROW, B_MATPRV, "Soft noise", 155, 180, 75, 19, &tex->noisetype, 12.0, 0.0, 0, 0, "Use soft noise");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 230, 180, 80, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
uiDefButS(block, ROW, B_MATPRV, "Hard noise", 230, 180, 80, 19, &tex->noisetype, 12.0, 1.0, 0, 0, "Use hard noise");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
uiDefButF(block, NUM, B_MATPRV, "NoiseSize :", 10, 130, 150, 19, &tex->noisesize, 0.0001, 2.0, 10, 0, "Set the dimension of the noise table");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "NoiseDepth:", 160, 130, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the cloud calculation");
|
uiDefButS(block, NUM, B_MATPRV, "NoiseDepth:", 160, 130, 150, 19, &tex->noisedepth, 0.0, 6.0, 0, 0, "Set the depth of the cloud calculation");
|
||||||
|
|
||||||
@@ -793,7 +780,7 @@ static void texture_panel_envmap(Tex *tex)
|
|||||||
short a, xco, yco, dx, dy;
|
short a, xco, yco, dx, dy;
|
||||||
char *strp, str[32];
|
char *strp, str[32];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_envmap", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_envmap", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Envmap", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Envmap", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
@@ -804,49 +791,41 @@ static void texture_panel_envmap(Tex *tex)
|
|||||||
if(tex->env) {
|
if(tex->env) {
|
||||||
env= tex->env;
|
env= tex->env;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_REDR, "Static", 10, 180, 100, 19, &env->stype, 2.0, 0.0, 0, 0, "Calculate map only once");
|
uiDefButS(block, ROW, B_REDR, "Static", 10, 180, 100, 19, &env->stype, 2.0, 0.0, 0, 0, "Calculate map only once");
|
||||||
uiDefButS(block, ROW, B_REDR, "Anim", 110, 180, 100, 19, &env->stype, 2.0, 1.0, 0, 0, "Calculate map each rendering");
|
uiDefButS(block, ROW, B_REDR, "Anim", 110, 180, 100, 19, &env->stype, 2.0, 1.0, 0, 0, "Calculate map each rendering");
|
||||||
uiDefButS(block, ROW, B_ENV_FREE, "Load", 210, 180, 100, 19, &env->stype, 2.0, 2.0, 0, 0, "Load map from disk");
|
uiDefButS(block, ROW, B_ENV_FREE, "Load", 210, 180, 100, 19, &env->stype, 2.0, 2.0, 0, 0, "Load map from disk");
|
||||||
|
|
||||||
if(env->stype==ENV_LOAD) {
|
if(env->stype==ENV_LOAD) {
|
||||||
/* file input */
|
/* file input */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
id= (ID *)tex->ima;
|
id= (ID *)tex->ima;
|
||||||
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
|
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
|
||||||
if(strp[0])
|
if(strp[0])
|
||||||
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
|
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
|
||||||
MEM_freeN(strp);
|
MEM_freeN(strp);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_LOADTEXIMA1, "Load Image", 10,115,130,20, 0, 0, 0, 0, 0, "Load image - file view");
|
uiDefBut(block, BUT, B_LOADTEXIMA1, "Load Image", 10,115,130,20, 0, 0, 0, 0, 0, "Load image - file view");
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
uiDefBut(block, BUT, B_LOADTEXIMA, "", 140,115,20,20, 0, 0, 0, 0, 0, "Load image - thumb view");
|
uiDefBut(block, BUT, B_LOADTEXIMA, "", 140,115,20,20, 0, 0, 0, 0, 0, "Load image - thumb view");
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
if(tex->ima) {
|
if(tex->ima) {
|
||||||
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
|
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
|
||||||
sprintf(str, "%d", tex->ima->id.us);
|
sprintf(str, "%d", tex->ima->id.us);
|
||||||
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
|
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
|
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
|
||||||
|
|
||||||
if (tex->ima->packedfile) packdummy = 1;
|
if (tex->ima->packedfile) packdummy = 1;
|
||||||
else packdummy = 0;
|
else packdummy = 0;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
|
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_ENV_FREE, "Free Data", 10,135,100,20, 0, 0, 0, 0, 0, "Release all images associated with environment map");
|
uiDefBut(block, BUT, B_ENV_FREE, "Free Data", 10,135,100,20, 0, 0, 0, 0, 0, "Release all images associated with environment map");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, BUT, B_ENV_SAVE, "Save EnvMap", 110,135,100,20, 0, 0, 0, 0, 0, "Save environment map");
|
uiDefBut(block, BUT, B_ENV_SAVE, "Save EnvMap", 110,135,100,20, 0, 0, 0, 0, 0, "Save environment map");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_ENV_FREE_ALL, "Free all EnvMaps", 210,135,100,20, 0, 0, 0, 0, 0, "Frees all rendered environment maps");
|
uiDefBut(block, BUT, B_ENV_FREE_ALL, "Free all EnvMaps", 210,135,100,20, 0, 0, 0, 0, 0, "Frees all rendered environment maps");
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, B_ENV_OB, "Ob:", 10,90,150,20, &(env->object), "Object name");
|
uiDefIDPoinBut(block, test_obpoin_but, B_ENV_OB, "Ob:", 10,90,150,20, &(env->object), "Object name");
|
||||||
if(env->stype!=ENV_LOAD)
|
if(env->stype!=ENV_LOAD)
|
||||||
uiDefButS(block, NUM, B_ENV_FREE, "CubeRes", 160,90,150,20, &env->cuberes, 50, 2048.0, 0, 0, "Set the resolution in pixels");
|
uiDefButS(block, NUM, B_ENV_FREE, "CubeRes", 160,90,150,20, &env->cuberes, 50, 2048.0, 0, 0, "Set the resolution in pixels");
|
||||||
@@ -877,7 +856,7 @@ static void texture_panel_image1(Tex *tex)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel1", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel1", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Crop and Anim", "Texture", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Crop and Anim", "Texture", 960, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
@@ -908,7 +887,6 @@ static void texture_panel_image1(Tex *tex)
|
|||||||
uiDefButS(block, NUM, B_MATPRV, "Fra:", 802,10,73,19, &(tex->fradur[3][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
|
uiDefButS(block, NUM, B_MATPRV, "Fra:", 802,10,73,19, &(tex->fradur[3][0]), 0.0, 18000.0, 0, 0, "Montage mode: frame start");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "", 879,10,37,19, &(tex->fradur[3][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
|
uiDefButS(block, NUM, B_MATPRV, "", 879,10,37,19, &(tex->fradur[3][1]), 0.0, 250.0, 0, 0, "Montage mode: amount of displayed frames");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|6, 0, "Cyclic", 743,60,48,19, &tex->imaflag, 0, 0, 0, 0, "Repeat animation image");
|
uiDefButS(block, TOG|BIT|6, 0, "Cyclic", 743,60,48,19, &tex->imaflag, 0, 0, 0, 0, "Repeat animation image");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -920,13 +898,11 @@ static void texture_panel_image(Tex *tex)
|
|||||||
ID *id;
|
ID *id;
|
||||||
char *strp, str[32];
|
char *strp, str[32];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_image", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_image", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Image", "Texture", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Image", "Texture", 640, 0, 318, 204)==0) return;
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
/* types */
|
/* types */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|0, 0, "InterPol", 10, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Interpolate pixels of the image");
|
uiDefButS(block, TOG|BIT|0, 0, "InterPol", 10, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Interpolate pixels of the image");
|
||||||
uiDefButS(block, TOG|BIT|1, B_MATPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Use the alpha layer");
|
uiDefButS(block, TOG|BIT|1, B_MATPRV, "UseAlpha", 85, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Use the alpha layer");
|
||||||
uiDefButS(block, TOG|BIT|5, B_MATPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Calculate an alpha based on the RGB");
|
uiDefButS(block, TOG|BIT|5, B_MATPRV, "CalcAlpha", 160, 180, 75, 18, &tex->imaflag, 0, 0, 0, 0, "Calculate an alpha based on the RGB");
|
||||||
@@ -940,31 +916,26 @@ static void texture_panel_image(Tex *tex)
|
|||||||
uiDefButS(block, TOG|BIT|10, 0, "StField", 260, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "");
|
uiDefButS(block, TOG|BIT|10, 0, "StField", 260, 160, 50, 18, &tex->imaflag, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
/* file input */
|
/* file input */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
id= (ID *)tex->ima;
|
id= (ID *)tex->ima;
|
||||||
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
|
IDnames_to_pupstring(&strp, NULL, NULL, &(G.main->image), id, &(G.buts->menunr));
|
||||||
if(strp[0])
|
if(strp[0])
|
||||||
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
|
uiDefButS(block, MENU, B_TEXIMABROWSE, strp, 10,135,23,20, &(G.buts->menunr), 0, 0, 0, 0, "Browse");
|
||||||
MEM_freeN(strp);
|
MEM_freeN(strp);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_LOADTEXIMA1, "Load Image", 10,115,130,20, 0, 0, 0, 0, 0, "Load image - file view");
|
uiDefBut(block, BUT, B_LOADTEXIMA1, "Load Image", 10,115,130,20, 0, 0, 0, 0, 0, "Load image - file view");
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefBut(block, BUT, B_LOADTEXIMA, "", 140,115,20,20, 0, 0, 0, 0, 0, "Load image - thumb view");
|
uiDefBut(block, BUT, B_LOADTEXIMA, "", 140,115,20,20, 0, 0, 0, 0, 0, "Load image - thumb view");
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if(tex->ima) {
|
if(tex->ima) {
|
||||||
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
|
uiDefBut(block, TEX, B_NAMEIMA, "", 35,135,255,20, tex->ima->name, 0.0, 79.0, 0, 0, "Texture name");
|
||||||
sprintf(str, "%d", tex->ima->id.us);
|
sprintf(str, "%d", tex->ima->id.us);
|
||||||
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
|
uiDefBut(block, BUT, 0, str, 290,135,20,20, 0, 0, 0, 0, 0, "Number of users");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
|
uiDefBut(block, BUT, B_RELOADIMA, "Reload", 230,115,80,20, 0, 0, 0, 0, 0, "Reload");
|
||||||
|
|
||||||
if (tex->ima->packedfile) packdummy = 1;
|
if (tex->ima->packedfile) packdummy = 1;
|
||||||
else packdummy = 0;
|
else packdummy = 0;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
|
uiDefIconButI(block, TOG|BIT|0, B_PACKIMA, ICON_PACKAGE, 205,115,24,20, &packdummy, 0, 0, 0, 0, "Pack/Unpack this Image");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -972,13 +943,11 @@ static void texture_panel_image(Tex *tex)
|
|||||||
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "Filter :", 10,92,135,19, &tex->filtersize, 0.1, 25.0, 0, 0, "Set the filter size used by mipmap and interpol");
|
uiDefButF(block, NUM, B_MATPRV, "Filter :", 10,92,135,19, &tex->filtersize, 0.1, 25.0, 0, 0, "Set the filter size used by mipmap and interpol");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, 0, "Extend", 10,70,75,19, &tex->extend, 4.0, 1.0, 0, 0, "Extend the colour of the edge");
|
uiDefButS(block, ROW, 0, "Extend", 10,70,75,19, &tex->extend, 4.0, 1.0, 0, 0, "Extend the colour of the edge");
|
||||||
uiDefButS(block, ROW, 0, "Clip", 85,70,75,19, &tex->extend, 4.0, 2.0, 0, 0, "Return alpha 0.0 outside image");
|
uiDefButS(block, ROW, 0, "Clip", 85,70,75,19, &tex->extend, 4.0, 2.0, 0, 0, "Return alpha 0.0 outside image");
|
||||||
uiDefButS(block, ROW, 0, "ClipCube", 160,70,75,19, &tex->extend, 4.0, 4.0, 0, 0, "Return alpha 0.0 outside cubeshaped area around image");
|
uiDefButS(block, ROW, 0, "ClipCube", 160,70,75,19, &tex->extend, 4.0, 4.0, 0, 0, "Return alpha 0.0 outside cubeshaped area around image");
|
||||||
uiDefButS(block, ROW, 0, "Repeat", 235,70,75,19, &tex->extend, 4.0, 3.0, 0, 0, "Repeat image horizontally and vertically");
|
uiDefButS(block, ROW, 0, "Repeat", 235,70,75,19, &tex->extend, 4.0, 3.0, 0, 0, "Repeat image horizontally and vertically");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_MATPRV, "Xrepeat:", 10,50,150,19, &tex->xrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the X direction");
|
uiDefButS(block, NUM, B_MATPRV, "Xrepeat:", 10,50,150,19, &tex->xrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the X direction");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "Yrepeat:", 160,50,150,19, &tex->yrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the Y direction");
|
uiDefButS(block, NUM, B_MATPRV, "Yrepeat:", 160,50,150,19, &tex->yrepeat, 1.0, 512.0, 0, 0, "Set the degree of repetition in the Y direction");
|
||||||
|
|
||||||
@@ -1005,33 +974,27 @@ static void texture_panel_colors(Tex *tex)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
CBData *cbd;
|
CBData *cbd;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_colors", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_colors", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Texture", "Texture");
|
uiNewPanelTabbed("Texture", "Texture");
|
||||||
if(uiNewPanel(curarea, block, "Colors", "Texture", 1280, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Colors", "Texture", 1280, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
|
|
||||||
/* COLORBAND */
|
/* COLORBAND */
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_COLORBAND, "Colorband",10,180,100,20, &tex->flag, 0, 0, 0, 0, "Use colorband");
|
uiDefButS(block, TOG|BIT|0, B_COLORBAND, "Colorband",10,180,100,20, &tex->flag, 0, 0, 0, 0, "Use colorband");
|
||||||
|
|
||||||
if(tex->flag & TEX_COLORBAND) {
|
if(tex->flag & TEX_COLORBAND) {
|
||||||
uiDefBut(block, BUT, B_ADDCOLORBAND, "Add", 110,180,50,20, 0, 0, 0, 0, 0, "Add new colour to the colorband");
|
uiDefBut(block, BUT, B_ADDCOLORBAND, "Add", 110,180,50,20, 0, 0, 0, 0, 0, "Add new colour to the colorband");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_REDR, "Cur:", 160,180,100,20, &tex->coba->cur, 0.0, (float)(tex->coba->tot-1), 0, 0, "The active colour from the colorband");
|
uiDefButS(block, NUM, B_REDR, "Cur:", 160,180,100,20, &tex->coba->cur, 0.0, (float)(tex->coba->tot-1), 0, 0, "The active colour from the colorband");
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_DELCOLORBAND, "Del", 260,180,50,20, 0, 0, 0, 0, 0, "Delete the active colour");
|
uiDefBut(block, BUT, B_DELCOLORBAND, "Del", 260,180,50,20, 0, 0, 0, 0, 0, "Delete the active colour");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, LABEL, B_DOCOLORBAND, "", 10,150,300,20, 0, 0, 0, 0, 0, "Colorband"); /* only for event! */
|
uiDefBut(block, LABEL, B_DOCOLORBAND, "", 10,150,300,20, 0, 0, 0, 0, 0, "Colorband"); /* only for event! */
|
||||||
|
|
||||||
uiBlockSetDrawExtraFunc(block, drawcolorband_cb);
|
uiBlockSetDrawExtraFunc(block, drawcolorband_cb);
|
||||||
cbd= tex->coba->data + tex->coba->cur;
|
cbd= tex->coba->data + tex->coba->cur;
|
||||||
|
|
||||||
uiDefButF(block, NUM, B_CALCCBAND, "Pos", 10,120,80,20, &cbd->pos, 0.0, 1.0, 10, 0, "Set the position of the active colour");
|
uiDefButF(block, NUM, B_CALCCBAND, "Pos", 10,120,80,20, &cbd->pos, 0.0, 1.0, 10, 0, "Set the position of the active colour");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "E", 90,120,20,20, &tex->coba->ipotype, 5.0, 1.0, 0, 0, "Interpolation type Ease");
|
uiDefButS(block, ROW, B_MATPRV, "E", 90,120,20,20, &tex->coba->ipotype, 5.0, 1.0, 0, 0, "Interpolation type Ease");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "L", 110,120,20,20, &tex->coba->ipotype, 5.0, 0.0, 0, 0, "Interpolation type Linear");
|
uiDefButS(block, ROW, B_MATPRV, "L", 110,120,20,20, &tex->coba->ipotype, 5.0, 0.0, 0, 0, "Interpolation type Linear");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "S", 130,120,20,20, &tex->coba->ipotype, 5.0, 2.0, 0, 0, "Interpolation type Spline");
|
uiDefButS(block, ROW, B_MATPRV, "S", 130,120,20,20, &tex->coba->ipotype, 5.0, 2.0, 0, 0, "Interpolation type Spline");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, COL, B_BANDCOL, "", 150,120,30,20, &(cbd->r), 0, 0, 0, 0, "");
|
uiDefButF(block, COL, B_BANDCOL, "", 150,120,30,20, &(cbd->r), 0, 0, 0, 0, "");
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "A ", 180,120,130,20, &cbd->a, 0.0, 1.0, 0, 0, "Set the alpha value");
|
uiDefButF(block, NUMSLI, B_MATPRV, "A ", 180,120,130,20, &cbd->a, 0.0, 1.0, 0, 0, "Set the alpha value");
|
||||||
|
|
||||||
@@ -1042,7 +1005,6 @@ static void texture_panel_colors(Tex *tex)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* RGB-BRICON */
|
/* RGB-BRICON */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
if((tex->flag & TEX_COLORBAND)==0) {
|
if((tex->flag & TEX_COLORBAND)==0) {
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 60,80,200,20, &tex->rfac, 0.0, 2.0, 0, 0, "Set the red value");
|
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 60,80,200,20, &tex->rfac, 0.0, 2.0, 0, 0, "Set the red value");
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 60,60,200,20, &tex->gfac, 0.0, 2.0, 0, 0, "Set the green value");
|
uiDefButF(block, NUMSLI, B_MATPRV, "G ", 60,60,200,20, &tex->gfac, 0.0, 2.0, 0, 0, "Set the green value");
|
||||||
@@ -1064,13 +1026,13 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
|
|||||||
char str[32], *strp;
|
char str[32], *strp;
|
||||||
|
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_texture", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_texture", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Texture", "Texture", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Texture", "Texture", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* first do the browse but */
|
/* first do the browse but */
|
||||||
buttons_active_id(&id, &idfrom);
|
buttons_active_id(&id, &idfrom);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
if(ma) {
|
if(ma) {
|
||||||
std_libbuttons(block, 10, 180, 0, NULL, B_TEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
|
std_libbuttons(block, 10, 180, 0, NULL, B_TEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
|
||||||
}
|
}
|
||||||
@@ -1080,7 +1042,7 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
|
|||||||
else if(la) {
|
else if(la) {
|
||||||
std_libbuttons(block, 10, 180, 0, NULL, B_LTEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
|
std_libbuttons(block, 10, 180, 0, NULL, B_LTEXBROWSE, id, idfrom, &(G.buts->texnr), B_TEXALONE, B_TEXLOCAL, B_TEXDELETE, B_AUTOTEXNAME, B_KEEPDATA);
|
||||||
}
|
}
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
/* From button: removed */
|
/* From button: removed */
|
||||||
|
|
||||||
@@ -1116,8 +1078,6 @@ static void texture_panel_texture(MTex *mtex, Material *ma, World *wrld, Lamp *l
|
|||||||
Tex *tex= mtex->tex;
|
Tex *tex= mtex->tex;
|
||||||
int xco;
|
int xco;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
uiSetButLock(tex->id.lib!=0, "Can't edit library data");
|
||||||
xco= 275;
|
xco= 275;
|
||||||
uiDefButS(block, ROW, B_TEXTYPE, texstr[0], 160, 110, 70, 20, &tex->type, 1.0, 0.0, 0, 0, "Default");
|
uiDefButS(block, ROW, B_TEXTYPE, texstr[0], 160, 110, 70, 20, &tex->type, 1.0, 0.0, 0, 0, "Default");
|
||||||
@@ -1148,7 +1108,7 @@ static void texture_panel_preview(int preview)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "texture_panel_preview", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "texture_panel_preview", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Preview", "Texture", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Preview", "Texture", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(preview) uiBlockSetDrawExtraFunc(block, BIF_previewdraw);
|
if(preview) uiBlockSetDrawExtraFunc(block, BIF_previewdraw);
|
||||||
@@ -1156,8 +1116,6 @@ static void texture_panel_preview(int preview)
|
|||||||
// label to force a boundbox for buttons not to be centered
|
// label to force a boundbox for buttons not to be centered
|
||||||
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButC(block, ROW, B_TEXREDR_PRV, "Mat", 200,175,80,25, &G.buts->texfrom, 3.0, 0.0, 0, 0, "Display the texture of the active material");
|
uiDefButC(block, ROW, B_TEXREDR_PRV, "Mat", 200,175,80,25, &G.buts->texfrom, 3.0, 0.0, 0, 0, "Display the texture of the active material");
|
||||||
uiDefButC(block, ROW, B_TEXREDR_PRV, "World", 200,150,80,25, &G.buts->texfrom, 3.0, 1.0, 0, 0, "Display the texture of the world block");
|
uiDefButC(block, ROW, B_TEXREDR_PRV, "World", 200,150,80,25, &G.buts->texfrom, 3.0, 1.0, 0, 0, "Display the texture of the world block");
|
||||||
uiDefButC(block, ROW, B_TEXREDR_PRV, "Lamp", 200,125,80,25, &G.buts->texfrom, 3.0, 2.0, 0, 0, "Display the texture of the lamp");
|
uiDefButC(block, ROW, B_TEXREDR_PRV, "Lamp", 200,125,80,25, &G.buts->texfrom, 3.0, 2.0, 0, 0, "Display the texture of the lamp");
|
||||||
@@ -1298,33 +1256,32 @@ static void radio_panel_calculation(Radio *rad, int flag)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "radio_panel_calculation", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "radio_panel_calculation", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Calculation", "Radio", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Calculation", "Radio", 640, 0, 318, 204)==0) return;
|
||||||
uiAutoBlock(block, 10, 10, 300, 200, UI_BLOCK_ROWS);
|
uiAutoBlock(block, 10, 10, 300, 200, UI_BLOCK_ROWS);
|
||||||
|
|
||||||
if(flag == RAD_PHASE_PATCHES) uiBlockSetCol(block, BUTSALMON);
|
if(flag != RAD_PHASE_PATCHES) uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
uiDefBut(block, BUT, B_RAD_GO, "GO", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Start the radiosity simulation");
|
uiDefBut(block, BUT, B_RAD_GO, "GO", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Start the radiosity simulation");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButS(block, NUM, 0, "SubSh Patch:", 1, 0, 10, 10, &rad->subshootp, 0.0, 10.0, 0, 0, "Set the number of times the environment is tested to detect pathes");
|
uiDefButS(block, NUM, 0, "SubSh Patch:", 1, 0, 10, 10, &rad->subshootp, 0.0, 10.0, 0, 0, "Set the number of times the environment is tested to detect pathes");
|
||||||
uiDefButS(block, NUM, 0, "SubSh Element:", 1, 0, 10, 10, &rad->subshoote, 0.0, 10.0, 0, 0, "Set the number of times the environment is tested to detect elements");
|
uiDefButS(block, NUM, 0, "SubSh Element:", 1, 0, 10, 10, &rad->subshoote, 0.0, 10.0, 0, 0, "Set the number of times the environment is tested to detect elements");
|
||||||
|
|
||||||
if(flag == RAD_PHASE_PATCHES) uiBlockSetCol(block, BUTSALMON);
|
if(flag != RAD_PHASE_PATCHES) uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
else uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefBut(block, BUT, B_RAD_SHOOTE, "Subdiv Shoot Element", 2, 0, 10, 10, NULL, 0, 0, 0, 0, "For pre-subdivision, detect high energy changes and subdivide Elements");
|
uiDefBut(block, BUT, B_RAD_SHOOTE, "Subdiv Shoot Element", 2, 0, 10, 10, NULL, 0, 0, 0, 0, "For pre-subdivision, detect high energy changes and subdivide Elements");
|
||||||
uiDefBut(block, BUT, B_RAD_SHOOTP, "Subdiv Shoot Patch", 2, 0, 10, 10, NULL, 0, 0, 0, 0, "For pre-subdivision, Detect high energy changes and subdivide Patches");
|
uiDefBut(block, BUT, B_RAD_SHOOTP, "Subdiv Shoot Patch", 2, 0, 10, 10, NULL, 0, 0, 0, 0, "For pre-subdivision, Detect high energy changes and subdivide Patches");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButI(block, NUM, 0, "MaxEl:", 3, 0, 10, 10, &rad->maxnode, 1.0, 250000.0, 0, 0, "Set the maximum allowed number of elements");
|
uiDefButI(block, NUM, 0, "MaxEl:", 3, 0, 10, 10, &rad->maxnode, 1.0, 250000.0, 0, 0, "Set the maximum allowed number of elements");
|
||||||
uiDefButS(block, NUM, 0, "Max Subdiv Shoot:", 3, 0, 10, 10, &rad->maxsublamp, 1.0, 250.0, 0, 0, "Set the maximum number of initial shoot patches that are evaluated");
|
uiDefButS(block, NUM, 0, "Max Subdiv Shoot:", 3, 0, 10, 10, &rad->maxsublamp, 1.0, 250.0, 0, 0, "Set the maximum number of initial shoot patches that are evaluated");
|
||||||
|
|
||||||
if(flag & RAD_PHASE_FACES) uiBlockSetCol(block, BUTSALMON);
|
if(flag & RAD_PHASE_FACES);
|
||||||
else uiBlockSetCol(block, BUTGREY);
|
else uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
uiDefBut(block, BUT, B_RAD_FACEFILT, "FaceFilter", 4, 0, 10, 10, NULL, 0, 0, 0, 0, "Force an extra smoothing");
|
uiDefBut(block, BUT, B_RAD_FACEFILT, "FaceFilter", 4, 0, 10, 10, NULL, 0, 0, 0, 0, "Force an extra smoothing");
|
||||||
uiDefBut(block, BUT, B_RAD_NODEFILT, "Element Filter", 4, 0, 10, 10, NULL, 0, 0, 0, 0, "Filter elements to remove aliasing artefacts");
|
uiDefBut(block, BUT, B_RAD_NODEFILT, "Element Filter", 4, 0, 10, 10, NULL, 0, 0, 0, 0, "Filter elements to remove aliasing artefacts");
|
||||||
|
|
||||||
uiDefBut(block, BUT, B_RAD_NODELIM, "RemoveDoubles", 5, 0, 30, 10, NULL, 0.0, 50.0, 0, 0, "Join elements which differ less than 'Lim'");
|
uiDefBut(block, BUT, B_RAD_NODELIM, "RemoveDoubles", 5, 0, 30, 10, NULL, 0.0, 50.0, 0, 0, "Join elements which differ less than 'Lim'");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButS(block, NUM, 0, "Lim:", 5, 0, 10, 10, &rad->nodelim, 0.0, 50.0, 0, 0, "Set the range for removing doubles");
|
uiDefButS(block, NUM, 0, "Lim:", 5, 0, 10, 10, &rad->nodelim, 0.0, 50.0, 0, 0, "Set the range for removing doubles");
|
||||||
|
|
||||||
|
|
||||||
@@ -1334,40 +1291,34 @@ static void radio_panel_tool(Radio *rad, int flag)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "radio_panel_tool", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "radio_panel_tool", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Radio Tool", "Radio", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Radio Tool", "Radio", 320, 0, 318, 204)==0) return;
|
||||||
uiAutoBlock(block, 10, 10, 300, 200, UI_BLOCK_ROWS);
|
uiAutoBlock(block, 10, 10, 300, 200, UI_BLOCK_ROWS);
|
||||||
|
|
||||||
if(flag & RAD_PHASE_PATCHES) uiBlockSetCol(block, BUTPURPLE);
|
if(flag & RAD_PHASE_PATCHES) uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
else uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_RAD_COLLECT, "Collect Meshes", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Convert selected and visible meshes to patches");
|
uiDefBut(block, BUT, B_RAD_COLLECT, "Collect Meshes", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Convert selected and visible meshes to patches");
|
||||||
|
|
||||||
if(flag & RAD_PHASE_PATCHES) uiBlockSetCol(block, BUTSALMON);
|
if(flag & RAD_PHASE_PATCHES)uiBlockSetCol(block, TH_AUTO);
|
||||||
else uiBlockSetCol(block, BUTGREY);
|
else uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
uiDefBut(block, BUT, B_RAD_FREE, "Free Radio Data", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Release all memory used by Radiosity");
|
uiDefBut(block, BUT, B_RAD_FREE, "Free Radio Data", 0, 0, 10, 15, NULL, 0, 0, 0, 0, "Release all memory used by Radiosity");
|
||||||
|
|
||||||
if(flag & RAD_PHASE_FACES) uiBlockSetCol(block, BUTSALMON);
|
if(flag & RAD_PHASE_FACES) uiBlockSetCol(block, TH_AUTO);
|
||||||
else uiBlockSetCol(block, BUTGREY);
|
else uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
uiDefBut(block, BUT, B_RAD_REPLACE, "Replace Meshes", 1, 0, 10, 12, NULL, 0, 0, 0, 0, "Convert meshes to Mesh objects with vertex colours, changing input-meshes");
|
uiDefBut(block, BUT, B_RAD_REPLACE, "Replace Meshes", 1, 0, 10, 12, NULL, 0, 0, 0, 0, "Convert meshes to Mesh objects with vertex colours, changing input-meshes");
|
||||||
uiDefBut(block, BUT, B_RAD_ADDMESH, "Add new Meshes", 1, 0, 10, 12, NULL, 0, 0, 0, 0, "Convert meshes to Mesh objects with vertex colours, unchanging input-meshes");
|
uiDefBut(block, BUT, B_RAD_ADDMESH, "Add new Meshes", 1, 0, 10, 12, NULL, 0, 0, 0, 0, "Convert meshes to Mesh objects with vertex colours, unchanging input-meshes");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButS(block, ROW, B_RAD_DRAW, "Wire", 2, 0, 10, 10, &rad->drawtype, 0.0, 0.0, 0, 0, "Enable wireframe drawmode");
|
uiDefButS(block, ROW, B_RAD_DRAW, "Wire", 2, 0, 10, 10, &rad->drawtype, 0.0, 0.0, 0, 0, "Enable wireframe drawmode");
|
||||||
uiDefButS(block, ROW, B_RAD_DRAW, "Solid", 2, 0, 10, 10, &rad->drawtype, 0.0, 1.0, 0, 0, "Enable solid drawmode");
|
uiDefButS(block, ROW, B_RAD_DRAW, "Solid", 2, 0, 10, 10, &rad->drawtype, 0.0, 1.0, 0, 0, "Enable solid drawmode");
|
||||||
uiDefButS(block, ROW, B_RAD_DRAW, "Gour", 2, 0, 10, 10, &rad->drawtype, 0.0, 2.0, 0, 0, "Enable Gourad drawmode");
|
uiDefButS(block, ROW, B_RAD_DRAW, "Gour", 2, 0, 10, 10, &rad->drawtype, 0.0, 2.0, 0, 0, "Enable Gourad drawmode");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_RAD_DRAW, "ShowLim", 2, 0, 10, 10, &rad->flag, 0, 0, 0, 0, "Visualize patch and element limits");
|
uiDefButS(block, TOG|BIT|0, B_RAD_DRAW, "ShowLim", 2, 0, 10, 10, &rad->flag, 0, 0, 0, 0, "Visualize patch and element limits");
|
||||||
uiDefButS(block, TOG|BIT|1, B_RAD_DRAW, "Z", 2, 0, 3, 10, &rad->flag, 0, 0, 0, 0, "Draw limits different");
|
uiDefButS(block, TOG|BIT|1, B_RAD_DRAW, "Z", 2, 0, 3, 10, &rad->flag, 0, 0, 0, 0, "Draw limits different");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMax:", 3, 0, 10, 10, &rad->elma, 1.0, 500.0, 0, 0, "Set maximum size of an element");
|
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMax:", 3, 0, 10, 10, &rad->elma, 1.0, 500.0, 0, 0, "Set maximum size of an element");
|
||||||
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMin:", 3, 0, 10, 10, &rad->elmi, 1.0, 100.0, 0, 0, "Set minimum size of an element");
|
uiDefButS(block, NUM, B_RAD_LIMITS, "ElMin:", 3, 0, 10, 10, &rad->elmi, 1.0, 100.0, 0, 0, "Set minimum size of an element");
|
||||||
uiDefButS(block, NUM, B_RAD_LIMITS, "PaMax:", 3, 0, 10, 10, &rad->pama, 10.0, 1000.0, 0, 0, "Set maximum size of a patch");
|
uiDefButS(block, NUM, B_RAD_LIMITS, "PaMax:", 3, 0, 10, 10, &rad->pama, 10.0, 1000.0, 0, 0, "Set maximum size of a patch");
|
||||||
uiDefButS(block, NUM, B_RAD_LIMITS, "PaMin:", 3, 0, 10, 10, &rad->pami, 10.0, 1000.0, 0, 0, "Set minimum size of a patch");
|
uiDefButS(block, NUM, B_RAD_LIMITS, "PaMin:", 3, 0, 10, 10, &rad->pami, 10.0, 1000.0, 0, 0, "Set minimum size of a patch");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_RAD_INIT, "Limit Subdivide", 5, 0, 10, 10, NULL, 0, 0, 0, 0, "Subdivide patches");
|
uiDefBut(block, BUT, B_RAD_INIT, "Limit Subdivide", 5, 0, 10, 10, NULL, 0, 0, 0, 0, "Subdivide patches");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1376,11 +1327,10 @@ static void radio_panel_render(Radio *rad)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "radio_panel_render", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "radio_panel_render", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Radio Render", "Radio", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Radio Render", "Radio", 0, 0, 318, 204)==0) return;
|
||||||
uiAutoBlock(block, 210, 30, 230, 150, UI_BLOCK_ROWS);
|
uiAutoBlock(block, 210, 30, 230, 150, UI_BLOCK_ROWS);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, NUMSLI, B_RAD_LIMITS, "Hemires:", 0, 0, 10, 10, &rad->hemires, 100.0, 1000.0, 100, 0, "Set the size of a hemicube");
|
uiDefButS(block, NUMSLI, B_RAD_LIMITS, "Hemires:", 0, 0, 10, 10, &rad->hemires, 100.0, 1000.0, 100, 0, "Set the size of a hemicube");
|
||||||
uiDefButS(block, NUM, 0, "Max Iterations:", 2, 0, 10, 15, &rad->maxiter, 0.0, 10000.0, 0, 0, "Maximum number of radiosity rounds");
|
uiDefButS(block, NUM, 0, "Max Iterations:", 2, 0, 10, 15, &rad->maxiter, 0.0, 10000.0, 0, 0, "Maximum number of radiosity rounds");
|
||||||
uiDefButF(block, NUM, B_RAD_FAC, "Mult:", 3, 0, 10, 15, &rad->radfac, 0.001, 250.0, 100, 0, "Mulitply the energy values");
|
uiDefButF(block, NUM, B_RAD_FAC, "Mult:", 3, 0, 10, 15, &rad->radfac, 0.001, 250.0, 100, 0, "Mulitply the energy values");
|
||||||
@@ -1417,7 +1367,7 @@ static void world_panel_mapto(World *wrld)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
MTex *mtex;
|
MTex *mtex;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "world_panel_mapto", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "world_panel_mapto", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Texture and Input", "World");
|
uiNewPanelTabbed("Texture and Input", "World");
|
||||||
if(uiNewPanel(curarea, block, "Map To", "World", 1280, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Map To", "World", 1280, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
@@ -1442,13 +1392,11 @@ static void world_panel_mapto(World *wrld)
|
|||||||
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "The value that an intensity texture blends with the current value");
|
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "The value that an intensity texture blends with the current value");
|
||||||
|
|
||||||
/* MAP TO */
|
/* MAP TO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Blend", 1087,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour progression in the sky");
|
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Blend", 1087,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour progression in the sky");
|
||||||
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 1172,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the horizon");
|
uiDefButS(block, TOG|BIT|1, B_MATPRV, "Hori", 1172,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the horizon");
|
||||||
uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 1087,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith above");
|
uiDefButS(block, TOG|BIT|2, B_MATPRV, "ZenUp", 1087,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith above");
|
||||||
uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 1172,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith below");
|
uiDefButS(block, TOG|BIT|3, B_MATPRV, "ZenDo", 1172,147,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture work on the colour of the zenith below");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values");
|
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values");
|
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values");
|
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values");
|
||||||
@@ -1468,13 +1416,13 @@ static void world_panel_texture(World *wrld)
|
|||||||
int a, loos;
|
int a, loos;
|
||||||
char str[64], *strp;
|
char str[64], *strp;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "world_panel_texture", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "world_panel_texture", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Texture and Input", "World", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Texture and Input", "World", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
/* TEX CHANNELS */
|
/* TEX CHANNELS */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
|
|
||||||
for(a= 0; a<6; a++) {
|
for(a= 0; a<6; a++) {
|
||||||
mtex= wrld->mtex[a];
|
mtex= wrld->mtex[a];
|
||||||
@@ -1492,6 +1440,7 @@ static void world_panel_texture(World *wrld)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TEXTUREBLOCK SELECT */
|
/* TEXTUREBLOCK SELECT */
|
||||||
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
id= (ID *)mtex->tex;
|
id= (ID *)mtex->tex;
|
||||||
IDnames_to_pupstring(&strp, NULL, "ADD NEW %x 32767", &(G.main->tex), id, &(G.buts->texnr));
|
IDnames_to_pupstring(&strp, NULL, "ADD NEW %x 32767", &(G.main->tex), id, &(G.buts->texnr));
|
||||||
uiDefButS(block, MENU, B_WTEXBROWSE, strp, 100,140,20,19, &(G.buts->texnr), 0, 0, 0, 0, "Browse");
|
uiDefButS(block, MENU, B_WTEXBROWSE, strp, 100,140,20,19, &(G.buts->texnr), 0, 0, 0, 0, "Browse");
|
||||||
@@ -1506,19 +1455,17 @@ static void world_panel_texture(World *wrld)
|
|||||||
if(wrld->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 1019,146,21,19, 0, 0, 0, 0, 0, "");
|
if(wrld->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 1019,146,21,19, 0, 0, 0, 0, 0, "");
|
||||||
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_TEXCLEARWORLD, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erase link to texture");
|
uiDefBut(block, BUT, B_TEXCLEARWORLD, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erase link to texture");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
|
|
||||||
/* TEXCO */
|
/* TEXCO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "View", 100,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Pass camera view vector on to the texture");
|
uiDefButS(block, ROW, B_MATPRV, "View", 100,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Pass camera view vector on to the texture");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Object", 150,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "The name of the object used as a source for texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Object", 150,110,50,19, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "The name of the object used as a source for texture coordinates");
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,110,100,19, &(mtex->object), "");
|
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,110,100,19, &(mtex->object), "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
@@ -1533,7 +1480,7 @@ static void world_panel_mistaph(World *wrld)
|
|||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "world_panel_mistaph", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "world_panel_mistaph", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Mist Stars Physics", "World", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Mist Stars Physics", "World", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
||||||
@@ -1545,23 +1492,23 @@ static void world_panel_mistaph(World *wrld)
|
|||||||
uiDefButF(block, NUMSLI,0, "Grav ", 150,180,150,19, &(wrld->gravity), 0.0, 25.0, 0, 0, "Gravitation constant of the game world.");
|
uiDefButF(block, NUMSLI,0, "Grav ", 150,180,150,19, &(wrld->gravity), 0.0, 25.0, 0, 0, "Gravitation constant of the game world.");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D,"Mist", 10,110,140,19, &wrld->mode, 0, 0, 0, 0, "Enable mist");
|
uiDefButS(block, TOG|BIT|0,REDRAWVIEW3D,"Mist", 10,110,140,19, &wrld->mode, 0, 0, 0, 0, "Enable mist");
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_DIFF, "Qua", 10, 90, 40, 19, &wrld->mistype, 1.0, 0.0, 0, 0, "Use quadratic progression");
|
uiDefButS(block, ROW, B_DIFF, "Qua", 10, 90, 40, 19, &wrld->mistype, 1.0, 0.0, 0, 0, "Use quadratic progression");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Lin", 50, 90, 50, 19, &wrld->mistype, 1.0, 1.0, 0, 0, "Use linear progression");
|
uiDefButS(block, ROW, B_DIFF, "Lin", 50, 90, 50, 19, &wrld->mistype, 1.0, 1.0, 0, 0, "Use linear progression");
|
||||||
uiDefButS(block, ROW, B_DIFF, "Sqr", 100, 90, 50, 19, &wrld->mistype, 1.0, 2.0, 0, 0, "Use inverse quadratic progression");
|
uiDefButS(block, ROW, B_DIFF, "Sqr", 100, 90, 50, 19, &wrld->mistype, 1.0, 2.0, 0, 0, "Use inverse quadratic progression");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM,REDRAWVIEW3D, "Sta:",10,70,140,19, &wrld->miststa, 0.0, 1000.0, 10, 0, "Specify the starting distance of the mist");
|
uiDefButF(block, NUM,REDRAWVIEW3D, "Sta:",10,70,140,19, &wrld->miststa, 0.0, 1000.0, 10, 0, "Specify the starting distance of the mist");
|
||||||
uiDefButF(block, NUM,REDRAWVIEW3D, "Di:",10,50,140,19, &wrld->mistdist, 0.0,1000.0, 10, 00, "Specify the depth of the mist");
|
uiDefButF(block, NUM,REDRAWVIEW3D, "Di:",10,50,140,19, &wrld->mistdist, 0.0,1000.0, 10, 00, "Specify the depth of the mist");
|
||||||
uiDefButF(block, NUM,B_DIFF,"Hi:", 10,30,140,19, &wrld->misthi,0.0,100.0, 10, 0, "Specify the factor for a less dense mist with increasing height");
|
uiDefButF(block, NUM,B_DIFF,"Hi:", 10,30,140,19, &wrld->misthi,0.0,100.0, 10, 0, "Specify the factor for a less dense mist with increasing height");
|
||||||
uiDefButF(block, NUMSLI, 0, "Misi", 10,10,140,19, &(wrld->misi), 0., 1.0, 0, 0, "Set the mist intensity");
|
uiDefButF(block, NUMSLI, 0, "Misi", 10,10,140,19, &(wrld->misi), 0., 1.0, 0, 0, "Set the mist intensity");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButS(block, TOG|BIT|1,B_DIFF, "Stars",160,110,140,19, &wrld->mode, 0, 0, 0, 0, "Enable stars");
|
uiDefButS(block, TOG|BIT|1,B_DIFF, "Stars",160,110,140,19, &wrld->mode, 0, 0, 0, 0, "Enable stars");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
uiDefButF(block, NUM,B_DIFF,"StarDist:", 160,70,140,19, &(wrld->stardist), 2.0, 1000.0, 100, 0, "Specify the average distance between two stars");
|
uiDefButF(block, NUM,B_DIFF,"StarDist:", 160,70,140,19, &(wrld->stardist), 2.0, 1000.0, 100, 0, "Specify the average distance between two stars");
|
||||||
uiDefButF(block, NUM,B_DIFF,"MinDist:", 160,50,140,19, &(wrld->starmindist), 0.0, 1000.0, 100, 0, "Specify the minimum distance to the camera");
|
uiDefButF(block, NUM,B_DIFF,"MinDist:", 160,50,140,19, &(wrld->starmindist), 0.0, 1000.0, 100, 0, "Specify the minimum distance to the camera");
|
||||||
uiDefButF(block, NUMSLI,B_DIFF,"Size:", 160,30,140,19, &(wrld->starsize), 0.0, 10.0, 10, 0, "Specify the average screen dimension");
|
uiDefButF(block, NUMSLI,B_DIFF,"Size:", 160,30,140,19, &(wrld->starsize), 0.0, 10.0, 10, 0, "Specify the average screen dimension");
|
||||||
@@ -1576,19 +1523,19 @@ static void world_panel_world(World *wrld)
|
|||||||
ID *id, *idfrom;
|
ID *id, *idfrom;
|
||||||
short xco;
|
short xco;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "world_panel_world", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "world_panel_world", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "World", "World", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "World", "World", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* first do the browse but */
|
/* first do the browse but */
|
||||||
buttons_active_id(&id, &idfrom);
|
buttons_active_id(&id, &idfrom);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
xco= std_libbuttons(block, 10, 180, 0, NULL, B_WORLDBROWSE, id, idfrom, &(G.buts->menunr), B_WORLDALONE, B_WORLDLOCAL, B_WORLDDELETE, 0, B_KEEPDATA);
|
xco= std_libbuttons(block, 10, 180, 0, NULL, B_WORLDBROWSE, id, idfrom, &(G.buts->menunr), B_WORLDALONE, B_WORLDLOCAL, B_WORLDDELETE, 0, B_KEEPDATA);
|
||||||
|
|
||||||
if(wrld==NULL) return;
|
if(wrld==NULL) return;
|
||||||
|
|
||||||
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
uiSetButLock(wrld->id.lib!=0, "Can't edit library data");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
uiDefButF(block, COL, B_COLHOR, "", 10,150,150,19, &wrld->horr, 0, 0, 0, 0, "");
|
uiDefButF(block, COL, B_COLHOR, "", 10,150,150,19, &wrld->horr, 0, 0, 0, 0, "");
|
||||||
uiDefButF(block, NUMSLI,B_MATPRV,"HoR ", 10,130,150,19, &(wrld->horr), 0.0, 1.0, B_COLHOR,0, "The amount of red of the horizon colour");
|
uiDefButF(block, NUMSLI,B_MATPRV,"HoR ", 10,130,150,19, &(wrld->horr), 0.0, 1.0, B_COLHOR,0, "The amount of red of the horizon colour");
|
||||||
@@ -1613,7 +1560,7 @@ static void world_panel_preview(World *wrld)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
/* name "Preview" is abused to detect previewrender offset panel */
|
/* name "Preview" is abused to detect previewrender offset panel */
|
||||||
block= uiNewBlock(&curarea->uiblocks, "world_panel_preview", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "world_panel_preview", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Preview", "World", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Preview", "World", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(wrld==NULL) return;
|
if(wrld==NULL) return;
|
||||||
@@ -1625,8 +1572,6 @@ static void world_panel_preview(World *wrld)
|
|||||||
// label to force a boundbox for buttons not to be centered
|
// label to force a boundbox for buttons not to be centered
|
||||||
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|1,B_MATPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Render background with real horizon");
|
uiDefButS(block, TOG|BIT|1,B_MATPRV,"Real", 200,175,80,25, &wrld->skytype, 0, 0, 0, 0, "Render background with real horizon");
|
||||||
uiDefButS(block, TOG|BIT|0,B_MATPRV,"Blend",200,150,80,19, &wrld->skytype, 0, 0, 0, 0, "Render background with natural progression");
|
uiDefButS(block, TOG|BIT|0,B_MATPRV,"Blend",200,150,80,19, &wrld->skytype, 0, 0, 0, 0, "Render background with natural progression");
|
||||||
uiDefButS(block, TOG|BIT|2,B_MATPRV,"Paper",200,125,80,19, &wrld->skytype, 0, 0, 0, 0, "Flatten blend or texture coordinates");
|
uiDefButS(block, TOG|BIT|2,B_MATPRV,"Paper",200,125,80,19, &wrld->skytype, 0, 0, 0, 0, "Flatten blend or texture coordinates");
|
||||||
@@ -1679,7 +1624,7 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
MTex *mtex;
|
MTex *mtex;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_mapto", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_mapto", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Texture and Input", "Lamp");
|
uiNewPanelTabbed("Texture and Input", "Lamp");
|
||||||
if(uiNewPanel(curarea, block, "Map To", "Lamp", 1280, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Map To", "Lamp", 1280, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
@@ -1704,10 +1649,8 @@ static void lamp_panel_mapto(Object *ob, Lamp *la)
|
|||||||
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with");
|
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 920,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with");
|
||||||
|
|
||||||
/* MAP TO */
|
/* MAP TO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 1107,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the colour of the lamp");
|
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 1107,166,81,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the colour of the lamp");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Mix the values");
|
uiDefButS(block, ROW, B_MATPRV, "Blend", 1087,114,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "Mix the values");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Multiply the values");
|
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,114,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "Multiply the values");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "Add the values");
|
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,114,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "Add the values");
|
||||||
@@ -1728,13 +1671,13 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
|
|||||||
int a, loos;
|
int a, loos;
|
||||||
char *strp, str[64];
|
char *strp, str[64];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_texture", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_texture", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Texture and Input", "Lamp", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Texture and Input", "Lamp", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
/* TEX CHANNELS */
|
/* TEX CHANNELS */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
for(a= 0; a<6; a++) {
|
for(a= 0; a<6; a++) {
|
||||||
mtex= la->mtex[a];
|
mtex= la->mtex[a];
|
||||||
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
|
if(mtex && mtex->tex) splitIDname(mtex->tex->id.name+2, str, &loos);
|
||||||
@@ -1751,6 +1694,7 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TEXTUREBLOK SELECT */
|
/* TEXTUREBLOK SELECT */
|
||||||
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
id= (ID *)mtex->tex;
|
id= (ID *)mtex->tex;
|
||||||
IDnames_to_pupstring(&strp, NULL, "ADD NEW %x 32767", &(G.main->tex), id, &(G.buts->texnr));
|
IDnames_to_pupstring(&strp, NULL, "ADD NEW %x 32767", &(G.main->tex), id, &(G.buts->texnr));
|
||||||
|
|
||||||
@@ -1767,19 +1711,17 @@ static void lamp_panel_texture(Object *ob, Lamp *la)
|
|||||||
if(la->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
if(la->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
||||||
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,140,21,19, 0, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_TEXCLEARLAMP, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erase link to texture");
|
uiDefBut(block, BUT, B_TEXCLEARLAMP, "Clear", 122, 140, 72, 19, 0, 0, 0, 0, 0, "Erase link to texture");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TEXCO */
|
/* TEXCO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Glob", 100,110,60,20, &(mtex->texco), 4.0, (float)TEXCO_GLOB, 0, 0, "Generate texture coordinates from global coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Glob", 100,110,60,20, &(mtex->texco), 4.0, (float)TEXCO_GLOB, 0, 0, "Generate texture coordinates from global coordinates");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "View", 160,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Generate texture coordinates from view coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "View", 160,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_VIEW, 0, 0, "Generate texture coordinates from view coordinates");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Object", 230,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Object", 230,110,70,20, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,200,20, &(mtex->object), "");
|
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "", 100,90,200,20, &(mtex->object), "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dX", 100,50,100,18, mtex->ofs, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dY", 100,30,100,18, mtex->ofs+1, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
uiDefButF(block, NUM, B_MATPRV, "dZ", 100,10,100,18, mtex->ofs+2, -20.0, 20.0, 10, 0, "Set the extra translation of the texture coordinate");
|
||||||
@@ -1794,7 +1736,7 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
float grid=0.0;
|
float grid=0.0;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_spot", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_spot", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Spot", "Lamp", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Spot", "Lamp", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(G.vd) grid= G.vd->grid;
|
if(G.vd) grid= G.vd->grid;
|
||||||
@@ -1802,13 +1744,13 @@ static void lamp_panel_spot(Object *ob, Lamp *la)
|
|||||||
|
|
||||||
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButS(block, TOG|BIT|0, REDRAWVIEW3D, "Shadows",10,150,80,19,&la->mode, 0, 0, 0, 0, "Let lamp produce shadows");
|
uiDefButS(block, TOG|BIT|0, REDRAWVIEW3D, "Shadows",10,150,80,19,&la->mode, 0, 0, 0, 0, "Let lamp produce shadows");
|
||||||
uiDefButS(block, TOG|BIT|5, 0,"OnlyShadow", 10,130,80,19,&la->mode, 0, 0, 0, 0, "Render shadow only");
|
uiDefButS(block, TOG|BIT|5, 0,"OnlyShadow", 10,130,80,19,&la->mode, 0, 0, 0, 0, "Render shadow only");
|
||||||
uiDefButS(block, TOG|BIT|7, B_LAMPREDRAW,"Square", 10,90,80,19,&la->mode, 0, 0, 0, 0, "Use square spotbundles");
|
uiDefButS(block, TOG|BIT|7, B_LAMPREDRAW,"Square", 10,90,80,19,&la->mode, 0, 0, 0, 0, "Use square spotbundles");
|
||||||
uiDefButS(block, TOG|BIT|1, 0,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Render spotlights with a volumetric halo");
|
uiDefButS(block, TOG|BIT|1, 0,"Halo", 10,50,80,19,&la->mode, 0, 0, 0, 0, "Render spotlights with a volumetric halo");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButF(block, NUMSLI,B_LAMPREDRAW,"SpotSi ", 100,180,200,19,&la->spotsize, 1.0, 180.0, 0, 0, "Set the angle of the spot beam in degrees");
|
uiDefButF(block, NUMSLI,B_LAMPREDRAW,"SpotSi ", 100,180,200,19,&la->spotsize, 1.0, 180.0, 0, 0, "Set the angle of the spot beam in degrees");
|
||||||
uiDefButF(block, NUMSLI,B_MATPRV,"SpotBl ", 100,160,200,19,&la->spotblend, 0.0, 1.0, 0, 0, "Set the softness of the spot edge");
|
uiDefButF(block, NUMSLI,B_MATPRV,"SpotBl ", 100,160,200,19,&la->spotblend, 0.0, 1.0, 0, 0, "Set the softness of the spot edge");
|
||||||
uiDefButF(block, NUMSLI,0,"HaloInt ", 100,130,200,19,&la->haint, 0.0, 5.0, 0, 0, "Set the intensity of the spot halo");
|
uiDefButF(block, NUMSLI,0,"HaloInt ", 100,130,200,19,&la->haint, 0.0, 5.0, 0, 0, "Set the intensity of the spot halo");
|
||||||
@@ -1835,7 +1777,7 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
|
|||||||
float grid= 0.0;
|
float grid= 0.0;
|
||||||
short xco;
|
short xco;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_lamp", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_lamp", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Lamp", "Lamp", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Lamp", "Lamp", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(G.vd) grid= G.vd->grid;
|
if(G.vd) grid= G.vd->grid;
|
||||||
@@ -1846,13 +1788,13 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
|
|||||||
/* first do the browse but */
|
/* first do the browse but */
|
||||||
buttons_active_id(&id, &idfrom);
|
buttons_active_id(&id, &idfrom);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
xco= std_libbuttons(block, 8, 180, 0, NULL, B_LAMPBROWSE, id, (ID *)ob, &(G.buts->menunr), B_LAMPALONE, B_LAMPLOCAL, 0, 0, 0);
|
xco= std_libbuttons(block, 8, 180, 0, NULL, B_LAMPBROWSE, id, (ID *)ob, &(G.buts->menunr), B_LAMPALONE, B_LAMPLOCAL, 0, 0, 0);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButF(block, NUM,B_LAMPREDRAW,"Dist:",xco+10,180,104,20,&la->dist, 0.01, 5000.0, 100, 0, "Set the distance value");
|
uiDefButF(block, NUM,B_LAMPREDRAW,"Dist:",xco+10,180,104,20,&la->dist, 0.01, 5000.0, 100, 0, "Set the distance value");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButS(block, TOG|BIT|3, B_MATPRV,"Quad", 10,150,100,19,&la->mode, 0, 0, 0, 0, "Use inverse quadratic proportion");
|
uiDefButS(block, TOG|BIT|3, B_MATPRV,"Quad", 10,150,100,19,&la->mode, 0, 0, 0, 0, "Use inverse quadratic proportion");
|
||||||
uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Lamp only shines inside a sphere");
|
uiDefButS(block, TOG|BIT|6, REDRAWVIEW3D,"Sphere", 10,130,100,19,&la->mode, 0, 0, 0, 0, "Lamp only shines inside a sphere");
|
||||||
uiDefButS(block, TOG|BIT|2, 0,"Layer", 10,90,100,19,&la->mode, 0, 0, 0, 0, "Illuminate objects in the same layer only");
|
uiDefButS(block, TOG|BIT|2, 0,"Layer", 10,90,100,19,&la->mode, 0, 0, 0, 0, "Illuminate objects in the same layer only");
|
||||||
@@ -1861,7 +1803,7 @@ static void lamp_panel_lamp(Object *ob, Lamp *la)
|
|||||||
uiDefButS(block, TOG|BIT|12, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "No specular shading of material");
|
uiDefButS(block, TOG|BIT|12, 0,"No Specular", 10,10,100,19,&la->mode, 0, 0, 0, 0, "No specular shading of material");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButF(block, NUMSLI,B_MATPRV,"Energy ", 120,150,180,20, &(la->energy), 0.0, 10.0, 0, 0, "Set the intensity of the light");
|
uiDefButF(block, NUMSLI,B_MATPRV,"Energy ", 120,150,180,20, &(la->energy), 0.0, 10.0, 0, 0, "Set the intensity of the light");
|
||||||
|
|
||||||
uiDefButF(block, NUMSLI,B_MATPRV,"R ", 120,120,180,20,&la->r, 0.0, 1.0, B_COLLAMP, 0, "Set the red component of the light");
|
uiDefButF(block, NUMSLI,B_MATPRV,"R ", 120,120,180,20,&la->r, 0.0, 1.0, B_COLLAMP, 0, "Set the red component of the light");
|
||||||
@@ -1880,7 +1822,7 @@ static void lamp_panel_preview(Object *ob, Lamp *la)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
/* name "Preview" is abused to detect previewrender offset panel */
|
/* name "Preview" is abused to detect previewrender offset panel */
|
||||||
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_preview", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "lamp_panel_preview", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Preview", "Lamp", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Preview", "Lamp", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
uiSetButLock(la->id.lib!=0, "Can't edit library data");
|
||||||
@@ -1890,7 +1832,6 @@ static void lamp_panel_preview(Object *ob, Lamp *la)
|
|||||||
// label to force a boundbox for buttons not to be centered
|
// label to force a boundbox for buttons not to be centered
|
||||||
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW,B_LAMPREDRAW,"Lamp", 200,175,80,25,&la->type,1.0,(float)LA_LOCAL, 0, 0, "Use a point light source");
|
uiDefButS(block, ROW,B_LAMPREDRAW,"Lamp", 200,175,80,25,&la->type,1.0,(float)LA_LOCAL, 0, 0, "Use a point light source");
|
||||||
uiDefButS(block, ROW,B_LAMPREDRAW,"Spot", 200,150,80,25,&la->type,1.0,(float)LA_SPOT, 0, 0, "Restrict lamp to conical space");
|
uiDefButS(block, ROW,B_LAMPREDRAW,"Spot", 200,150,80,25,&la->type,1.0,(float)LA_SPOT, 0, 0, "Restrict lamp to conical space");
|
||||||
uiDefButS(block, ROW,B_LAMPREDRAW,"Sun", 200,125,80,25,&la->type,1.0,(float)LA_SUN, 0, 0, "Light shines from constant direction");
|
uiDefButS(block, ROW,B_LAMPREDRAW,"Sun", 200,125,80,25,&la->type,1.0,(float)LA_SUN, 0, 0, "Light shines from constant direction");
|
||||||
@@ -1977,7 +1918,7 @@ static void material_panel_map_to(Material *ma)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
MTex *mtex;
|
MTex *mtex;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_map_to", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_map_to", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Texture", "Material");
|
uiNewPanelTabbed("Texture", "Material");
|
||||||
if(uiNewPanel(curarea, block, "Map To", "Material", 1600, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Map To", "Material", 1600, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
@@ -1995,13 +1936,11 @@ static void material_panel_map_to(Material *ma)
|
|||||||
uiDefButF(block, COL, B_MTEXCOL, "", 900,100,163,12, &(mtex->r), 0, 0, 0, 0, "Browse datablocks");
|
uiDefButF(block, COL, B_MTEXCOL, "", 900,100,163,12, &(mtex->r), 0, 0, 0, 0, "Browse datablocks");
|
||||||
|
|
||||||
if(ma->colormodel==MA_HSV) {
|
if(ma->colormodel==MA_HSV) {
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 900,80,163,18, &(mtex->r), 0.0, 0.9999, B_MTEXCOL, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 900,80,163,18, &(mtex->r), 0.0, 0.9999, B_MTEXCOL, 0, "");
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 900,60,163,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 900,60,163,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 900,40,163,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 900,40,163,18, &(mtex->r), 0.0001, 1.0, B_MTEXCOL, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 900,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of red the intensity texture blends with");
|
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 900,80,163,18, &(mtex->r), 0.0, 1.0, B_MTEXCOL, 0, "Set the amount of red the intensity texture blends with");
|
||||||
@@ -2012,7 +1951,6 @@ static void material_panel_map_to(Material *ma)
|
|||||||
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 900,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with the current value");
|
uiDefButF(block, NUMSLI, B_MATPRV, "DVar ", 900,10,163,18, &(mtex->def_var), 0.0, 1.0, 0, 0, "Set the value the texture blends with the current value");
|
||||||
|
|
||||||
/* MAP TO */
|
/* MAP TO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 900,166,35,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect basic colour of the material");
|
uiDefButS(block, TOG|BIT|0, B_MATPRV, "Col", 900,166,35,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect basic colour of the material");
|
||||||
uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 935,166,35,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the rendered normal");
|
uiDefButS(block, TOG3|BIT|1, B_MATPRV, "Nor", 935,166,35,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the rendered normal");
|
||||||
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 970,166,40,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the specularity colour");
|
uiDefButS(block, TOG|BIT|2, B_MATPRV, "Csp", 970,166,40,18, &(mtex->mapto), 0, 0, 0, 0, "Let the texture affect the specularity colour");
|
||||||
@@ -2025,7 +1963,6 @@ static void material_panel_map_to(Material *ma)
|
|||||||
|
|
||||||
/* uiDefButS(block, TOG|BIT|3, B_MATPRV, "Alpha Mix",1087,114,100,18, &(mtex->texflag), 0, 0, 0, 0); ,""*/
|
/* uiDefButS(block, TOG|BIT|3, B_MATPRV, "Alpha Mix",1087,114,100,18, &(mtex->texflag), 0, 0, 0, 0); ,""*/
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,94,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values or colour");
|
uiDefButS(block, ROW, B_MATPRV, "Mix", 1087,94,48,18, &(mtex->blendtype), 9.0, (float)MTEX_BLEND, 0, 0, "The texture blends the values or colour");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,94,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values or colour");
|
uiDefButS(block, ROW, B_MATPRV, "Mul", 1136,94,44,18, &(mtex->blendtype), 9.0, (float)MTEX_MUL, 0, 0, "The texture multiplies the values or colour");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,94,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values or colour");
|
uiDefButS(block, ROW, B_MATPRV, "Add", 1182,94,41,18, &(mtex->blendtype), 9.0, (float)MTEX_ADD, 0, 0, "The texture adds the values or colour");
|
||||||
@@ -2045,7 +1982,7 @@ static void material_panel_map_input(Material *ma)
|
|||||||
int a, xco;
|
int a, xco;
|
||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_map_input", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_map_input", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiNewPanelTabbed("Texture", "Material");
|
uiNewPanelTabbed("Texture", "Material");
|
||||||
if(uiNewPanel(curarea, block, "Map Input", "Material", 1280, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Map Input", "Material", 1280, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
@@ -2056,7 +1993,6 @@ static void material_panel_map_input(Material *ma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TEXCO */
|
/* TEXCO */
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, B_MATPRV, "UV", 630,166,40,18, &(mtex->texco), 4.0, (float)TEXCO_UV, 0, 0, "Use UV coordinates for texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "UV", 630,166,40,18, &(mtex->texco), 4.0, (float)TEXCO_UV, 0, 0, "Use UV coordinates for texture coordinates");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Object", 670,166,75,18, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Object", 670,166,75,18, &(mtex->texco), 4.0, (float)TEXCO_OBJECT, 0, 0, "Use linked object's coordinates for texture coordinates");
|
||||||
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "",745,166,163,18, &(mtex->object), "");
|
uiDefIDPoinBut(block, test_obpoin_but, B_MATPRV, "",745,166,163,18, &(mtex->object), "");
|
||||||
@@ -2068,8 +2004,6 @@ static void material_panel_map_input(Material *ma)
|
|||||||
uiDefButS(block, ROW, B_MATPRV, "Nor", 820,146,44,18, &(mtex->texco), 4.0, (float)TEXCO_NORM, 0, 0, "Use normal vector as texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Nor", 820,146,44,18, &(mtex->texco), 4.0, (float)TEXCO_NORM, 0, 0, "Use normal vector as texture coordinates");
|
||||||
uiDefButS(block, ROW, B_MATPRV, "Refl", 864,146,44,18, &(mtex->texco), 4.0, (float)TEXCO_REFL, 0, 0, "Use reflection vector as texture coordinates");
|
uiDefButS(block, ROW, B_MATPRV, "Refl", 864,146,44,18, &(mtex->texco), 4.0, (float)TEXCO_REFL, 0, 0, "Use reflection vector as texture coordinates");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
/* COORDS */
|
/* COORDS */
|
||||||
uiDefButC(block, ROW, B_MATPRV, "Flat", 666,114,48,18, &(mtex->mapping), 5.0, (float)MTEX_FLAT, 0, 0, "Map X and Y coordinates directly");
|
uiDefButC(block, ROW, B_MATPRV, "Flat", 666,114,48,18, &(mtex->mapping), 5.0, (float)MTEX_FLAT, 0, 0, "Map X and Y coordinates directly");
|
||||||
uiDefButC(block, ROW, B_MATPRV, "Cube", 717,114,50,18, &(mtex->mapping), 5.0, (float)MTEX_CUBE, 0, 0, "Map using the normal vector");
|
uiDefButC(block, ROW, B_MATPRV, "Cube", 717,114,50,18, &(mtex->mapping), 5.0, (float)MTEX_CUBE, 0, 0, "Map using the normal vector");
|
||||||
@@ -2109,11 +2043,11 @@ static void material_panel_texture(Material *ma)
|
|||||||
int a, xco;
|
int a, xco;
|
||||||
char str[64], *strp;
|
char str[64], *strp;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_texture", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_texture", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Texture", "Material", 960, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Texture", "Material", 960, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* TEX CHANNELS */
|
/* TEX CHANNELS */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
xco= 665;
|
xco= 665;
|
||||||
for(a= 0; a<8; a++) {
|
for(a= 0; a<8; a++) {
|
||||||
mtex= ma->mtex[a];
|
mtex= ma->mtex[a];
|
||||||
@@ -2124,12 +2058,12 @@ static void material_panel_texture(Material *ma)
|
|||||||
xco+= 65;
|
xco+= 65;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
uiDefIconBut(block, BUT, B_MTEXCOPY, ICON_COPYUP, 100,180,23,21, 0, 0, 0, 0, 0, "Copy the mapping settings to the buffer");
|
uiDefIconBut(block, BUT, B_MTEXCOPY, ICON_COPYUP, 100,180,23,21, 0, 0, 0, 0, 0, "Copy the mapping settings to the buffer");
|
||||||
uiDefIconBut(block, BUT, B_MTEXPASTE, ICON_PASTEUP, 125,180,23,21, 0, 0, 0, 0, 0, "Paste the mapping settings from the buffer");
|
uiDefIconBut(block, BUT, B_MTEXPASTE, ICON_PASTEUP, 125,180,23,21, 0, 0, 0, 0, 0, "Paste the mapping settings from the buffer");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButC(block, TOG, B_MATPRV, "SepTex", 160, 180, 100, 20, &(ma->septex), 0, 0, 0, 0, "Render only use active texture channel");
|
uiDefButC(block, TOG, B_MATPRV, "SepTex", 160, 180, 100, 20, &(ma->septex), 0, 0, 0, 0, "Render only use active texture channel");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
mtex= ma->mtex[ ma->texact ];
|
mtex= ma->mtex[ ma->texact ];
|
||||||
if(mtex==0) {
|
if(mtex==0) {
|
||||||
@@ -2138,6 +2072,7 @@ static void material_panel_texture(Material *ma)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* TEXTUREBLOK SELECT */
|
/* TEXTUREBLOK SELECT */
|
||||||
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
if(G.main->tex.first==0)
|
if(G.main->tex.first==0)
|
||||||
id= NULL;
|
id= NULL;
|
||||||
else
|
else
|
||||||
@@ -2155,25 +2090,25 @@ static void material_panel_texture(Material *ma)
|
|||||||
if(ma->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,130,21,20, 0, 0, 0, 0, 0, "");
|
if(ma->id.lib) uiDefIconBut(block, BUT, 0, ICON_DATALIB, 219,130,21,20, 0, 0, 0, 0, 0, "");
|
||||||
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,130,21,20, 0, 0, 0, 0, 0, "");
|
else uiDefIconBut(block, BUT, 0, ICON_PARLIB, 219,130,21,20, 0, 0, 0, 0, 0, "");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_TEXCLEAR, "Clear", 122, 130, 72, 20, 0, 0, 0, 0, 0, "Erase link to datablock");
|
uiDefBut(block, BUT, B_TEXCLEAR, "Clear", 122, 130, 72, 20, 0, 0, 0, 0, 0, "Erase link to datablock");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void material_panel_shading(Material *ma)
|
static void material_panel_shading(Material *ma)
|
||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_shading", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_shading", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Shaders", "Material", 640, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Shaders", "Material", 640, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButI(block, TOG|BIT|5, B_MATPRV_DRAW, "Halo", 245,180,65,18, &(ma->mode), 0, 0, 0, 0, "Render as a halo");
|
uiDefButI(block, TOG|BIT|5, B_MATPRV_DRAW, "Halo", 245,180,65,18, &(ma->mode), 0, 0, 0, 0, "Render as a halo");
|
||||||
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
if(ma->mode & MA_HALO) {
|
if(ma->mode & MA_HALO) {
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUM, B_MATPRV, "HaloSize: ", 10,155,190,18, &(ma->hasize), 0.0, 100.0, 10, 0, "Set the dimension of the halo");
|
uiDefButF(block, NUM, B_MATPRV, "HaloSize: ", 10,155,190,18, &(ma->hasize), 0.0, 100.0, 10, 0, "Set the dimension of the halo");
|
||||||
uiDefButS(block, NUMSLI, B_MATPRV, "Hard ", 10,135,190,18, &(ma->har), 1.0, 127.0, 0, 0, "Set the hardness of the halo");
|
uiDefButS(block, NUMSLI, B_MATPRV, "Hard ", 10,135,190,18, &(ma->har), 1.0, 127.0, 0, 0, "Set the hardness of the halo");
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 10,115,190,18, &(ma->add), 0.0, 1.0, 0, 0, "Strength of the add effect");
|
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 10,115,190,18, &(ma->add), 0.0, 1.0, 0, 0, "Strength of the add effect");
|
||||||
@@ -2189,7 +2124,7 @@ static void material_panel_shading(Material *ma)
|
|||||||
uiDefButC(block, NUM, B_MATPRV, "Fl.seed: ", 10,10,90,18, &(ma->seed2), 0.0, 255.0, 0, 0, "Specify an offset in the seed table");
|
uiDefButC(block, NUM, B_MATPRV, "Fl.seed: ", 10,10,90,18, &(ma->seed2), 0.0, 255.0, 0, 0, "Specify an offset in the seed table");
|
||||||
uiDefButS(block, NUM, B_MATPRV, "Flares: ", 100,10,100,18, &(ma->flarec), 1.0, 32.0, 0, 0, "Set the nuber of subflares");
|
uiDefButS(block, NUM, B_MATPRV, "Flares: ", 100,10,100,18, &(ma->flarec), 1.0, 32.0, 0, 0, "Set the nuber of subflares");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
uiDefButI(block, TOG|BIT|15, B_MATPRV_DRAW, "Flare", 245,142,65,28, &(ma->mode), 0, 0, 0, 0, "Render halo as a lensflare");
|
uiDefButI(block, TOG|BIT|15, B_MATPRV_DRAW, "Flare", 245,142,65,28, &(ma->mode), 0, 0, 0, 0, "Render halo as a lensflare");
|
||||||
uiDefButI(block, TOG|BIT|8, B_MATPRV, "Rings", 245,123,65, 18, &(ma->mode), 0, 0, 0, 0, "Render rings over basic halo");
|
uiDefButI(block, TOG|BIT|8, B_MATPRV, "Rings", 245,123,65, 18, &(ma->mode), 0, 0, 0, 0, "Render rings over basic halo");
|
||||||
@@ -2205,7 +2140,6 @@ static void material_panel_shading(Material *ma)
|
|||||||
char *str2= "Specular Shader%t|CookTorr %x0|Phong %x1|Blinn %x2|Toon %x3";
|
char *str2= "Specular Shader%t|CookTorr %x0|Phong %x1|Blinn %x2|Toon %x3";
|
||||||
|
|
||||||
/* diff shader buttons */
|
/* diff shader buttons */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButS(block, MENU, B_MATPRV_DRAW, str1, 9, 155,78,19, &(ma->diff_shader), 0.0, 0.0, 0, 0, "Set a diffuse shader");
|
uiDefButS(block, MENU, B_MATPRV_DRAW, str1, 9, 155,78,19, &(ma->diff_shader), 0.0, 0.0, 0, 0, "Set a diffuse shader");
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "Ref ", 90,155,150,19, &(ma->ref), 0.0, 1.0, 0, 0, "Set the amount of reflection");
|
uiDefButF(block, NUMSLI, B_MATPRV, "Ref ", 90,155,150,19, &(ma->ref), 0.0, 1.0, 0, 0, "Set the amount of reflection");
|
||||||
|
|
||||||
@@ -2236,7 +2170,7 @@ static void material_panel_shading(Material *ma)
|
|||||||
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 9,10,117,19, &(ma->add), 0.0, 1.0, 0, 0, "Glow factor for transparant");
|
uiDefButF(block, NUMSLI, B_MATPRV, "Add ", 9,10,117,19, &(ma->add), 0.0, 1.0, 0, 0, "Glow factor for transparant");
|
||||||
uiDefButF(block, NUM, 0, "Zoffs:", 133,10,110,19, &(ma->zoffs), 0.0, 10.0, 0, 0, "Give face an artificial offset");
|
uiDefButF(block, NUM, 0, "Zoffs:", 133,10,110,19, &(ma->zoffs), 0.0, 10.0, 0, 0, "Give face an artificial offset");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
uiDefButI(block, TOG|BIT|0, 0, "Traceable", 245,161,65,18, &(ma->mode), 0, 0, 0, 0, "Make material visible for shadow lamps");
|
uiDefButI(block, TOG|BIT|0, 0, "Traceable", 245,161,65,18, &(ma->mode), 0, 0, 0, 0, "Make material visible for shadow lamps");
|
||||||
uiDefButI(block, TOG|BIT|1, 0, "Shadow", 245,142,65,18, &(ma->mode), 0, 0, 0, 0, "Enable material for shadows");
|
uiDefButI(block, TOG|BIT|1, 0, "Shadow", 245,142,65,18, &(ma->mode), 0, 0, 0, 0, "Enable material for shadows");
|
||||||
@@ -2261,13 +2195,13 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
int rgbsel = 0, xco= 0;
|
int rgbsel = 0, xco= 0;
|
||||||
char str[30];
|
char str[30];
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_material", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_material", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Material", "Material", 320, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Material", "Material", 320, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
/* first do the browse but */
|
/* first do the browse but */
|
||||||
buttons_active_id(&id, &idfrom);
|
buttons_active_id(&id, &idfrom);
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
xco= std_libbuttons(block, 8, 200, 0, NULL, B_MATBROWSE, id, idfrom, &(G.buts->menunr), B_MATALONE, B_MATLOCAL, B_MATDELETE, B_AUTOMATNAME, B_KEEPDATA);
|
xco= std_libbuttons(block, 8, 200, 0, NULL, B_MATBROWSE, id, idfrom, &(G.buts->menunr), B_MATALONE, B_MATLOCAL, B_MATDELETE, B_AUTOMATNAME, B_KEEPDATA);
|
||||||
|
|
||||||
uiDefIconBut(block, BUT, B_MATCOPY, ICON_COPYUP, xco+=XIC,198,XIC,YIC, 0, 0, 0, 0, 0, "Copies Material to the buffer");
|
uiDefIconBut(block, BUT, B_MATCOPY, ICON_COPYUP, xco+=XIC,198,XIC,YIC, 0, 0, 0, 0, 0, "Copies Material to the buffer");
|
||||||
@@ -2277,14 +2211,14 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
if(ob->actcol==0) ob->actcol= 1; /* because of TOG|BIT button */
|
if(ob->actcol==0) ob->actcol= 1; /* because of TOG|BIT button */
|
||||||
|
|
||||||
/* indicate which one is linking a material */
|
/* indicate which one is linking a material */
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_BUT_ACTION);
|
||||||
uiDefButS(block, TOG|BIT|(ob->actcol-1), B_MATFROM, "OB", 125,174,32,20, &ob->colbits, 0, 0, 0, 0, "Link material to object");
|
uiDefButS(block, TOG|BIT|(ob->actcol-1), B_MATFROM, "OB", 125,174,32,20, &ob->colbits, 0, 0, 0, 0, "Link material to object");
|
||||||
idn= ob->data;
|
idn= ob->data;
|
||||||
strncpy(str, idn->name, 2);
|
strncpy(str, idn->name, 2);
|
||||||
str[2]= 0;
|
str[2]= 0;
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
uiBlockSetCol(block, TH_BUT_SETTING);
|
||||||
uiDefButS(block, TOGN|BIT|(ob->actcol-1), B_MATFROM, str, 158,174,32,20, &ob->colbits, 0, 0, 0, 0, "Show the block the material is linked to");
|
uiDefButS(block, TOGN|BIT|(ob->actcol-1), B_MATFROM, str, 158,174,32,20, &ob->colbits, 0, 0, 0, 0, "Show the block the material is linked to");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
|
|
||||||
/* id is the block from which the material is used */
|
/* id is the block from which the material is used */
|
||||||
if( BTST(ob->colbits, ob->actcol-1) ) id= (ID *)ob;
|
if( BTST(ob->colbits, ob->actcol-1) ) id= (ID *)ob;
|
||||||
@@ -2316,24 +2250,21 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
|
|
||||||
uiDefButF(block, NUM, 0, "Fh Damp ", 8,120,100,20, &ma->xyfrict, 0.0, 1.0, 10, 0, "Damping of the Fh spring force");
|
uiDefButF(block, NUM, 0, "Fh Damp ", 8,120,100,20, &ma->xyfrict, 0.0, 1.0, 10, 0, "Damping of the Fh spring force");
|
||||||
uiDefButF(block, NUM, 0, "Fh Dist ", 8,98 ,100,20, &ma->fhdist, 0.0, 20.0, 10, 0, "Height of the Fh area");
|
uiDefButF(block, NUM, 0, "Fh Dist ", 8,98 ,100,20, &ma->fhdist, 0.0, 20.0, 10, 0, "Height of the Fh area");
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, 0, "Fh Norm", 8,76 ,100,20, &ma->dynamode, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
|
uiDefButS(block, TOG|BIT|1, 0, "Fh Norm", 8,76 ,100,20, &ma->dynamode, 0.0, 0.0, 0, 0, "Add a horizontal spring force on slopes");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(!(ma->mode & MA_HALO)) {
|
if(!(ma->mode & MA_HALO)) {
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButI(block, TOG|BIT|4, B_REDR, "VCol Light", 8,146,75,20, &(ma->mode), 0, 0, 0, 0, "Add vertex colours as extra light");
|
uiDefButI(block, TOG|BIT|4, B_REDR, "VCol Light", 8,146,75,20, &(ma->mode), 0, 0, 0, 0, "Add vertex colours as extra light");
|
||||||
uiDefButI(block, TOG|BIT|7, B_REDR, "VCol Paint", 85,146,72,20, &(ma->mode), 0, 0, 0, 0, "Replace basic colours with vertex colours");
|
uiDefButI(block, TOG|BIT|7, B_REDR, "VCol Paint", 85,146,72,20, &(ma->mode), 0, 0, 0, 0, "Replace basic colours with vertex colours");
|
||||||
uiDefButI(block, TOG|BIT|11, B_REDR, "TexFace", 160,146,62,20, &(ma->mode), 0, 0, 0, 0, "UV-Editor assigned texture gives color and texture info for the faces");
|
uiDefButI(block, TOG|BIT|11, B_REDR, "TexFace", 160,146,62,20, &(ma->mode), 0, 0, 0, 0, "UV-Editor assigned texture gives color and texture info for the faces");
|
||||||
uiDefButI(block, TOG|BIT|2, B_MATPRV, "Shadeless", 223,146,80,20, &(ma->mode), 0, 0, 0, 0, "Make material insensitive to light or shadow");
|
uiDefButI(block, TOG|BIT|2, B_MATPRV, "Shadeless", 223,146,80,20, &(ma->mode), 0, 0, 0, 0, "Make material insensitive to light or shadow");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefButF(block, COL, B_MATCOL, "", 8,115,72,24, &(ma->r), 0, 0, 0, 0, "");
|
uiDefButF(block, COL, B_MATCOL, "", 8,115,72,24, &(ma->r), 0, 0, 0, 0, "");
|
||||||
uiDefButF(block, COL, B_SPECCOL, "", 8,88,72,24, &(ma->specr), 0, 0, 0, 0, "");
|
uiDefButF(block, COL, B_SPECCOL, "", 8,88,72,24, &(ma->specr), 0, 0, 0, 0, "");
|
||||||
uiDefButF(block, COL, B_MIRCOL, "", 8,61,72,24, &(ma->mirr), 0, 0, 0, 0, "");
|
uiDefButF(block, COL, B_MIRCOL, "", 8,61,72,24, &(ma->mirr), 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
if(ma->mode & MA_HALO) {
|
if(ma->mode & MA_HALO) {
|
||||||
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Halo", 83,115,40,25, &(ma->rgbsel), 2.0, 0.0, 0, 0, "Mix the colour of the halo with the RGB sliders");
|
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Halo", 83,115,40,25, &(ma->rgbsel), 2.0, 0.0, 0, 0, "Mix the colour of the halo with the RGB sliders");
|
||||||
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Line", 83,88,40,25, &(ma->rgbsel), 2.0, 1.0, 0, 0, "Mix the colour of the lines with the RGB sliders");
|
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Line", 83,88,40,25, &(ma->rgbsel), 2.0, 1.0, 0, 0, "Mix the colour of the lines with the RGB sliders");
|
||||||
@@ -2344,7 +2275,6 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Spe", 83,88,40,25, &(ma->rgbsel), 2.0, 1.0, 0, 0, "Set the colour of the specularity");
|
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Spe", 83,88,40,25, &(ma->rgbsel), 2.0, 1.0, 0, 0, "Set the colour of the specularity");
|
||||||
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Mir", 83,61,40,25, &(ma->rgbsel), 2.0, 2.0, 0, 0, "Use mirror colour");
|
uiDefButC(block, ROW, REDRAWBUTSSHADING, "Mir", 83,61,40,25, &(ma->rgbsel), 2.0, 2.0, 0, 0, "Use mirror colour");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if(ma->rgbsel==0) {colpoin= &(ma->r); rgbsel= B_MATCOL;}
|
if(ma->rgbsel==0) {colpoin= &(ma->r); rgbsel= B_MATCOL;}
|
||||||
else if(ma->rgbsel==1) {colpoin= &(ma->specr); rgbsel= B_SPECCOL;}
|
else if(ma->rgbsel==1) {colpoin= &(ma->specr); rgbsel= B_SPECCOL;}
|
||||||
@@ -2352,11 +2282,11 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
|
|
||||||
if(ma->rgbsel==0 && (ma->mode & (MA_VERTEXCOLP|MA_FACETEXTURE) && !(ma->mode & MA_HALO)));
|
if(ma->rgbsel==0 && (ma->mode & (MA_VERTEXCOLP|MA_FACETEXTURE) && !(ma->mode & MA_HALO)));
|
||||||
else if(ma->colormodel==MA_HSV) {
|
else if(ma->colormodel==MA_HSV) {
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 128,120,175,20, colpoin, 0.0, 0.9999, rgbsel, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "H ", 128,120,175,20, colpoin, 0.0, 0.9999, rgbsel, 0, "");
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 128,98,175,20, colpoin, 0.0001, 1.0, rgbsel, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "S ", 128,98,175,20, colpoin, 0.0001, 1.0, rgbsel, 0, "");
|
||||||
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 128,76,175,20, colpoin, 0.0001, 1.0, rgbsel, 0, "");
|
uiDefButF(block, HSVSLI, B_MATPRV, "V ", 128,76,175,20, colpoin, 0.0001, 1.0, rgbsel, 0, "");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 128,120,175,20, colpoin, 0.0, 1.0, rgbsel, 0, "");
|
uiDefButF(block, NUMSLI, B_MATPRV, "R ", 128,120,175,20, colpoin, 0.0, 1.0, rgbsel, 0, "");
|
||||||
@@ -2368,7 +2298,6 @@ static void material_panel_material(Object *ob, Material *ma)
|
|||||||
uiDefButF(block, NUMSLI, B_MATPRV, "SpecTra ", 128,32,175,20, &(ma->spectra), 0.0, 1.0, 0, 0, "Make specular areas opaque");
|
uiDefButF(block, NUMSLI, B_MATPRV, "SpecTra ", 128,32,175,20, &(ma->spectra), 0.0, 1.0, 0, 0, "Make specular areas opaque");
|
||||||
|
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, ROW, REDRAWBUTSSHADING, "RGB", 8,32,35,20, &(ma->colormodel), 1.0, (float)MA_RGB, 0, 0, "Create colour by red, green and blue");
|
uiDefButS(block, ROW, REDRAWBUTSSHADING, "RGB", 8,32,35,20, &(ma->colormodel), 1.0, (float)MA_RGB, 0, 0, "Create colour by red, green and blue");
|
||||||
uiDefButS(block, ROW, REDRAWBUTSSHADING, "HSV", 43,32,35,20, &(ma->colormodel), 1.0, (float)MA_HSV, 0, 0, "Mix colour with hue, saturation and value");
|
uiDefButS(block, ROW, REDRAWBUTSSHADING, "HSV", 43,32,35,20, &(ma->colormodel), 1.0, (float)MA_HSV, 0, 0, "Mix colour with hue, saturation and value");
|
||||||
uiDefButS(block, TOG|BIT|0, REDRAWBUTSSHADING, "DYN", 78,32,45,20, &(ma->dynamode), 0.0, 0.0, 0, 0, "Adjust parameters for dynamics options");
|
uiDefButS(block, TOG|BIT|0, REDRAWBUTSSHADING, "DYN", 78,32,45,20, &(ma->dynamode), 0.0, 0.0, 0, 0, "Adjust parameters for dynamics options");
|
||||||
@@ -2380,7 +2309,7 @@ static void material_panel_preview(Material *ma)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
|
|
||||||
/* name "Preview" is abused to detect previewrender offset panel */
|
/* name "Preview" is abused to detect previewrender offset panel */
|
||||||
block= uiNewBlock(&curarea->uiblocks, "material_panel_preview", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "material_panel_preview", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
if(uiNewPanel(curarea, block, "Preview", "Material", 0, 0, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Preview", "Material", 0, 0, 318, 204)==0) return;
|
||||||
|
|
||||||
if(ma) {
|
if(ma) {
|
||||||
@@ -2388,7 +2317,7 @@ static void material_panel_preview(Material *ma)
|
|||||||
|
|
||||||
// label to force a boundbox for buttons not to be centered
|
// label to force a boundbox for buttons not to be centered
|
||||||
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, " ", 20,20,10,10, 0, 0, 0, 0, 0, "");
|
||||||
|
uiBlockSetCol(block, TH_BUT_NEUTRAL);
|
||||||
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATPLANE, 210,180,25,22, &(ma->pr_type), 10, 0, 0, 0, "");
|
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATPLANE, 210,180,25,22, &(ma->pr_type), 10, 0, 0, 0, "");
|
||||||
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATSPHERE, 210,150,25,22, &(ma->pr_type), 10, 1, 0, 0, "");
|
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATSPHERE, 210,150,25,22, &(ma->pr_type), 10, 1, 0, 0, "");
|
||||||
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATCUBE, 210,120,25,22, &(ma->pr_type), 10, 2, 0, 0, "");
|
uiDefIconButC(block, ROW, B_MATPRV, ICON_MATCUBE, 210,120,25,22, &(ma->pr_type), 10, 2, 0, 0, "");
|
||||||
|
|||||||
@@ -129,14 +129,12 @@ void meshactionbuts(SpaceAction *saction, Key *key)
|
|||||||
|
|
||||||
sprintf(str, "actionbuttonswin %d", curarea->win);
|
sprintf(str, "actionbuttonswin %d", curarea->win);
|
||||||
block= uiNewBlock (&curarea->uiblocks, str,
|
block= uiNewBlock (&curarea->uiblocks, str,
|
||||||
UI_EMBOSSX, UI_HELV, curarea->win);
|
UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
x = NAMEWIDTH + 1;
|
x = NAMEWIDTH + 1;
|
||||||
y = key->totkey*(CHANNELHEIGHT+CHANNELSKIP)
|
y = key->totkey*(CHANNELHEIGHT+CHANNELSKIP)
|
||||||
- CHANNELHEIGHT/2 - G.v2d->cur.ymin;
|
- CHANNELHEIGHT/2 - G.v2d->cur.ymin;
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
/* make the little 'open the sliders' widget */
|
/* make the little 'open the sliders' widget */
|
||||||
glColor3f(RVKBGCOL);
|
glColor3f(RVKBGCOL);
|
||||||
glRects(2, y + 2*CHANNELHEIGHT - 2,
|
glRects(2, y + 2*CHANNELHEIGHT - 2,
|
||||||
@@ -168,7 +166,7 @@ void meshactionbuts(SpaceAction *saction, Key *key)
|
|||||||
/* sliders are open so draw them */
|
/* sliders are open so draw them */
|
||||||
glColor3f(RVKBGCOL);
|
glColor3f(RVKBGCOL);
|
||||||
glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy);
|
glRects(NAMEWIDTH, 0, NAMEWIDTH+SLIDERWIDTH, curarea->winy);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
for (i=1 ; i < key->totkey ; ++ i) {
|
for (i=1 ; i < key->totkey ; ++ i) {
|
||||||
make_rvk_slider(block, key, i,
|
make_rvk_slider(block, key, i,
|
||||||
x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1);
|
x, y, SLIDERWIDTH-2, CHANNELHEIGHT-1);
|
||||||
|
|||||||
@@ -438,8 +438,8 @@ void draw_sima_area(SpaceImaSel *simasel)
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
sprintf(naam, "win %d", curarea->win);
|
sprintf(naam, "win %d", curarea->win);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
if (simasel->desx > 0){
|
if (simasel->desx > 0){
|
||||||
/* DIR ENTRYS */
|
/* DIR ENTRYS */
|
||||||
|
|||||||
@@ -761,7 +761,6 @@ static void draw_ipobuts(SpaceIpo *sipo)
|
|||||||
|
|
||||||
sprintf(naam, "ipowin %d", area->win);
|
sprintf(naam, "ipowin %d", area->win);
|
||||||
block= uiNewBlock(&area->uiblocks, naam, UI_EMBOSSN, UI_HELV, area->win);
|
block= uiNewBlock(&area->uiblocks, naam, UI_EMBOSSN, UI_HELV, area->win);
|
||||||
uiBlockSetCol(block, BUTRUST);
|
|
||||||
|
|
||||||
ei= sipo->editipo;
|
ei= sipo->editipo;
|
||||||
y= area->winy-30+sipo->butofs;
|
y= area->winy-30+sipo->butofs;
|
||||||
|
|||||||
@@ -732,7 +732,7 @@ static void tekenvertslatt(short sel)
|
|||||||
float size;
|
float size;
|
||||||
int a, uxt, u, vxt, v, wxt, w;
|
int a, uxt, u, vxt, v, wxt, w;
|
||||||
|
|
||||||
size= BIF_GetThemeColorf(TH_VERTEX_SIZE);
|
size= BIF_GetThemeValuef(TH_VERTEX_SIZE);
|
||||||
glPointSize(size);
|
glPointSize(size);
|
||||||
|
|
||||||
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
||||||
@@ -1036,7 +1036,7 @@ void tekenvertices(short sel)
|
|||||||
EditVert *eve;
|
EditVert *eve;
|
||||||
float size;
|
float size;
|
||||||
|
|
||||||
size= BIF_GetThemeColorf(TH_VERTEX_SIZE);
|
size= BIF_GetThemeValuef(TH_VERTEX_SIZE);
|
||||||
glPointSize(size);
|
glPointSize(size);
|
||||||
|
|
||||||
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
||||||
@@ -2788,7 +2788,7 @@ static void tekenvertsN(Nurb *nu, short sel)
|
|||||||
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
if(sel) BIF_ThemeColor(TH_VERTEX_SELECT);
|
||||||
else BIF_ThemeColor(TH_VERTEX);
|
else BIF_ThemeColor(TH_VERTEX);
|
||||||
|
|
||||||
size= BIF_GetThemeColorf(TH_VERTEX_SIZE);
|
size= BIF_GetThemeValuef(TH_VERTEX_SIZE);
|
||||||
glPointSize(size);
|
glPointSize(size);
|
||||||
|
|
||||||
glBegin(GL_POINTS);
|
glBegin(GL_POINTS);
|
||||||
|
|||||||
@@ -1071,7 +1071,7 @@ static void view3d_panel_object(short cntrl) // VIEW3D_HANDLER_OBJECT
|
|||||||
|
|
||||||
if(ob==NULL) return;
|
if(ob==NULL) return;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_panel_object", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_panel_object", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
|
uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
|
||||||
uiSetPanelHandler(VIEW3D_HANDLER_OBJECT); // for close and esc
|
uiSetPanelHandler(VIEW3D_HANDLER_OBJECT); // for close and esc
|
||||||
if(uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Transform Properties", "View3d", 10, 230, 318, 204)==0) return;
|
||||||
@@ -1112,7 +1112,7 @@ static void view3d_panel_settings(cntrl) // VIEW3D_HANDLER_BACKGROUND
|
|||||||
|
|
||||||
vd= G.vd;
|
vd= G.vd;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_panel_settings", UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_panel_settings", UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
|
uiPanelControl(UI_PNL_SOLID | UI_PNL_CLOSE | cntrl);
|
||||||
uiSetPanelHandler(VIEW3D_HANDLER_BACKGROUND); // for close and esc
|
uiSetPanelHandler(VIEW3D_HANDLER_BACKGROUND); // for close and esc
|
||||||
if(uiNewPanel(curarea, block, "Backdrop and settings", "View3d", 10, 10, 318, 204)==0) return;
|
if(uiNewPanel(curarea, block, "Backdrop and settings", "View3d", 10, 10, 318, 204)==0) return;
|
||||||
@@ -1124,9 +1124,7 @@ static void view3d_panel_settings(cntrl) // VIEW3D_HANDLER_BACKGROUND
|
|||||||
vd->bgpic->blend= 0.5;
|
vd->bgpic->blend= 0.5;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "BackGroundPic", 10,160,150,20 , &vd->flag, 0, 0, 0, 0, "Display a picture in the 3D background");
|
uiDefButS(block, TOG|BIT|1, REDRAWVIEW3D, "BackGroundPic", 10,160,150,20 , &vd->flag, 0, 0, 0, 0, "Display a picture in the 3D background");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if(vd->bgpic) {
|
if(vd->bgpic) {
|
||||||
|
|
||||||
@@ -1142,9 +1140,7 @@ static void view3d_panel_settings(cntrl) // VIEW3D_HANDLER_BACKGROUND
|
|||||||
uiDefBut(block, TEX, 0,"BGpic: ", 30,140,260,19,&vd->bgpic->ima->name,0.0,100.0, 0, 0, "The Selected BackGroundPic");
|
uiDefBut(block, TEX, 0,"BGpic: ", 30,140,260,19,&vd->bgpic->ima->name,0.0,100.0, 0, 0, "The Selected BackGroundPic");
|
||||||
uiDefIconBut(block, BUT, B_BGPICCLEAR, ICON_X, 290,140,20,19, 0, 0, 0, 0, 0, "Remove background image link");
|
uiDefIconBut(block, BUT, B_BGPICCLEAR, ICON_X, 290,140,20,19, 0, 0, 0, 0, 0, "Remove background image link");
|
||||||
}
|
}
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_LOADBGPIC, "LOAD", 10,120,100,19, 0, 0, 0, 0, 0, "Specify the BackGroundPic");
|
uiDefBut(block, BUT, B_LOADBGPIC, "LOAD", 10,120,100,19, 0, 0, 0, 0, 0, "Specify the BackGroundPic");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
uiDefButF(block, NUMSLI, B_BLENDBGPIC, "Blend:", 120,120,190,19,&vd->bgpic->blend, 0.0,1.0, 0, 0, "Set the BackGroundPic transparency");
|
uiDefButF(block, NUMSLI, B_BLENDBGPIC, "Blend:", 120,120,190,19,&vd->bgpic->blend, 0.0,1.0, 0, 0, "Set the BackGroundPic transparency");
|
||||||
|
|
||||||
/* There is a bug here ... (what bug? where? what is this? - zr) */
|
/* There is a bug here ... (what bug? where? what is this? - zr) */
|
||||||
|
|||||||
@@ -303,8 +303,8 @@ void headerbox(ScrArea *area)
|
|||||||
glClear(GL_COLOR_BUFFER_BIT);
|
glClear(GL_COLOR_BUFFER_BIT);
|
||||||
|
|
||||||
if(area_is_active_area(area)) BIF_ThemeColor(TH_HEADER);
|
if(area_is_active_area(area)) BIF_ThemeColor(TH_HEADER);
|
||||||
else BIF_ThemeColorShade(TH_HEADER, -20);
|
else BIF_ThemeColor(TH_HEADERDESEL);
|
||||||
|
|
||||||
/* weird values here... is because of window matrix that centres buttons */
|
/* weird values here... is because of window matrix that centres buttons */
|
||||||
if(area->headertype==HEADERTOP) {
|
if(area->headertype==HEADERTOP) {
|
||||||
uiSetRoundBox(3);
|
uiSetRoundBox(3);
|
||||||
|
|||||||
@@ -1164,8 +1164,7 @@ void drawfilespace(ScrArea *sa, void *spacedata)
|
|||||||
|
|
||||||
/* HEADER */
|
/* HEADER */
|
||||||
sprintf(name, "win %d", curarea->win);
|
sprintf(name, "win %d", curarea->win);
|
||||||
block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, name, UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiSetButLock( sfile->type==FILE_MAIN && sfile->returnfunc, NULL);
|
uiSetButLock( sfile->type==FILE_MAIN && sfile->returnfunc, NULL);
|
||||||
|
|
||||||
|
|||||||
@@ -173,8 +173,10 @@ void action_buttons(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTPINK);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_ACTION;
|
curarea->butspacetype= SPACE_ACTION;
|
||||||
|
|
||||||
|
|||||||
@@ -89,9 +89,6 @@
|
|||||||
|
|
||||||
Material matcopybuf;
|
Material matcopybuf;
|
||||||
|
|
||||||
static void unique_bone_name(Bone *bone, bArmature *arm);
|
|
||||||
static int bonename_exists(Bone *orig, char *name, ListBase *list);
|
|
||||||
|
|
||||||
void clear_matcopybuf(void)
|
void clear_matcopybuf(void)
|
||||||
{
|
{
|
||||||
memset(&matcopybuf, 0, sizeof(Material));
|
memset(&matcopybuf, 0, sizeof(Material));
|
||||||
@@ -295,6 +292,7 @@ void buttons_active_id(ID **id, ID **idfrom)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
static void validate_bonebutton(void *bonev, void *data2_unused){
|
static void validate_bonebutton(void *bonev, void *data2_unused){
|
||||||
Bone *bone= bonev;
|
Bone *bone= bonev;
|
||||||
bArmature *arm;
|
bArmature *arm;
|
||||||
@@ -303,6 +301,7 @@ static void validate_bonebutton(void *bonev, void *data2_unused){
|
|||||||
unique_bone_name(bone, arm);
|
unique_bone_name(bone, arm);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int bonename_exists(Bone *orig, char *name, ListBase *list)
|
static int bonename_exists(Bone *orig, char *name, ListBase *list)
|
||||||
{
|
{
|
||||||
Bone *curbone;
|
Bone *curbone;
|
||||||
@@ -360,7 +359,6 @@ static uiBlock *sbuts_context_menu(void *arg_unused)
|
|||||||
short yco = 0;
|
short yco = 0;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "context_options", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "context_options", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
/* should be branches from tree */
|
/* should be branches from tree */
|
||||||
uiDefIconTextButS(block, BUTM, B_REDR, ICON_SCENE_DEHLT, "Scene|F10", 0, yco-=22, 100, 20, &G.buts->mainb, 0.0, 0.0, 0, 0, "");
|
uiDefIconTextButS(block, BUTM, B_REDR, ICON_SCENE_DEHLT, "Scene|F10", 0, yco-=22, 100, 20, &G.buts->mainb, 0.0, 0.0, 0, 0, "");
|
||||||
@@ -380,7 +378,7 @@ static uiBlock *sbuts_context_menu(void *arg_unused)
|
|||||||
|
|
||||||
return block;
|
return block;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void buts_buttons(void)
|
void buts_buttons(void)
|
||||||
{
|
{
|
||||||
@@ -390,8 +388,10 @@ void buts_buttons(void)
|
|||||||
char naam[20];
|
char naam[20];
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_BUTS;
|
curarea->butspacetype= SPACE_BUTS;
|
||||||
|
|
||||||
@@ -411,9 +411,6 @@ void buts_buttons(void)
|
|||||||
|
|
||||||
/* mainb menu */
|
/* mainb menu */
|
||||||
/* (this could be done later with a dynamic tree and branches, also for python) */
|
/* (this could be done later with a dynamic tree and branches, also for python) */
|
||||||
uiBlockSetCol(block, MIDGREY);
|
|
||||||
// uiBlockSetEmboss(block, UI_EMBOSSMB); // menu but
|
|
||||||
|
|
||||||
//{
|
//{
|
||||||
// char mainbname[8][12]= {" Scene", " Object", " Types", " Shading", " Editing", " Script", " Logic"};
|
// char mainbname[8][12]= {" Scene", " Object", " Types", " Shading", " Editing", " Script", " Logic"};
|
||||||
// char mainbicon[8]= {ICON_SCENE_DEHLT, ICON_OBJECT, ICON_BBOX, ICON_MATERIAL_DEHLT, ICON_EDIT, ICON_SCRIPT, ICON_GAME};
|
// char mainbicon[8]= {ICON_SCENE_DEHLT, ICON_OBJECT, ICON_BBOX, ICON_MATERIAL_DEHLT, ICON_EDIT, ICON_SCRIPT, ICON_GAME};
|
||||||
@@ -433,7 +430,7 @@ void buts_buttons(void)
|
|||||||
// if(curarea->headertype==HEADERTOP) t_base= -3; else t_base= 4;
|
// if(curarea->headertype==HEADERTOP) t_base= -3; else t_base= 4;
|
||||||
|
|
||||||
/* select the context to be drawn, per contex/tab the actual context is tested */
|
/* select the context to be drawn, per contex/tab the actual context is tested */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX); // normal
|
uiBlockSetEmboss(block, UI_EMBOSS); // normal
|
||||||
switch(G.buts->mainb) {
|
switch(G.buts->mainb) {
|
||||||
case CONTEXT_SCENE:
|
case CONTEXT_SCENE:
|
||||||
uiDefIconButC(block, ROW, B_REDR, ICON_SCENE, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_RENDER, 0, 0, "Render buttons ");
|
uiDefIconButC(block, ROW, B_REDR, ICON_SCENE, xco+=XIC, t_base, XIC, YIC, &(G.buts->tab[CONTEXT_SCENE]), 1.0, (float)TAB_SCENE_RENDER, 0, 0, "Render buttons ");
|
||||||
|
|||||||
@@ -104,8 +104,10 @@ void file_buttons(void)
|
|||||||
sfile= curarea->spacedata.first;
|
sfile= curarea->spacedata.first;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_FILE;
|
curarea->butspacetype= SPACE_FILE;
|
||||||
|
|
||||||
@@ -128,7 +130,7 @@ void file_buttons(void)
|
|||||||
cpack(0x0);
|
cpack(0x0);
|
||||||
glRasterPos2i(xco+=XIC+10, 5);
|
glRasterPos2i(xco+=XIC+10, 5);
|
||||||
|
|
||||||
BIF_DrawString(uiBlockGetCurFont(block), sfile->title, (U.transopts & TR_BUTTONS), 0);
|
BIF_DrawString(uiBlockGetCurFont(block), sfile->title, (U.transopts & TR_BUTTONS));
|
||||||
xco+= BIF_GetStringWidth(G.font, sfile->title, (U.transopts & TR_BUTTONS));
|
xco+= BIF_GetStringWidth(G.font, sfile->title, (U.transopts & TR_BUTTONS));
|
||||||
|
|
||||||
uiDefIconButS(block, ICONTOG|BIT|0, B_SORTFILELIST, ICON_LONGDISPLAY,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Toggles long info");
|
uiDefIconButS(block, ICONTOG|BIT|0, B_SORTFILELIST, ICON_LONGDISPLAY,xco+=XIC,0,XIC,YIC, &sfile->flag, 0, 0, 0, 0, "Toggles long info");
|
||||||
@@ -151,7 +153,7 @@ void file_buttons(void)
|
|||||||
cpack(0x0);
|
cpack(0x0);
|
||||||
glRasterPos2i(xco, 5);
|
glRasterPos2i(xco, 5);
|
||||||
|
|
||||||
BIF_DrawString(uiBlockGetCurFont(block), naam, 0, 0);
|
BIF_DrawString(uiBlockGetCurFont(block), naam, 0);
|
||||||
}
|
}
|
||||||
/* always do as last */
|
/* always do as last */
|
||||||
curarea->headbutlen= xco+2*XIC;
|
curarea->headbutlen= xco+2*XIC;
|
||||||
|
|||||||
@@ -361,8 +361,10 @@ void image_buttons(void)
|
|||||||
headerbuttons_packdummy = 0;
|
headerbuttons_packdummy = 0;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
what_image(G.sima);
|
what_image(G.sima);
|
||||||
|
|
||||||
@@ -393,18 +395,18 @@ void image_buttons(void)
|
|||||||
xco += XIC;
|
xco += XIC;
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_SIMAGELOAD, "Load", xco+=XIC,0,2*XIC,YIC, 0, 0, 0, 0, 0, "Loads image - thumbnail view");
|
uiDefBut(block, BUT, B_SIMAGELOAD, "Load", xco+=XIC,0,2*XIC,YIC, 0, 0, 0, 0, 0, "Loads image - thumbnail view");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_HEADER);
|
||||||
uiDefBut(block, BUT, B_SIMAGELOAD1, "", (short)(xco+=2*XIC+2),0,10,YIC, 0, 0, 0, 0, 0, "Loads image - file select view");
|
uiDefBut(block, BUT, B_SIMAGELOAD1, "", (short)(xco+=2*XIC+2),0,10,YIC, 0, 0, 0, 0, 0, "Loads image - file select view");
|
||||||
xco+=XIC/2;
|
xco+=XIC/2;
|
||||||
|
|
||||||
if (G.sima->image) {
|
if (G.sima->image) {
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiDefBut(block, BUT, B_SIMAGEREPLACE, "Replace",xco+=XIC,0,(short)(3*XIC),YIC, 0, 0, 0, 0, 0, "Replaces current image - thumbnail view");
|
uiDefBut(block, BUT, B_SIMAGEREPLACE, "Replace",xco+=XIC,0,(short)(3*XIC),YIC, 0, 0, 0, 0, 0, "Replaces current image - thumbnail view");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
uiBlockSetCol(block, TH_HEADER);
|
||||||
uiDefBut(block, BUT, B_SIMAGEREPLACE1, "", (short)(xco+=3*XIC+2),0,10,YIC, 0, 0, 0, 0, 0, "Replaces current image - file select view");
|
uiDefBut(block, BUT, B_SIMAGEREPLACE1, "", (short)(xco+=3*XIC+2),0,10,YIC, 0, 0, 0, 0, 0, "Replaces current image - file select view");
|
||||||
xco+=XIC/2;
|
xco+=XIC/2;
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ void imasel_buttons(void)
|
|||||||
simasel= curarea->spacedata.first;
|
simasel= curarea->spacedata.first;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_IMASEL;
|
curarea->butspacetype= SPACE_IMASEL;
|
||||||
|
|
||||||
|
|||||||
@@ -592,7 +592,6 @@ static uiBlock *info_file_optionsmenu(void *arg_unused)
|
|||||||
block= uiNewBlock(&curarea->uiblocks, "runtime_options", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "runtime_options", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_file_optionsmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_file_optionsmenu, NULL);
|
||||||
uiBlockSetXOfs(block,-40); // offset to parent button
|
uiBlockSetXOfs(block,-40); // offset to parent button
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
/* flags are case-values */
|
/* flags are case-values */
|
||||||
uiDefBut(block, BUTM, 1, "Compress File", xco, yco-=20, 100, 19, NULL, 0.0, 0.0, 0, G_FILE_COMPRESS_BIT, "Enables file compression");
|
uiDefBut(block, BUTM, 1, "Compress File", xco, yco-=20, 100, 19, NULL, 0.0, 0.0, 0, G_FILE_COMPRESS_BIT, "Enables file compression");
|
||||||
@@ -606,7 +605,7 @@ static uiBlock *info_file_optionsmenu(void *arg_unused)
|
|||||||
|
|
||||||
yco= 0;
|
yco= 0;
|
||||||
xco -= 20;
|
xco -= 20;
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetButmFunc(block, NULL, NULL);
|
uiBlockSetButmFunc(block, NULL, NULL);
|
||||||
/* flags are defines */
|
/* flags are defines */
|
||||||
uiDefIconButI(block, ICONTOG|BIT|G_FILE_COMPRESS_BIT, 0, ICON_CHECKBOX_DEHLT, xco, yco-=20, 19, 19, &G.fileflags, 0.0, 0.0, 0, 0, "");
|
uiDefIconButI(block, ICONTOG|BIT|G_FILE_COMPRESS_BIT, 0, ICON_CHECKBOX_DEHLT, xco, yco-=20, 19, 19, &G.fileflags, 0.0, 0.0, 0, 0, "");
|
||||||
@@ -626,8 +625,7 @@ static uiBlock *info_runtime_optionsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "add_surfacemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "add_surfacemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetXOfs(block, -40); // offset to parent button
|
uiBlockSetXOfs(block, -40); // offset to parent button
|
||||||
uiBlockSetCol(block, MENUCOL);
|
uiBlockSetEmboss(block, UI_EMBOSSM);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSW);
|
|
||||||
|
|
||||||
uiDefBut(block, LABEL, 0, "Size options:", xco, yco-=20, 114, 19, 0, 0.0, 0.0, 0, 0, "");
|
uiDefBut(block, LABEL, 0, "Size options:", xco, yco-=20, 114, 19, 0, 0.0, 0.0, 0, 0, "");
|
||||||
uiDefButS(block, NUM, 0, "X:", xco+19, yco-=20, 95, 19, &G.scene->r.xplay, 10.0, 2000.0, 0, 0, "Displays current X screen/window resolution. Click to change.");
|
uiDefButS(block, NUM, 0, "X:", xco+19, yco-=20, 95, 19, &G.scene->r.xplay, 10.0, 2000.0, 0, 0, "Displays current X screen/window resolution. Click to change.");
|
||||||
@@ -688,7 +686,6 @@ static uiBlock *info_file_importmenu(void *arg_unused)
|
|||||||
block= uiNewBlock(&curarea->uiblocks, "importmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "importmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_file_importmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_file_importmenu, NULL);
|
||||||
//uiBlockSetXOfs(block, -50); // offset to parent button
|
//uiBlockSetXOfs(block, -50); // offset to parent button
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "Python scripts go here somehow!", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefBut(block, BUTM, 1, "Python scripts go here somehow!", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -731,7 +728,6 @@ static uiBlock *info_file_exportmenu(void *arg_unused)
|
|||||||
block= uiNewBlock(&curarea->uiblocks, "exportmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "exportmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_file_exportmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_file_exportmenu, NULL);
|
||||||
//uiBlockSetXOfs(block, -50); // offset to parent button
|
//uiBlockSetXOfs(block, -50); // offset to parent button
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "VRML 1.0...|Ctrl F2", 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefBut(block, BUTM, 1, "VRML 1.0...|Ctrl F2", 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefBut(block, BUTM, 1, "DXF...|Shift F2", 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefBut(block, BUTM, 1, "DXF...|Shift F2", 0, yco-=20, 120, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -839,7 +835,6 @@ static uiBlock *info_filemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "info_filemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "info_filemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_filemenu, NULL);
|
uiBlockSetButmFunc(block, do_info_filemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "New|Ctrl X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "New|Ctrl X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Open...|F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Open...|F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -939,7 +934,6 @@ static uiBlock *info_add_meshmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "add_meshmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "add_meshmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_add_meshmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_add_meshmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plane|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Plane|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cube|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Cube|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -996,7 +990,6 @@ static uiBlock *info_add_curvemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "add_curvemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "add_curvemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_add_curvemenu, NULL);
|
uiBlockSetButmFunc(block, do_info_add_curvemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bezier Curve|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bezier Curve|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bezier Circle|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bezier Circle|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1053,7 +1046,6 @@ static uiBlock *info_add_surfacemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "add_surfacemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "add_surfacemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_add_surfacemenu, NULL);
|
uiBlockSetButmFunc(block, do_info_add_surfacemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "NURBS Curve|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "NURBS Curve|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "NURBS Circle|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "NURBS Circle|", 0, yco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1106,7 +1098,6 @@ static uiBlock *info_add_metamenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "add_metamenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "add_metamenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_add_metamenu, NULL);
|
uiBlockSetButmFunc(block, do_info_add_metamenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,"Meta Ball|", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1,"Meta Ball|", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Meta Tube|", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Meta Tube|", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1176,7 +1167,6 @@ static uiBlock *info_addmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "addmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "addmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_addmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_addmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBlockBut(block, info_add_meshmenu, NULL, ICON_RIGHTARROW_THIN, "Mesh", 0, yco-=20, 120, 19, "");
|
uiDefIconTextBlockBut(block, info_add_meshmenu, NULL, ICON_RIGHTARROW_THIN, "Mesh", 0, yco-=20, 120, 19, "");
|
||||||
uiDefIconTextBlockBut(block, info_add_curvemenu, NULL, ICON_RIGHTARROW_THIN, "Curve", 0, yco-=20, 120, 19, "");
|
uiDefIconTextBlockBut(block, info_add_curvemenu, NULL, ICON_RIGHTARROW_THIN, "Curve", 0, yco-=20, 120, 19, "");
|
||||||
@@ -1224,7 +1214,6 @@ static uiBlock *info_gamemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "gamemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "gamemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_gamemenu, NULL);
|
uiBlockSetButmFunc(block, do_info_gamemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, B_STARTGAME, ICON_BLANK1, "Start Game|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefIconTextBut(block, BUTM, B_STARTGAME, ICON_BLANK1, "Start Game|P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
|
|
||||||
@@ -1350,7 +1339,6 @@ static uiBlock *info_timelinemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "timelinemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "timelinemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_timelinemenu, NULL);
|
uiBlockSetButmFunc(block, do_info_timelinemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Keyframes|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Keyframes|K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show and Select Keyframes|Shift K",0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show and Select Keyframes|Shift K",0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||||
@@ -1473,7 +1461,6 @@ static uiBlock *info_rendermenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "rendermenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "rendermenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_rendermenu, NULL);
|
uiBlockSetButmFunc(block, do_info_rendermenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Render Current Frame|F12", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Render Current Frame|F12", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Render Animation", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Render Animation", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1523,7 +1510,6 @@ static uiBlock *info_help_websitesmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "info_help_websitesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "info_help_websitesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_info_help_websitesmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_help_websitesmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Blender Website *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Blender Website *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Blender E-shop *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Blender E-shop *", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1580,7 +1566,6 @@ static uiBlock *info_helpmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "info_helpmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "info_helpmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_info_helpmenu, NULL);
|
uiBlockSetButmFunc(block, do_info_helpmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "-- Placeholders only --", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "-- Placeholders only --", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -1665,23 +1650,23 @@ static void info_text(int x, int y)
|
|||||||
|
|
||||||
glRasterPos2i(x, y);
|
glRasterPos2i(x, y);
|
||||||
|
|
||||||
BIF_DrawString(G.font, headerstr, (U.transopts & TR_MENUS), 0);
|
BIF_DrawString(G.font, headerstr, (U.transopts & TR_MENUS));
|
||||||
|
|
||||||
glRasterPos2i(x+122, y);
|
glRasterPos2i(x+122, y);
|
||||||
|
|
||||||
BIF_DrawString(G.font, infostr, (U.transopts & TR_MENUS), 0);
|
BIF_DrawString(G.font, infostr, (U.transopts & TR_MENUS));
|
||||||
}
|
}
|
||||||
|
|
||||||
void info_buttons(void)
|
void info_buttons(void)
|
||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
short xco= 42;
|
short xco= 42;
|
||||||
char naam[20];
|
|
||||||
int xmax;
|
int xmax;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "header info", UI_EMBOSSN, UI_HELV, curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSN, UI_HELV, curarea->headwin);
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
if(U.uiflag & FLIPINFOMENU) {
|
if(U.uiflag & FLIPINFOMENU) {
|
||||||
uiDefIconButS(block, TOG|BIT|6, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
|
uiDefIconButS(block, TOG|BIT|6, B_FLIPINFOMENU, ICON_DISCLOSURE_TRI_RIGHT,
|
||||||
@@ -1697,10 +1682,7 @@ void info_buttons(void)
|
|||||||
if(U.uiflag & FLIPINFOMENU) {
|
if(U.uiflag & FLIPINFOMENU) {
|
||||||
} else {
|
} else {
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
if(area_is_active_area(curarea)) uiBlockSetCol(block, HEADERCOLSEL);
|
|
||||||
else uiBlockSetCol(block, HEADERCOL);
|
|
||||||
|
|
||||||
|
|
||||||
/* the 'xmax - 3' rather than xmax is to prevent some weird flickering where the highlighted
|
/* the 'xmax - 3' rather than xmax is to prevent some weird flickering where the highlighted
|
||||||
* menu is drawn wider than it should be. The ypos of -1 is to make it properly fill the
|
* menu is drawn wider than it should be. The ypos of -1 is to make it properly fill the
|
||||||
* height of the header */
|
* height of the header */
|
||||||
@@ -1731,19 +1713,16 @@ void info_buttons(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* pack icon indicates a packed file */
|
/* pack icon indicates a packed file */
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if (G.fileflags & G_AUTOPACK) {
|
if (G.fileflags & G_AUTOPACK) {
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||||
uiDefIconBut(block, LABEL, 0, ICON_PACKAGE, xco, 0, XIC, YIC, &G.fileflags, 0.0, 0.0, 0, 0, "Indicates this is a Packed file. See File menu.");
|
uiDefIconBut(block, LABEL, 0, ICON_PACKAGE, xco, 0, XIC, YIC, &G.fileflags, 0.0, 0.0, 0, 0, "Indicates this is a Packed file. See File menu.");
|
||||||
xco += XIC;
|
xco += XIC;
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
|
|
||||||
if (curarea->full == 0) {
|
if (curarea->full == 0) {
|
||||||
curarea->butspacetype= SPACE_INFO;
|
curarea->butspacetype= SPACE_INFO;
|
||||||
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 8,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
|
uiDefIconTextButC(block, ICONTEXTROW,B_NEWSPACE, ICON_VIEW3D, windowtype_pup(), 8,0,XIC+10,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Displays Current Window Type. Click for menu of available types.");
|
||||||
|
|
||||||
/* STD SCREEN BUTTONS */
|
/* STD SCREEN BUTTONS */
|
||||||
@@ -1761,13 +1740,7 @@ void info_buttons(void)
|
|||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||||
uiDefIconBut(block, BUT, B_SHOWSPLASH, ICON_BLENDER, xco+7, 0,XIC,YIC, 0, 0, 0, 0, 0, "Click to display Splash Screen");
|
uiDefIconBut(block, BUT, B_SHOWSPLASH, ICON_BLENDER, xco+7, 0,XIC,YIC, 0, 0, 0, 0, 0, "Click to display Splash Screen");
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
|
|
||||||
/*
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
|
||||||
uiDefIconBut(block, LABEL, 0, ICON_PUBLISHER, xco+125, 0,XIC,YIC, 0, 0, 0, 0, 0, "");
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
*/
|
|
||||||
/* always do as last */
|
/* always do as last */
|
||||||
curarea->headbutlen= xco+2*XIC;
|
curarea->headbutlen= xco+2*XIC;
|
||||||
|
|
||||||
|
|||||||
@@ -63,6 +63,8 @@
|
|||||||
#include "BIF_interface.h"
|
#include "BIF_interface.h"
|
||||||
#include "BIF_resources.h"
|
#include "BIF_resources.h"
|
||||||
#include "BIF_screen.h"
|
#include "BIF_screen.h"
|
||||||
|
#include "BIF_space.h"
|
||||||
|
|
||||||
#include "BKE_global.h"
|
#include "BKE_global.h"
|
||||||
#include "BKE_main.h"
|
#include "BKE_main.h"
|
||||||
#include "BKE_material.h"
|
#include "BKE_material.h"
|
||||||
@@ -207,8 +209,10 @@ void ipo_buttons(void)
|
|||||||
char naam[20];
|
char naam[20];
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_IPO;
|
curarea->butspacetype= SPACE_IPO;
|
||||||
|
|
||||||
|
|||||||
@@ -106,8 +106,10 @@ void nla_buttons(void)
|
|||||||
snla= curarea->spacedata.first;
|
snla= curarea->spacedata.first;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTCHOKE);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_NLA;
|
curarea->butspacetype= SPACE_NLA;
|
||||||
|
|
||||||
|
|||||||
@@ -111,8 +111,10 @@ void oops_buttons(void)
|
|||||||
soops= curarea->spacedata.first;
|
soops= curarea->spacedata.first;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_OOPS;
|
curarea->butspacetype= SPACE_OOPS;
|
||||||
|
|
||||||
|
|||||||
@@ -102,8 +102,10 @@ void seq_buttons()
|
|||||||
sseq= curarea->spacedata.first;
|
sseq= curarea->spacedata.first;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTPURPLE);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_SEQ;
|
curarea->butspacetype= SPACE_SEQ;
|
||||||
|
|
||||||
|
|||||||
@@ -179,8 +179,10 @@ void sound_buttons(void)
|
|||||||
char ch[20];
|
char ch[20];
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTYELLOW);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_SOUND;
|
curarea->butspacetype= SPACE_SOUND;
|
||||||
|
|
||||||
|
|||||||
@@ -192,8 +192,10 @@ void text_buttons(void)
|
|||||||
if (!st || st->spacetype != SPACE_TEXT) return;
|
if (!st || st->spacetype != SPACE_TEXT) return;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
sprintf(naam, "header %d", curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_TEXT;
|
curarea->butspacetype= SPACE_TEXT;
|
||||||
|
|
||||||
|
|||||||
@@ -208,7 +208,6 @@ static uiBlock *view3d_view_cameracontrolsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_view_cameracontrolsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_view_cameracontrolsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_view_cameracontrolsmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_view_cameracontrolsmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Left|NumPad 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Left|NumPad 4", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Right|NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Orbit Right|NumPad 6", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 1, "");
|
||||||
@@ -301,7 +300,6 @@ static uiBlock *view3d_viewmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_viewmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_viewmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
if ((G.vd->viewbut == 0) && !(G.vd->persp == 2)) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
if ((G.vd->viewbut == 0) && !(G.vd->persp == 2)) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "User", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
@@ -406,11 +404,10 @@ static void do_view3d_select_object_typemenu(void *arg, int event)
|
|||||||
static uiBlock *view3d_select_object_typemenu(void *arg_unused)
|
static uiBlock *view3d_select_object_typemenu(void *arg_unused)
|
||||||
{
|
{
|
||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
short xco= 0, yco = 20, menuwidth = 120;
|
short yco = 20, menuwidth = 120;
|
||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_object_typemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_object_typemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_object_typemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_object_typemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mesh", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Mesh", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Curve", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -474,7 +471,6 @@ static uiBlock *view3d_select_object_layermenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_object_layermenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_object_layermenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_object_layermenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_object_layermenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefBut(block, BUTM, 1, "1", xco, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefBut(block, BUTM, 1, "1", xco, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
uiDefBut(block, BUTM, 1, "2", xco+=(menuwidth+1), yco, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
uiDefBut(block, BUTM, 1, "2", xco+=(menuwidth+1), yco, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||||
@@ -536,7 +532,6 @@ static uiBlock *view3d_select_objectmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_objectmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_objectmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_objectmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_objectmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -598,7 +593,6 @@ static uiBlock *view3d_select_meshmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_meshmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_meshmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_meshmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_meshmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -659,7 +653,6 @@ static uiBlock *view3d_select_curvemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_curvemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_curvemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_curvemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_curvemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -711,7 +704,6 @@ static uiBlock *view3d_select_metaballmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_metaballmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_metaballmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_metaballmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_metaballmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -753,7 +745,6 @@ static uiBlock *view3d_select_latticemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_latticemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_latticemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_latticemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_latticemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -795,7 +786,6 @@ static uiBlock *view3d_select_armaturemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_armaturemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_armaturemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -837,7 +827,6 @@ static uiBlock *view3d_select_pose_armaturemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_pose_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_pose_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_pose_armaturemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_pose_armaturemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -879,7 +868,6 @@ static uiBlock *view3d_select_faceselmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_select_faceselmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_select_faceselmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_select_faceselmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_select_faceselmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Border Select|B", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -931,7 +919,6 @@ static uiBlock *view3d_edit_object_transformmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_transformmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_transformmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_object_transformmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_object_transformmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Size/Rotation|Ctrl A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Size/Rotation|Ctrl A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Deformation|Ctrl Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Apply Deformation|Ctrl Shift A", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
||||||
@@ -968,7 +955,6 @@ static uiBlock *view3d_edit_object_parentmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_parentmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_parentmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_object_parentmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_object_parentmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Parent...|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Parent...|Ctrl P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Parent...|Alt P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Parent...|Alt P", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
@@ -998,7 +984,6 @@ static uiBlock *view3d_edit_object_trackmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_trackmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_trackmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_object_trackmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_object_trackmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Track...|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Make Track...|Ctrl T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Track...|Alt T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Track...|Alt T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
@@ -1080,7 +1065,6 @@ static uiBlock *view3d_edit_objectmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_objectmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_objectmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_objectmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_objectmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_MENU_PANEL, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 15, "");
|
||||||
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
@@ -1162,7 +1146,6 @@ static uiBlock *view3d_edit_propfalloffmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_propfalloffmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_propfalloffmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_propfalloffmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_propfalloffmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
if (prop_mode==0) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
if (prop_mode==0) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Sharp|Shift O", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
@@ -1196,7 +1179,6 @@ static uiBlock *view3d_edit_mesh_undohistorymenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_undohistorymenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_undohistorymenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_undohistorymenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_undohistorymenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo All Changes|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo All Changes|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
|
|
||||||
@@ -1245,7 +1227,6 @@ static uiBlock *view3d_edit_mesh_verticesmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_verticesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_verticesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_verticesmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_verticesmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Merge...|Alt M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Merge...|Alt M", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Split|Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Split|Y", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
||||||
@@ -1302,7 +1283,6 @@ static uiBlock *view3d_edit_mesh_edgesmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_edgesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_edgesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_edgesmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_edgesmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Knife Subdivide...|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Knife Subdivide...|Shift K", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||||
|
|
||||||
@@ -1349,7 +1329,6 @@ static uiBlock *view3d_edit_mesh_facesmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_facesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_facesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_facesmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_facesmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Fill|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Fill|Shift F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Beauty Fill|Alt F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Beauty Fill|Alt F", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1388,7 +1367,6 @@ static uiBlock *view3d_edit_mesh_normalsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_normalsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_normalsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_normalsmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_normalsmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Outside|Ctrl N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Outside|Ctrl N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Inside|Ctrl Shift N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recalculate Inside|Ctrl Shift N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1427,7 +1405,6 @@ static uiBlock *view3d_edit_mesh_showhidemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_mesh_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_mesh_showhidemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_mesh_showhidemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Vertices", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Vertices", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Vertices|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Vertices|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1493,7 +1470,6 @@ static uiBlock *view3d_edit_meshmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_meshmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_meshmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_meshmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_meshmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
uiDefIconTextBlockBut(block, view3d_edit_mesh_facesmenu, NULL, ICON_RIGHTARROW_THIN, "Move", 0, yco-=20, 120, 19, "");
|
uiDefIconTextBlockBut(block, view3d_edit_mesh_facesmenu, NULL, ICON_RIGHTARROW_THIN, "Move", 0, yco-=20, 120, 19, "");
|
||||||
@@ -1593,7 +1569,6 @@ static uiBlock *view3d_edit_curve_controlpointsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_controlpointsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_controlpointsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_curve_controlpointsmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_curve_controlpointsmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
if (OBACT->type == OB_CURVE) {
|
if (OBACT->type == OB_CURVE) {
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Tilt|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Tilt|T", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
@@ -1635,7 +1610,6 @@ static uiBlock *view3d_edit_curve_segmentsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_segmentsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_segmentsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_curve_segmentsmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_curve_segmentsmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Switch Direction", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Switch Direction", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1668,7 +1642,6 @@ static uiBlock *view3d_edit_curve_showhidemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curve_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_curve_showhidemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_curve_showhidemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Control Points|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Control Points|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 10, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Control Points|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Control Points|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 11, "");
|
||||||
@@ -1736,7 +1709,6 @@ static uiBlock *view3d_edit_curvemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curvemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_curvemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_curvemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_curvemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -1818,8 +1790,6 @@ static uiBlock *view3d_edit_metaballmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_metaballmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_metaballmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_metaballmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_metaballmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate|Shift D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Duplicate|Shift D", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete...|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Delete...|X", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||||
@@ -1906,7 +1876,6 @@ static uiBlock *view3d_edit_text_charsmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_text_charsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_text_charsmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_text_charsmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_text_charsmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copyright|Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copyright|Alt C", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Registered Trademark|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Registered Trademark|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -1962,7 +1931,6 @@ static uiBlock *view3d_edit_textmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_textmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_textmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_textmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_textmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -2020,7 +1988,6 @@ static uiBlock *view3d_edit_latticemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_latticemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_latticemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_latticemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_latticemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -2097,7 +2064,6 @@ static uiBlock *view3d_edit_armaturemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_edit_armaturemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_edit_armaturemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Editing|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
|
|
||||||
@@ -2156,7 +2122,6 @@ static uiBlock *view3d_pose_armature_transformmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armature_transformmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armature_transformmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_pose_armature_transformmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_pose_armature_transformmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Location|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Location|Alt G", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Rotation|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Clear Rotation|Alt R", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
|
||||||
@@ -2198,7 +2163,6 @@ static uiBlock *view3d_pose_armaturemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_pose_armaturemenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_pose_armaturemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_pose_armaturemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Transform Properties|N", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
uiDefIconTextBlockBut(block, view3d_pose_armature_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
|
uiDefIconTextBlockBut(block, view3d_pose_armature_transformmenu, NULL, ICON_RIGHTARROW_THIN, "Transform", 0, yco-=20, 120, 19, "");
|
||||||
@@ -2250,7 +2214,6 @@ static uiBlock *view3d_paintmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_paintmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_paintmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_paintmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_paintmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
if (G.f & G_VERTEXPAINT) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Vertex Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
if (G.f & G_VERTEXPAINT) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Vertex Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
if (G.f & G_WEIGHTPAINT) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Weight Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
if (G.f & G_WEIGHTPAINT) uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Undo Weight Painting|U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
|
||||||
@@ -2341,7 +2304,6 @@ static uiBlock *view3d_facesel_propertiesmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_facesel_propertiesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_facesel_propertiesmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_facesel_propertiesmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_facesel_propertiesmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
if (lasttface->mode & TF_TEX) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Textured", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
if (lasttface->mode & TF_TEX) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Textured", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Textured", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Textured", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 0, "");
|
||||||
@@ -2420,7 +2382,6 @@ static uiBlock *view3d_facesel_showhidemenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_facesel_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_facesel_showhidemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_facesel_showhidemenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_facesel_showhidemenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Faces|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Show Hidden Faces|Alt H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 4, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Faces|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Hide Selected Faces|H", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 5, "");
|
||||||
@@ -2498,7 +2459,6 @@ static uiBlock *view3d_faceselmenu(void *arg_unused)
|
|||||||
|
|
||||||
block= uiNewBlock(&curarea->uiblocks, "view3d_faceselmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "view3d_faceselmenu", UI_EMBOSSP, UI_HELV, curarea->headwin);
|
||||||
uiBlockSetButmFunc(block, do_view3d_faceselmenu, NULL);
|
uiBlockSetButmFunc(block, do_view3d_faceselmenu, NULL);
|
||||||
uiBlockSetCol(block, MENUCOL);
|
|
||||||
|
|
||||||
uiDefIconTextBlockBut(block, view3d_facesel_propertiesmenu, NULL, ICON_RIGHTARROW_THIN, "Active Draw Mode", 0, yco-=20, 120, 19, "");
|
uiDefIconTextBlockBut(block, view3d_facesel_propertiesmenu, NULL, ICON_RIGHTARROW_THIN, "Active Draw Mode", 0, yco-=20, 120, 19, "");
|
||||||
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copy Draw Mode", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Copy Draw Mode", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
|
||||||
@@ -2966,12 +2926,12 @@ void view3d_buttons(void)
|
|||||||
uiBlock *block;
|
uiBlock *block;
|
||||||
int a;
|
int a;
|
||||||
short xco = 0;
|
short xco = 0;
|
||||||
char naam[20];
|
|
||||||
short xmax;
|
short xmax;
|
||||||
|
|
||||||
sprintf(naam, "header %d", curarea->headwin);
|
block= uiNewBlock(&curarea->uiblocks, "header view3d", UI_EMBOSS, UI_HELV, curarea->headwin);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->headwin);
|
|
||||||
uiBlockSetCol(block, MIDGREY);
|
if(area_is_active_area(curarea)) uiBlockSetCol(block, TH_HEADER);
|
||||||
|
else uiBlockSetCol(block, TH_HEADERDESEL);
|
||||||
|
|
||||||
curarea->butspacetype= SPACE_VIEW3D;
|
curarea->butspacetype= SPACE_VIEW3D;
|
||||||
|
|
||||||
@@ -2983,8 +2943,6 @@ void view3d_buttons(void)
|
|||||||
|
|
||||||
/* pull down menus */
|
/* pull down menus */
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSP);
|
uiBlockSetEmboss(block, UI_EMBOSSP);
|
||||||
if(area_is_active_area(curarea)) uiBlockSetCol(block, HEADERCOLSEL);
|
|
||||||
else uiBlockSetCol(block, HEADERCOL);
|
|
||||||
|
|
||||||
/* compensate for local mode when setting up the viewing menu/iconrow values */
|
/* compensate for local mode when setting up the viewing menu/iconrow values */
|
||||||
if(G.vd->view==7) G.vd->viewbut= 1;
|
if(G.vd->view==7) G.vd->viewbut= 1;
|
||||||
@@ -3085,8 +3043,7 @@ void view3d_buttons(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* end pulldowns, other buttons: */
|
/* end pulldowns, other buttons: */
|
||||||
uiBlockSetCol(block, MIDGREY);
|
uiBlockSetEmboss(block, UI_EMBOSS);
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
|
||||||
|
|
||||||
/* mode */
|
/* mode */
|
||||||
G.vd->modeselect = V3D_OBJECTMODE_SEL;
|
G.vd->modeselect = V3D_OBJECTMODE_SEL;
|
||||||
@@ -3168,7 +3125,7 @@ void view3d_buttons(void)
|
|||||||
xco+= 14;
|
xco+= 14;
|
||||||
//uiDefIconButI(block, ICONTOG|BIT|14, B_PROPTOOL, ICON_GRID, xco+=XIC,0,XIC,YIC, &G.f, 0, 0, 0, 0, "Toggles Proportional Vertex Editing (OKEY)");
|
//uiDefIconButI(block, ICONTOG|BIT|14, B_PROPTOOL, ICON_GRID, xco+=XIC,0,XIC,YIC, &G.f, 0, 0, 0, 0, "Toggles Proportional Vertex Editing (OKEY)");
|
||||||
if(G.f & G_PROPORTIONAL) {
|
if(G.f & G_PROPORTIONAL) {
|
||||||
uiDefIconTextButS(block, ICONTEXTROW,B_REDR, ICON_SHARPCURVE, propfalloff_pup(), xco,0,XIC+10,YIC, &(prop_mode), 0, 1.0, 0, 0, "Proportional Edit Falloff (Hotkey: Shift O) ");
|
uiDefIconTextButI(block, ICONTEXTROW,B_REDR, ICON_SHARPCURVE, propfalloff_pup(), xco,0,XIC+10,YIC, &(prop_mode), 0, 1.0, 0, 0, "Proportional Edit Falloff (Hotkey: Shift O) ");
|
||||||
// uiDefIconButI(block, ROW, 0, ICON_SHARPCURVE, xco+=XIC,0,XIC,YIC, &prop_mode, 4.0, 0.0, 0, 0, "Sharp Proportional falloff (Hotkey: Shift O)");
|
// uiDefIconButI(block, ROW, 0, ICON_SHARPCURVE, xco+=XIC,0,XIC,YIC, &prop_mode, 4.0, 0.0, 0, 0, "Sharp Proportional falloff (Hotkey: Shift O)");
|
||||||
// uiDefIconButI(block, ROW, 0, ICON_SMOOTHCURVE, xco+=XIC,0,XIC,YIC, &prop_mode, 4.0, 1.0, 0, 0, "Smooth Proportional falloff (Hotkey: Shift O)");
|
// uiDefIconButI(block, ROW, 0, ICON_SMOOTHCURVE, xco+=XIC,0,XIC,YIC, &prop_mode, 4.0, 1.0, 0, 0, "Smooth Proportional falloff (Hotkey: Shift O)");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -301,10 +301,10 @@ int std_libbuttons(uiBlock *block, short xco, short yco,
|
|||||||
lb= wich_libbase(G.main, GS(id->name));
|
lb= wich_libbase(G.main, GS(id->name));
|
||||||
|
|
||||||
if(idwasnul) id= NULL;
|
if(idwasnul) id= NULL;
|
||||||
else if(id->us>1) uiBlockSetCol(block, BUTDBLUE);
|
else if(id->us>1) uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
if (pin && *pinpoin) {
|
if (pin && *pinpoin) {
|
||||||
uiBlockSetCol(block, BUTDPINK);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ELEM7( idtype, ID_SCE, ID_SCR, ID_MA, ID_TE, ID_WO, ID_IP, ID_AC) extrastr= "ADD NEW %x 32767";
|
if ELEM7( idtype, ID_SCE, ID_SCR, ID_MA, ID_TE, ID_WO, ID_IP, ID_AC) extrastr= "ADD NEW %x 32767";
|
||||||
@@ -375,13 +375,13 @@ int std_libbuttons(uiBlock *block, short xco, short yco,
|
|||||||
if(id) {
|
if(id) {
|
||||||
|
|
||||||
/* name */
|
/* name */
|
||||||
if(id->us>1) uiBlockSetCol(block, BUTDBLUE);
|
if(id->us>1) uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
/* Pinned data ? */
|
/* Pinned data ? */
|
||||||
if (pin && *pinpoin) {
|
if (pin && *pinpoin) {
|
||||||
uiBlockSetCol(block, BUTDPINK);
|
uiBlockSetCol(block, TH_BUT_SETTING2);
|
||||||
}
|
}
|
||||||
/* Redalert overrides pin color */
|
/* Redalert overrides pin color */
|
||||||
if(id->us<=0) uiBlockSetCol(block, REDALERT);
|
if(id->us<=0) uiBlockSetCol(block, TH_REDALERT);
|
||||||
|
|
||||||
uiSetButLock(id->lib!=0, "Can't edit library data");
|
uiSetButLock(id->lib!=0, "Can't edit library data");
|
||||||
|
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
1448
source/blender/src/interface_draw.c
Normal file
1448
source/blender/src/interface_draw.c
Normal file
File diff suppressed because it is too large
Load Diff
@@ -97,56 +97,6 @@ static void stow_unstow(uiBlock *block);
|
|||||||
|
|
||||||
/* --------- generic helper drawng calls ---------------- */
|
/* --------- generic helper drawng calls ---------------- */
|
||||||
|
|
||||||
/* supposes you draw the actual box atop of this. */
|
|
||||||
void uiSoftShadow(float minx, float miny, float maxx, float maxy, float rad, int alpha)
|
|
||||||
{
|
|
||||||
|
|
||||||
glShadeModel(GL_SMOOTH);
|
|
||||||
glEnable(GL_BLEND);
|
|
||||||
glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
|
|
||||||
|
|
||||||
/* quads start left-top, clockwise */
|
|
||||||
|
|
||||||
/* left */
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( minx-rad, maxy-rad);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( minx+rad, maxy-rad);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( minx+rad, miny+rad);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( minx-rad, miny-rad);
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* bottom */
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( minx+rad, miny+rad);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( maxx-rad, miny+rad);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( maxx+rad, miny-rad);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( minx-rad, miny-rad);
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
/* right */
|
|
||||||
glBegin(GL_POLYGON);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( maxx-rad, maxy-rad);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( maxx+rad, maxy-rad);
|
|
||||||
glColor4ub(0, 0, 0, 0);
|
|
||||||
glVertex2f( maxx+rad, miny-rad);
|
|
||||||
glColor4ub(0, 0, 0, alpha);
|
|
||||||
glVertex2f( maxx-rad, miny+rad);
|
|
||||||
glEnd();
|
|
||||||
|
|
||||||
glDisable(GL_BLEND);
|
|
||||||
glShadeModel(GL_FLAT);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
#define UI_RB_ALPHA 16
|
#define UI_RB_ALPHA 16
|
||||||
static int roundboxtype= 15;
|
static int roundboxtype= 15;
|
||||||
@@ -764,7 +714,7 @@ static void ui_draw_panel_header(uiBlock *block)
|
|||||||
|
|
||||||
BIF_ThemeColor(TH_TEXT_HI);
|
BIF_ThemeColor(TH_TEXT_HI);
|
||||||
glRasterPos2f(4+block->minx+pnl_icons, block->maxy+5);
|
glRasterPos2f(4+block->minx+pnl_icons, block->maxy+5);
|
||||||
BIF_DrawString(block->curfont, block->panel->panelname, (U.transopts & TR_BUTTONS), 1);
|
BIF_DrawString(block->curfont, block->panel->panelname, (U.transopts & TR_BUTTONS));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -782,7 +732,7 @@ static void ui_draw_panel_header(uiBlock *block)
|
|||||||
BIF_ThemeColor(TH_TEXT);
|
BIF_ThemeColor(TH_TEXT);
|
||||||
glRasterPos2f(16+pnl_icons+a*width, panel->sizey+4);
|
glRasterPos2f(16+pnl_icons+a*width, panel->sizey+4);
|
||||||
str= ui_block_cut_str(block, pa->panelname, (short)(width-10));
|
str= ui_block_cut_str(block, pa->panelname, (short)(width-10));
|
||||||
BIF_DrawString(block->curfont, str, (U.transopts & TR_BUTTONS), 0);
|
BIF_DrawString(block->curfont, str, (U.transopts & TR_BUTTONS));
|
||||||
|
|
||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
@@ -795,7 +745,7 @@ static void ui_draw_panel_header(uiBlock *block)
|
|||||||
BIF_ThemeColor(TH_TEXT_HI);
|
BIF_ThemeColor(TH_TEXT_HI);
|
||||||
glRasterPos2f(16+pnl_icons+a*width, panel->sizey+4);
|
glRasterPos2f(16+pnl_icons+a*width, panel->sizey+4);
|
||||||
str= ui_block_cut_str(block, pa->panelname, (short)(width-10));
|
str= ui_block_cut_str(block, pa->panelname, (short)(width-10));
|
||||||
BIF_DrawString(block->curfont, str, (U.transopts & TR_BUTTONS), 1);
|
BIF_DrawString(block->curfont, str, (U.transopts & TR_BUTTONS));
|
||||||
|
|
||||||
a++;
|
a++;
|
||||||
}
|
}
|
||||||
@@ -833,7 +783,7 @@ void ui_draw_panel(uiBlock *block)
|
|||||||
if(panel->control & UI_PNL_CLOSE) ofsx+= PNL_ICON;
|
if(panel->control & UI_PNL_CLOSE) ofsx+= PNL_ICON;
|
||||||
BIF_ThemeColor(TH_TEXT_HI);
|
BIF_ThemeColor(TH_TEXT_HI);
|
||||||
glRasterPos2f(4+block->minx+ofsx, block->maxy+5);
|
glRasterPos2f(4+block->minx+ofsx, block->maxy+5);
|
||||||
BIF_DrawString(block->curfont, panel->panelname, (U.transopts & TR_BUTTONS), 1);
|
BIF_DrawString(block->curfont, panel->panelname, (U.transopts & TR_BUTTONS));
|
||||||
|
|
||||||
// border
|
// border
|
||||||
if(panel->flag & PNL_SELECT) {
|
if(panel->flag & PNL_SELECT) {
|
||||||
@@ -863,7 +813,7 @@ void ui_draw_panel(uiBlock *block)
|
|||||||
str[0]= panel->panelname[a];
|
str[0]= panel->panelname[a];
|
||||||
if( isupper(str[0]) ) {
|
if( isupper(str[0]) ) {
|
||||||
glRasterPos2f(block->minx+5, block->maxy-ofs);
|
glRasterPos2f(block->minx+5, block->maxy-ofs);
|
||||||
BIF_DrawString(block->curfont, str, 0, 1);
|
BIF_DrawString(block->curfont, str, 0);
|
||||||
ofs+= 15;
|
ofs+= 15;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -67,32 +67,16 @@ static LANGMenuEntry *langmenu= 0;
|
|||||||
static int tot_lang = 0;
|
static int tot_lang = 0;
|
||||||
#endif // INTERNATIONAL
|
#endif // INTERNATIONAL
|
||||||
|
|
||||||
int BIF_DrawString(BMF_Font* font, char *str, int translate, int col)
|
|
||||||
|
int BIF_DrawString(BMF_Font* font, char *str, int translate)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef INTERNATIONAL
|
#ifdef INTERNATIONAL
|
||||||
if(G.ui_international == TRUE)
|
if(G.ui_international == TRUE)
|
||||||
if(translate)
|
if(translate)
|
||||||
return FTF_DrawString(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8, col);
|
return FTF_DrawString(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8);
|
||||||
else
|
else
|
||||||
return FTF_DrawString(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8, col);
|
return FTF_DrawString(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8);
|
||||||
else
|
|
||||||
return BMF_DrawString(font, str);
|
|
||||||
#else
|
|
||||||
return BMF_DrawString(font, str);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
int BIF_DrawStringRGB(BMF_Font* font, char *str, int translate, float r, float g, float b)
|
|
||||||
{
|
|
||||||
|
|
||||||
#ifdef INTERNATIONAL
|
|
||||||
if(G.ui_international == TRUE)
|
|
||||||
if(translate)
|
|
||||||
return FTF_DrawStringRGB(str, FTF_USE_GETTEXT | FTF_INPUT_UTF8, r, g, b);
|
|
||||||
else
|
|
||||||
return FTF_DrawStringRGB(str, FTF_NO_TRANSCONV | FTF_INPUT_UTF8, r, g, b);
|
|
||||||
else
|
else
|
||||||
return BMF_DrawString(font, str);
|
return BMF_DrawString(font, str);
|
||||||
#else
|
#else
|
||||||
|
|||||||
@@ -61,11 +61,16 @@
|
|||||||
#include "blendef.h" // CLAMP
|
#include "blendef.h" // CLAMP
|
||||||
#include "datatoc.h"
|
#include "datatoc.h"
|
||||||
|
|
||||||
|
/* global for themes */
|
||||||
|
static bTheme *theme_active=NULL;
|
||||||
|
static int theme_spacetype= SPACE_VIEW3D;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
unsigned char *data;
|
unsigned char *data;
|
||||||
int w, h;
|
int w, h;
|
||||||
} Icon;
|
} Icon;
|
||||||
|
|
||||||
|
|
||||||
static Icon *icon_from_data(unsigned char *rect, int w, int h, int rowstride)
|
static Icon *icon_from_data(unsigned char *rect, int w, int h, int rowstride)
|
||||||
{
|
{
|
||||||
Icon *icon= MEM_mallocN(sizeof(*icon), "internicon");
|
Icon *icon= MEM_mallocN(sizeof(*icon), "internicon");
|
||||||
@@ -81,10 +86,14 @@ static void icon_draw(Icon *icon)
|
|||||||
{
|
{
|
||||||
glDrawPixels(icon->w, icon->h, GL_RGBA, GL_UNSIGNED_BYTE, icon->data);
|
glDrawPixels(icon->w, icon->h, GL_RGBA, GL_UNSIGNED_BYTE, icon->data);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
|
||||||
static unsigned char colclamp(int val)
|
static unsigned char colclamp(int val)
|
||||||
{
|
{
|
||||||
return (val<0)?(0):((val>255)?255:val);
|
return (val<0)?(0):((val>255)?255:val);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void icon_draw_blended(Icon *icon, unsigned char blendcol[3])
|
static void icon_draw_blended(Icon *icon, unsigned char blendcol[3])
|
||||||
{
|
{
|
||||||
unsigned char temprect[20*21*4]; /* XXX, not so safe */
|
unsigned char temprect[20*21*4]; /* XXX, not so safe */
|
||||||
@@ -113,67 +122,41 @@ static void icon_draw_blended(Icon *icon, unsigned char blendcol[3])
|
|||||||
|
|
||||||
glDrawPixels(icon->w, icon->h, GL_RGBA, GL_UNSIGNED_BYTE, temprect);
|
glDrawPixels(icon->w, icon->h, GL_RGBA, GL_UNSIGNED_BYTE, temprect);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
static void icon_draw_blended(Icon *icon, char *blendcol, int shade)
|
||||||
|
{
|
||||||
|
float r, g, b;
|
||||||
|
|
||||||
|
r= (-shade + (float)blendcol[0])/180.0;
|
||||||
|
g= (-shade + (float)blendcol[1])/180.0;
|
||||||
|
b= (-shade + (float)blendcol[2])/180.0;
|
||||||
|
|
||||||
|
// glPixelTransferf(GL_RED_SCALE, r>0.0?r:0.0);
|
||||||
|
// glPixelTransferf(GL_GREEN_SCALE, g>0.0?g:0.0);
|
||||||
|
// glPixelTransferf(GL_BLUE_SCALE, b>0.0?b:0.0);
|
||||||
|
|
||||||
|
if(shade < 0) {
|
||||||
|
r= (128+shade)/128.0;
|
||||||
|
glPixelTransferf(GL_ALPHA_SCALE, r);
|
||||||
|
}
|
||||||
|
|
||||||
|
glDrawPixels(icon->w, icon->h, GL_RGBA, GL_UNSIGNED_BYTE, icon->data);
|
||||||
|
|
||||||
|
// glPixelTransferf(GL_RED_SCALE, 1.0);
|
||||||
|
// glPixelTransferf(GL_GREEN_SCALE, 1.0);
|
||||||
|
// glPixelTransferf(GL_BLUE_SCALE, 1.0);
|
||||||
|
glPixelTransferf(GL_ALPHA_SCALE, 1.0);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
static void icon_free(Icon *icon)
|
static void icon_free(Icon *icon)
|
||||||
{
|
{
|
||||||
MEM_freeN(icon->data);
|
MEM_freeN(icon->data);
|
||||||
MEM_freeN(icon);
|
MEM_freeN(icon);
|
||||||
}
|
}
|
||||||
|
|
||||||
/***/
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
unsigned char cols[BIFNCOLORSHADES][3];
|
|
||||||
} Color;
|
|
||||||
|
|
||||||
static Color *common_colors_arr= NULL;
|
|
||||||
|
|
||||||
static unsigned char *get_color(BIFColorID colorid, BIFColorShade shade)
|
|
||||||
{
|
|
||||||
int coloridx= colorid-BIFCOLORID_FIRST;
|
|
||||||
int shadeidx= shade-BIFCOLORSHADE_FIRST;
|
|
||||||
|
|
||||||
if (coloridx>=0 && coloridx<BIFNCOLORIDS && shadeidx>=0 && shadeidx<BIFNCOLORSHADES) {
|
|
||||||
return common_colors_arr[coloridx].cols[shadeidx];
|
|
||||||
} else {
|
|
||||||
static unsigned char errorcol[3]= {0xFF, 0x33, 0x33};
|
|
||||||
|
|
||||||
return errorcol;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void BIF_set_color(BIFColorID colorid, BIFColorShade shade)
|
|
||||||
{
|
|
||||||
glColor3ubv(get_color(colorid, shade));
|
|
||||||
}
|
|
||||||
|
|
||||||
static void rgbaCCol_addNT(unsigned char *t, unsigned char *a, int N)
|
|
||||||
{
|
|
||||||
t[0]= colclamp(a[0]+N);
|
|
||||||
t[1]= colclamp(a[1]+N);
|
|
||||||
t[2]= colclamp(a[2]+N);
|
|
||||||
|
|
||||||
}
|
|
||||||
static void def_col(BIFColorID colorid, unsigned char r, unsigned char g, unsigned char b)
|
|
||||||
{
|
|
||||||
int coloridx= colorid-BIFCOLORID_FIRST;
|
|
||||||
if (coloridx>=0 && coloridx<BIFNCOLORIDS) {
|
|
||||||
unsigned char col[3];
|
|
||||||
|
|
||||||
col[0]= r, col[1]= g, col[2]= b;
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_WHITE), col, 80);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_LIGHT), col, 45);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_HILITE), col, 25);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_LMEDIUM), col, 10);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_MEDIUM), col, 0);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_LGREY), col, -20);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_GREY), col, -45);
|
|
||||||
rgbaCCol_addNT(get_color(colorid, COLORSHADE_DARK), col, -80);
|
|
||||||
} else {
|
|
||||||
printf("def_col: Internal error, bad color ID: %d\n", colorid);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/***/
|
|
||||||
|
|
||||||
static Icon **common_icons_arr= NULL;
|
static Icon **common_icons_arr= NULL;
|
||||||
|
|
||||||
@@ -199,14 +182,18 @@ void BIF_draw_icon(BIFIconID icon)
|
|||||||
{
|
{
|
||||||
icon_draw(get_icon(icon));
|
icon_draw(get_icon(icon));
|
||||||
}
|
}
|
||||||
void BIF_draw_icon_blended(BIFIconID icon, BIFColorID color, BIFColorShade shade)
|
|
||||||
|
void BIF_draw_icon_blended(BIFIconID icon, int colorid, int shade)
|
||||||
{
|
{
|
||||||
icon_draw_blended(get_icon(icon), get_color(color, shade));
|
char *cp= BIF_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
||||||
|
icon_draw_blended(get_icon(icon), cp, shade);
|
||||||
}
|
}
|
||||||
|
|
||||||
int BIF_get_icon_width(BIFIconID icon)
|
int BIF_get_icon_width(BIFIconID icon)
|
||||||
{
|
{
|
||||||
return get_icon(icon)->w;
|
return get_icon(icon)->w;
|
||||||
}
|
}
|
||||||
|
|
||||||
int BIF_get_icon_height(BIFIconID icon)
|
int BIF_get_icon_height(BIFIconID icon)
|
||||||
{
|
{
|
||||||
return get_icon(icon)->h;
|
return get_icon(icon)->h;
|
||||||
@@ -246,7 +233,6 @@ void BIF_resources_init(void)
|
|||||||
int x, y;
|
int x, y;
|
||||||
|
|
||||||
common_icons_arr= MEM_mallocN(sizeof(*common_icons_arr)*BIFNICONIDS, "common_icons");
|
common_icons_arr= MEM_mallocN(sizeof(*common_icons_arr)*BIFNICONIDS, "common_icons");
|
||||||
common_colors_arr= MEM_mallocN(sizeof(*common_colors_arr)*BIFNCOLORIDS, "common_colors");
|
|
||||||
|
|
||||||
for (y=0; y<10; y++) {
|
for (y=0; y<10; y++) {
|
||||||
for (x=0; x<21; x++) {
|
for (x=0; x<21; x++) {
|
||||||
@@ -274,60 +260,13 @@ void BIF_resources_init(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
IMB_freeImBuf(bbuf);
|
IMB_freeImBuf(bbuf);
|
||||||
|
|
||||||
def_col(BUTGREY, 0x90,0x90,0x90);
|
|
||||||
def_col(BUTGREEN, 0x88,0xA0,0xA4);
|
|
||||||
def_col(BUTBLUE, 0xA0,0xA0,0xB0);
|
|
||||||
def_col(BUTSALMON, 0xB0,0xA0,0x90);
|
|
||||||
def_col(MIDGREY, 0xB0,0xB0,0xB0);
|
|
||||||
def_col(BUTPURPLE, 0xA2,0x98,0xA9);
|
|
||||||
def_col(BUTYELLOW, 0xB2,0xB2,0x99);
|
|
||||||
def_col(BUTRUST, 0x80,0x70,0x70);
|
|
||||||
def_col(REDALERT, 0xB0,0x40,0x40);
|
|
||||||
def_col(BUTWHITE, 0xD0,0xD0,0xD0);
|
|
||||||
def_col(BUTDBLUE, 0x80,0x80,0xA0);
|
|
||||||
def_col(BUTDPINK, 0xAA,0x88,0x55);
|
|
||||||
def_col(BUTPINK, 0xE8,0xBD,0xA7);
|
|
||||||
def_col(BUTMACTIVE, 0x30,0x30,0x30);
|
|
||||||
|
|
||||||
def_col(ACTIONBUTCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(NUMBUTCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(TEXBUTCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(TOGBUTCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(SLIDERCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(TABCOL, 0x88,0x88,0x88);
|
|
||||||
def_col(MENUCOL, 0xCF,0xCF,0xCF);
|
|
||||||
def_col(MENUACTIVECOL, 0x80,0x80,0x80);
|
|
||||||
|
|
||||||
def_col(BUTIPO, 0xB0,0xB0,0x99);
|
|
||||||
def_col(BUTAUDIO, 0xB0,0xA0,0x90);
|
|
||||||
def_col(BUTCAMERA, 0x99,0xB2,0xA5);
|
|
||||||
def_col(BUTRANDOM, 0xA9,0x9A,0x98);
|
|
||||||
def_col(BUTEDITOBJECT, 0xA2,0x98,0xA9);
|
|
||||||
def_col(BUTPROPERTY, 0xA0,0xA0,0xB0);
|
|
||||||
def_col(BUTSCENE, 0x99,0x99,0xB2);
|
|
||||||
def_col(BUTMOTION, 0x98,0xA7,0xA9);
|
|
||||||
def_col(BUTMESSAGE, 0x88,0xA0,0x94);
|
|
||||||
def_col(BUTACTION, 0xB2,0xA9,0x99);
|
|
||||||
def_col(BUTVISIBILITY, 0xB2,0xA9,0x99);
|
|
||||||
def_col(BUTCD, 0xB0,0x95,0x90);
|
|
||||||
def_col(BUTGAME, 0x99,0xB2,0x9C);
|
|
||||||
def_col(BUTYUCK, 0xB0,0x99,0xB0);
|
|
||||||
def_col(BUTSEASICK, 0x99,0xB0,0xB0);
|
|
||||||
def_col(BUTCHOKE, 0x88,0x94,0xA0);
|
|
||||||
def_col(BUTIMPERIAL, 0x94,0x88,0xA0);
|
|
||||||
|
|
||||||
def_col(HEADERCOL, 165, 165, 165);
|
|
||||||
def_col(HEADERCOLSEL, 185, 185, 185);
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BIF_resources_free(void)
|
void BIF_resources_free(void)
|
||||||
{
|
{
|
||||||
free_common_icons();
|
free_common_icons();
|
||||||
|
|
||||||
MEM_freeN(common_colors_arr);
|
|
||||||
MEM_freeN(common_icons_arr);
|
MEM_freeN(common_icons_arr);
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -337,17 +276,58 @@ void BIF_resources_free(void)
|
|||||||
/* THEMES */
|
/* THEMES */
|
||||||
/* ******************************************************** */
|
/* ******************************************************** */
|
||||||
|
|
||||||
|
|
||||||
char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
||||||
{
|
{
|
||||||
ThemeSpace *ts= NULL;
|
ThemeSpace *ts= NULL;
|
||||||
char error[3]={240, 0, 240};
|
static char error[3]={240, 0, 240};
|
||||||
|
static char alert[3]={240, 60, 60};
|
||||||
|
static char headerdesel[3];
|
||||||
|
|
||||||
char *cp= error;
|
char *cp= error;
|
||||||
|
|
||||||
if(btheme) {
|
if(btheme) {
|
||||||
|
|
||||||
// first check for ui buttons theme
|
// first check for ui buttons theme
|
||||||
if(colorid < TH_THEMEUI) {
|
if(colorid < TH_THEMEUI) {
|
||||||
|
|
||||||
|
switch(colorid) {
|
||||||
|
case TH_BUT_NEUTRAL:
|
||||||
|
cp= btheme->tui.neutral; break;
|
||||||
|
case TH_BUT_ACTION:
|
||||||
|
cp= btheme->tui.action; break;
|
||||||
|
case TH_BUT_SETTING:
|
||||||
|
cp= btheme->tui.setting; break;
|
||||||
|
case TH_BUT_SETTING1:
|
||||||
|
cp= btheme->tui.setting1; break;
|
||||||
|
case TH_BUT_SETTING2:
|
||||||
|
cp= btheme->tui.setting2; break;
|
||||||
|
case TH_BUT_NUM:
|
||||||
|
cp= btheme->tui.num; break;
|
||||||
|
case TH_BUT_TEXTFIELD:
|
||||||
|
cp= btheme->tui.textfield; break;
|
||||||
|
case TH_BUT_POPUP:
|
||||||
|
cp= btheme->tui.popup; break;
|
||||||
|
case TH_BUT_TEXT:
|
||||||
|
cp= btheme->tui.text; break;
|
||||||
|
case TH_BUT_TEXT_HI:
|
||||||
|
cp= btheme->tui.text_hi; break;
|
||||||
|
case TH_MENU_BACK:
|
||||||
|
cp= btheme->tui.menu_back; break;
|
||||||
|
case TH_MENU_ITEM:
|
||||||
|
cp= btheme->tui.menu_item; break;
|
||||||
|
case TH_MENU_HILITE:
|
||||||
|
cp= btheme->tui.menu_hilite; break;
|
||||||
|
case TH_MENU_TEXT:
|
||||||
|
cp= btheme->tui.menu_text; break;
|
||||||
|
case TH_MENU_TEXT_HI:
|
||||||
|
cp= btheme->tui.menu_text_hi; break;
|
||||||
|
|
||||||
|
case TH_BUT_DRAWTYPE:
|
||||||
|
cp= &btheme->tui.but_drawtype; break;
|
||||||
|
|
||||||
|
case TH_REDALERT:
|
||||||
|
cp= alert; break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
||||||
@@ -378,6 +358,14 @@ char *BIF_ThemeGetColorPtr(bTheme *btheme, int spacetype, int colorid)
|
|||||||
cp= ts->text_hi; break;
|
cp= ts->text_hi; break;
|
||||||
case TH_HEADER:
|
case TH_HEADER:
|
||||||
cp= ts->header; break;
|
cp= ts->header; break;
|
||||||
|
case TH_HEADERDESEL:
|
||||||
|
/* we calculate a dynamic builtin header deselect color, also for pulldowns... */
|
||||||
|
cp= ts->header;
|
||||||
|
headerdesel[0]= cp[0]>20?cp[0]-20:0;
|
||||||
|
headerdesel[1]= cp[1]>20?cp[1]-20:0;
|
||||||
|
headerdesel[2]= cp[2]>20?cp[2]-20:0;
|
||||||
|
cp= headerdesel;
|
||||||
|
break;
|
||||||
case TH_PANEL:
|
case TH_PANEL:
|
||||||
cp= ts->panel; break;
|
cp= ts->panel; break;
|
||||||
case TH_SHADE1:
|
case TH_SHADE1:
|
||||||
@@ -439,8 +427,26 @@ void BIF_InitTheme(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
BIF_SetTheme(NULL); // make sure the global used in this file is set
|
BIF_SetTheme(NULL); // make sure the global used in this file is set
|
||||||
|
|
||||||
/* UI buttons (todo) */
|
/* UI buttons (todo) */
|
||||||
|
SETCOL(btheme->tui.neutral, 0xA0,0xA0,0xA0, 255);
|
||||||
|
SETCOL(btheme->tui.action, 0xB0,0xA0,0x90, 255);
|
||||||
|
SETCOL(btheme->tui.setting, 0x88,0xA0,0xA4, 255);
|
||||||
|
SETCOL(btheme->tui.setting1, 0xA0,0xA0,0xB0, 255);
|
||||||
|
SETCOL(btheme->tui.setting2, 0xA2,0x98,0xA9, 255);
|
||||||
|
SETCOL(btheme->tui.num, 0x90,0x90,0x90, 255);
|
||||||
|
SETCOL(btheme->tui.textfield, 0x90,0x90,0x90, 255);
|
||||||
|
SETCOL(btheme->tui.popup, 0xB2,0xB2,0xA9, 255);
|
||||||
|
|
||||||
|
SETCOL(btheme->tui.text, 0,0,0, 255);
|
||||||
|
SETCOL(btheme->tui.text_hi, 255, 255, 255, 255);
|
||||||
|
|
||||||
|
SETCOL(btheme->tui.menu_back, 0xCF,0xCF,0xCF, 255);
|
||||||
|
SETCOL(btheme->tui.menu_item, 0xDA,0xDA,0xDA, 255);
|
||||||
|
SETCOL(btheme->tui.menu_hilite, 0x7F,0x7F,0x7F, 255);
|
||||||
|
SETCOL(btheme->tui.menu_text, 0, 0, 0, 255);
|
||||||
|
SETCOL(btheme->tui.menu_text_hi, 255, 255, 255, 255);
|
||||||
|
btheme->tui.but_drawtype= 1;
|
||||||
|
|
||||||
/* space view3d */
|
/* space view3d */
|
||||||
SETCOL(btheme->tv3d.back, 115, 115, 115, 255);
|
SETCOL(btheme->tv3d.back, 115, 115, 115, 255);
|
||||||
@@ -518,13 +524,30 @@ char *BIF_ThemeColorsPup(int spacetype)
|
|||||||
char str[32];
|
char str[32];
|
||||||
|
|
||||||
if(spacetype==0) {
|
if(spacetype==0) {
|
||||||
strcpy(cp, "Not Yet");
|
sprintf(str, "Neutral %%x%d|", TH_BUT_NEUTRAL); strcat(cp, str);
|
||||||
|
sprintf(str, "Action %%x%d|", TH_BUT_ACTION); strcat(cp, str);
|
||||||
|
sprintf(str, "Setting %%x%d|", TH_BUT_SETTING); strcat(cp, str);
|
||||||
|
sprintf(str, "Special Setting 1%%x%d|", TH_BUT_SETTING1); strcat(cp, str);
|
||||||
|
sprintf(str, "Special Setting 2 %%x%d|", TH_BUT_SETTING2); strcat(cp, str);
|
||||||
|
sprintf(str, "Number Input %%x%d|", TH_BUT_NUM); strcat(cp, str);
|
||||||
|
sprintf(str, "Text Input %%x%d|", TH_BUT_TEXTFIELD); strcat(cp, str);
|
||||||
|
sprintf(str, "Popup %%x%d|", TH_BUT_POPUP); strcat(cp, str);
|
||||||
|
sprintf(str, "Text %%x%d|", TH_BUT_TEXT); strcat(cp, str);
|
||||||
|
sprintf(str, "Text hilight %%x%d|", TH_BUT_TEXT_HI); strcat(cp, str);
|
||||||
|
strcat(cp,"%l|");
|
||||||
|
sprintf(str, "Menu Background %%x%d|", TH_MENU_BACK); strcat(cp, str);
|
||||||
|
sprintf(str, "Menu Item %%x%d|", TH_MENU_ITEM); strcat(cp, str);
|
||||||
|
sprintf(str, "Menu Item hilight %%x%d|", TH_MENU_HILITE); strcat(cp, str);
|
||||||
|
sprintf(str, "Menu Text %%x%d|", TH_MENU_TEXT); strcat(cp, str);
|
||||||
|
sprintf(str, "Menu Text hilight %%x%d|", TH_MENU_TEXT_HI); strcat(cp, str);
|
||||||
|
strcat(cp,"%l|");
|
||||||
|
sprintf(str, "Drawtype %%x%d|", TH_BUT_DRAWTYPE); strcat(cp, str);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// first defaults for each space
|
// first defaults for each space
|
||||||
sprintf(str, "Background %%x%d|", TH_BACK); strcat(cp, str);
|
sprintf(str, "Background %%x%d|", TH_BACK); strcat(cp, str);
|
||||||
sprintf(str, "Text %%x%d|", TH_TEXT); strcat(cp, str);
|
sprintf(str, "Text %%x%d|", TH_TEXT); strcat(cp, str);
|
||||||
sprintf(str, "Text Hilite %%x%d|", TH_TEXT_HI); strcat(cp, str);
|
sprintf(str, "Text hilight %%x%d|", TH_TEXT_HI); strcat(cp, str);
|
||||||
sprintf(str, "Header %%x%d|", TH_HEADER); strcat(cp, str);
|
sprintf(str, "Header %%x%d|", TH_HEADER); strcat(cp, str);
|
||||||
|
|
||||||
if(spacetype==SPACE_VIEW3D) {
|
if(spacetype==SPACE_VIEW3D) {
|
||||||
@@ -562,9 +585,6 @@ char *BIF_ThemeColorsPup(int spacetype)
|
|||||||
return cp;
|
return cp;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bTheme *theme_active=NULL;
|
|
||||||
static int theme_spacetype= SPACE_VIEW3D;
|
|
||||||
|
|
||||||
void BIF_SetTheme(ScrArea *sa)
|
void BIF_SetTheme(ScrArea *sa)
|
||||||
{
|
{
|
||||||
if(sa==NULL) { // called for safety, when delete themes
|
if(sa==NULL) { // called for safety, when delete themes
|
||||||
@@ -634,7 +654,7 @@ void BIF_ThemeColorBlend(int colorid1, int colorid2, float fac)
|
|||||||
|
|
||||||
|
|
||||||
// get individual values, not scaled
|
// get individual values, not scaled
|
||||||
float BIF_GetThemeColorf(int colorid)
|
float BIF_GetThemeValuef(int colorid)
|
||||||
{
|
{
|
||||||
char *cp;
|
char *cp;
|
||||||
|
|
||||||
@@ -643,6 +663,17 @@ float BIF_GetThemeColorf(int colorid)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// get individual values, not scaled
|
||||||
|
int BIF_GetThemeValue(int colorid)
|
||||||
|
{
|
||||||
|
char *cp;
|
||||||
|
|
||||||
|
cp= BIF_ThemeGetColorPtr(theme_active, theme_spacetype, colorid);
|
||||||
|
return ((int) cp[0]);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
// get the color, range 0.0-1.0
|
// get the color, range 0.0-1.0
|
||||||
void BIF_GetThemeColor3fv(int colorid, float *col)
|
void BIF_GetThemeColor3fv(int colorid, float *col)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -303,6 +303,7 @@ void space_set_commmandline_options(void) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if GAMEBLENDER == 1
|
||||||
/**
|
/**
|
||||||
* These two routines imported from the gameengine,
|
* These two routines imported from the gameengine,
|
||||||
* I suspect a lot of the resetting stuff is cruft
|
* I suspect a lot of the resetting stuff is cruft
|
||||||
@@ -365,6 +366,7 @@ static void restore_all_scene_cfra(LinkNode *storelist) {
|
|||||||
|
|
||||||
BLI_linklist_free(storelist, NULL);
|
BLI_linklist_free(storelist, NULL);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void start_game(void)
|
void start_game(void)
|
||||||
{
|
{
|
||||||
@@ -1552,7 +1554,7 @@ void info_user_themebuts(uiBlock *block, short y1, short y2, short y3)
|
|||||||
int spacetype= 0;
|
int spacetype= 0;
|
||||||
static short cur=1, curmain=2;
|
static short cur=1, curmain=2;
|
||||||
short a, tot=0, isbuiltin= 0;
|
short a, tot=0, isbuiltin= 0;
|
||||||
char string[20*32], *strp;
|
char string[20*32], *strp, *col;
|
||||||
|
|
||||||
y3= y2+23; // exception!
|
y3= y2+23; // exception!
|
||||||
|
|
||||||
@@ -1585,12 +1587,11 @@ void info_user_themebuts(uiBlock *block, short y1, short y2, short y3)
|
|||||||
uiDefButS(block, MENU, B_UPDATE_THEME, string, 45,y3,200,20, &cur, 0, 0, 0, 0, "Current theme");
|
uiDefButS(block, MENU, B_UPDATE_THEME, string, 45,y3,200,20, &cur, 0, 0, 0, 0, "Current theme");
|
||||||
|
|
||||||
/* add / delete / name */
|
/* add / delete / name */
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
if(tot<16)
|
if(tot<16)
|
||||||
uiDefBut(block, BUT, B_ADD_THEME, "Add", 45,y2,200,20, NULL, 0, 0, 0, 0, "Makes new copy of this theme");
|
uiDefBut(block, BUT, B_ADD_THEME, "Add", 45,y2,200,20, NULL, 0, 0, 0, 0, "Makes new copy of this theme");
|
||||||
if(tot>1 && isbuiltin==0)
|
if(tot>1 && isbuiltin==0)
|
||||||
uiDefBut(block, BUT, B_DEL_THEME, "Delete", 45,y1,200,20, NULL, 0, 0, 0, 0, "Delete theme");
|
uiDefBut(block, BUT, B_DEL_THEME, "Delete", 45,y1,200,20, NULL, 0, 0, 0, 0, "Delete theme");
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
if(isbuiltin) return;
|
if(isbuiltin) return;
|
||||||
|
|
||||||
@@ -1600,55 +1601,53 @@ void info_user_themebuts(uiBlock *block, short y1, short y2, short y3)
|
|||||||
/* main choices pup */
|
/* main choices pup */
|
||||||
uiDefButS(block, MENU, B_CHANGE_THEME, "UI and Buttons %x1|3D View %x2|Ipo Window %x3|Buttons Window %x4|File Window %x5",
|
uiDefButS(block, MENU, B_CHANGE_THEME, "UI and Buttons %x1|3D View %x2|Ipo Window %x3|Buttons Window %x4|File Window %x5",
|
||||||
255,y2,200,20, &curmain, 0, 0, 0, 0, "Specify theme for...");
|
255,y2,200,20, &curmain, 0, 0, 0, 0, "Specify theme for...");
|
||||||
if(curmain==2) spacetype= SPACE_VIEW3D;
|
if(curmain==1) spacetype= 0;
|
||||||
if(curmain==3) spacetype= SPACE_IPO;
|
else if(curmain==2) spacetype= SPACE_VIEW3D;
|
||||||
if(curmain==4) spacetype= SPACE_BUTS;
|
else if(curmain==3) spacetype= SPACE_IPO;
|
||||||
if(curmain==5) spacetype= SPACE_FILE;
|
else if(curmain==4) spacetype= SPACE_BUTS;
|
||||||
|
else if(curmain==5) spacetype= SPACE_FILE;
|
||||||
|
else return; // only needed while coding... when adding themes for more windows
|
||||||
|
|
||||||
/* color choices pup */
|
/* color choices pup */
|
||||||
if(curmain==1) strp= BIF_ThemeColorsPup(0);
|
if(curmain==1) {
|
||||||
|
strp= BIF_ThemeColorsPup(0);
|
||||||
|
if(th_curcol==TH_BACK) th_curcol= TH_BUT_NEUTRAL; // switching main choices...
|
||||||
|
}
|
||||||
else strp= BIF_ThemeColorsPup(spacetype);
|
else strp= BIF_ThemeColorsPup(spacetype);
|
||||||
|
|
||||||
uiDefButS(block, MENU, B_REDR, strp, 255,y1,200,20, &th_curcol, 0, 0, 0, 0, "Current color");
|
uiDefButS(block, MENU, B_REDR, strp, 255,y1,200,20, &th_curcol, 0, 0, 0, 0, "Current color");
|
||||||
MEM_freeN(strp);
|
MEM_freeN(strp);
|
||||||
|
|
||||||
/* always make zero, ugly global... */
|
th_curcol_ptr= col= BIF_ThemeGetColorPtr(btheme, spacetype, th_curcol);
|
||||||
th_curcol_ptr= NULL;
|
if(col==NULL) return;
|
||||||
|
|
||||||
/* sliders */
|
/* first handle exceptions, special single values, row selection, etc */
|
||||||
if(curmain==1);
|
if(th_curcol==TH_VERTEX_SIZE) {
|
||||||
else {
|
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"Vertex size ", 465,y3,200,20, col, 1.0, 10.0, 0, 0, "");
|
||||||
char *col;
|
|
||||||
|
|
||||||
th_curcol_ptr= col= BIF_ThemeGetColorPtr(btheme, spacetype, th_curcol);
|
|
||||||
|
|
||||||
if(col && th_curcol==TH_VERTEX_SIZE) {
|
|
||||||
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"Vertex size ", 465,y3,200,20, col, 1.0, 10.0, B_THEMECOL, 0, "");
|
|
||||||
|
|
||||||
}
|
|
||||||
else if(col) {
|
|
||||||
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"R ", 465,y3,200,20, col, 0.0, 255.0, B_THEMECOL, 0, "");
|
|
||||||
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"G ", 465,y2,200,20, col+1, 0.0, 255.0, B_THEMECOL, 0, "");
|
|
||||||
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"B ", 465,y1,200,20, col+2, 0.0, 255.0, B_THEMECOL, 0, "");
|
|
||||||
|
|
||||||
uiDefButC(block, COL, B_THEMECOL, "", 675,y1,50,y3-y1+20, col, 0, 0, 0, 0, "");
|
|
||||||
|
|
||||||
if ELEM3(th_curcol, TH_PANEL, TH_FACE, TH_FACE_SELECT) {
|
|
||||||
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"A ", 465,y3+25,200,20, col+3, 0.0, 255.0, B_THEMECOL, 0, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* copy paste */
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
uiDefBut(block, BUT, B_THEME_COPY, "Copy Color", 755,y2,120,20, NULL, 0, 0, 0, 0, "Stores current color in buffer");
|
|
||||||
uiDefBut(block, BUT, B_THEME_PASTE, "Paste Color", 755,y1,120,20, NULL, 0, 0, 0, 0, "Pastes buffer color");
|
|
||||||
|
|
||||||
uiDefButC(block, COL, 0, "", 885,y1,50,y2-y1+20, th_curcol_arr, 0, 0, 0, 0, "");
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
else if(th_curcol==TH_BUT_DRAWTYPE) {
|
||||||
|
uiDefButC(block, ROW, B_UPDATE_THEME, "Minimal", 465,y3,200,20, col, 2.0, 0.0, 0, 0, "");
|
||||||
|
uiDefButC(block, ROW, B_UPDATE_THEME, "Default", 465,y2,200,20, col, 2.0, 1.0, 0, 0, "");
|
||||||
|
|
||||||
|
}
|
||||||
|
else {
|
||||||
uiClearButLock();
|
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"R ", 465,y3,200,20, col, 0.0, 255.0, B_THEMECOL, 0, "");
|
||||||
|
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"G ", 465,y2,200,20, col+1, 0.0, 255.0, B_THEMECOL, 0, "");
|
||||||
|
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"B ", 465,y1,200,20, col+2, 0.0, 255.0, B_THEMECOL, 0, "");
|
||||||
|
|
||||||
|
uiDefButC(block, COL, B_THEMECOL, "", 675,y1,50,y3-y1+20, col, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
|
if ELEM3(th_curcol, TH_PANEL, TH_FACE, TH_FACE_SELECT) {
|
||||||
|
uiDefButC(block, NUMSLI, B_UPDATE_THEME,"A ", 465,y3+25,200,20, col+3, 0.0, 255.0, B_THEMECOL, 0, "");
|
||||||
|
}
|
||||||
|
|
||||||
|
/* copy paste */
|
||||||
|
uiDefBut(block, BUT, B_THEME_COPY, "Copy Color", 755,y2,120,20, NULL, 0, 0, 0, 0, "Stores current color in buffer");
|
||||||
|
uiDefBut(block, BUT, B_THEME_PASTE, "Paste Color", 755,y1,120,20, NULL, 0, 0, 0, 0, "Pastes buffer color");
|
||||||
|
|
||||||
|
uiDefButC(block, COL, 0, "", 885,y1,50,y2-y1+20, th_curcol_arr, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1670,7 +1669,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
myortho2(0.0, 1280.0, 0.0, curarea->winy/fac);
|
myortho2(0.0, 1280.0, 0.0, curarea->winy/fac);
|
||||||
|
|
||||||
sprintf(naam, "infowin %d", curarea->win);
|
sprintf(naam, "infowin %d", curarea->win);
|
||||||
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSSX, UI_HELV, curarea->win);
|
block= uiNewBlock(&curarea->uiblocks, naam, UI_EMBOSS, UI_HELV, curarea->win);
|
||||||
|
|
||||||
|
|
||||||
dx= (1280-90)/7; /* spacing for use in equally dividing 'tab' row */
|
dx= (1280-90)/7; /* spacing for use in equally dividing 'tab' row */
|
||||||
@@ -1704,7 +1703,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
|
|
||||||
/* set the colour to blue and draw the main 'tab' controls */
|
/* set the colour to blue and draw the main 'tab' controls */
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTBLUE);
|
uiBlockSetCol(block, TH_BUT_SETTING1);
|
||||||
|
|
||||||
uiDefButI(block, ROW,B_USERPREF,"View & Controls",
|
uiDefButI(block, ROW,B_USERPREF,"View & Controls",
|
||||||
xpos,ypostab,(short)dx,buth,
|
xpos,ypostab,(short)dx,buth,
|
||||||
@@ -1734,8 +1733,7 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
(short)(xpos+6*dx),ypostab,(short)dx,buth,
|
(short)(xpos+6*dx),ypostab,(short)dx,buth,
|
||||||
&U.userpref,1.0,5.0, 0, 0,"");
|
&U.userpref,1.0,5.0, 0, 0,"");
|
||||||
|
|
||||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
uiBlockSetCol(block, TH_AUTO);
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
/* end 'tab' controls */
|
/* end 'tab' controls */
|
||||||
|
|
||||||
@@ -1787,8 +1785,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefBut(block, LABEL,0,"Menu Buttons:",
|
uiDefBut(block, LABEL,0,"Menu Buttons:",
|
||||||
(xpos+edgespace+medprefbut+(3*midspace)+(2*smallprefbut)),y3label,medprefbut,buth,
|
(xpos+edgespace+medprefbut+(3*midspace)+(2*smallprefbut)),y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
@@ -1798,8 +1794,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
&(U.uiflag), 0, 0, 0, 0,
|
&(U.uiflag), 0, 0, 0, 0,
|
||||||
"Automatic opening of menu buttons");
|
"Automatic opening of menu buttons");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButS(block, NUM, 0, "ThresA:",
|
uiDefButS(block, NUM, 0, "ThresA:",
|
||||||
(xpos+edgespace+medprefbut+(3*midspace)+(2*smallprefbut)),y1,smallprefbut,buth,
|
(xpos+edgespace+medprefbut+(3*midspace)+(2*smallprefbut)),y1,smallprefbut,buth,
|
||||||
&(U.menuthreshold1), 1, 40, 0, 0,
|
&(U.menuthreshold1), 1, 40, 0, 0,
|
||||||
@@ -1811,8 +1805,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
"Time in 1/10 seconds for auto open sublevels");
|
"Time in 1/10 seconds for auto open sublevels");
|
||||||
|
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View",
|
uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View",
|
||||||
(xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth,
|
(xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth,
|
||||||
&(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button");
|
&(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button");
|
||||||
@@ -1821,8 +1813,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
(xpos+edgespace+(4*midspace)+(4*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
|
(xpos+edgespace+(4*midspace)+(4*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth,
|
||||||
&(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button");
|
&(U.flag), 0, 0, 0, 0, "Default action for the middle mouse button");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefBut(block, LABEL,0,"Middle mouse button:",
|
uiDefBut(block, LABEL,0,"Middle mouse button:",
|
||||||
(xpos+edgespace+(3*midspace)+(4*medprefbut)),y3label,medprefbut,buth,
|
(xpos+edgespace+(3*midspace)+(4*medprefbut)),y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
@@ -1837,8 +1827,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
|
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
|
uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball",
|
||||||
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,(smallprefbut+2),buth,
|
(xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,(smallprefbut+2),buth,
|
||||||
&(U.flag), 0, 0, 0, 0,
|
&(U.flag), 0, 0, 0, 0,
|
||||||
@@ -1849,8 +1837,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
&(U.flag), 0, 0, 0, 0,
|
&(U.flag), 0, 0, 0, 0,
|
||||||
"Use turntable style rotation with middle mouse button");
|
"Use turntable style rotation with middle mouse button");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefBut(block, LABEL,0,"Mousewheel:",
|
uiDefBut(block, LABEL,0,"Mousewheel:",
|
||||||
(xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth,
|
(xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
@@ -1873,8 +1859,6 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
xpos,y3label,medprefbut,buth,
|
xpos,y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREEN);
|
|
||||||
|
|
||||||
uiDefButS(block, TOGN|BIT|8, B_DRAWINFO, "ObData",
|
uiDefButS(block, TOGN|BIT|8, B_DRAWINFO, "ObData",
|
||||||
(xpos+edgespace),y2,(smallprefbut+2),buth,
|
(xpos+edgespace),y2,(smallprefbut+2),buth,
|
||||||
&(U.flag), 0, 0, 0, 0, "Link new objects' material to the obData block");
|
&(U.flag), 0, 0, 0, 0, "Link new objects' material to the obData block");
|
||||||
@@ -1883,12 +1867,11 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
(xpos+edgespace+smallprefbut+2),y2,(smallprefbut+2),buth,
|
(xpos+edgespace+smallprefbut+2),y2,(smallprefbut+2),buth,
|
||||||
&(U.flag), 0, 0, 0, 0, "Link new objects' material to the object block");
|
&(U.flag), 0, 0, 0, 0, "Link new objects' material to the object block");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
uiDefButS(block, NUMSLI, B_DRAWINFO, "UndoSteps:",
|
uiDefButS(block, NUMSLI, B_DRAWINFO, "UndoSteps:",
|
||||||
(xpos+edgespace+2*smallprefbut+8),y2,(medprefbut+2),buth,
|
(xpos+edgespace+2*smallprefbut+8),y2,(medprefbut+2),buth,
|
||||||
&(U.undosteps), 1, 64, 0, 0, "Number of undo steps avail. in Editmode. Smaller conserves memory.");
|
&(U.undosteps), 1, 64, 0, 0, "Number of undo steps avail. in Editmode. Smaller conserves memory.");
|
||||||
|
|
||||||
|
|
||||||
uiDefBut(block, LABEL,0,"Auto keyframe on:",
|
uiDefBut(block, LABEL,0,"Auto keyframe on:",
|
||||||
(xpos+edgespace+(2*medprefbut)+midspace),y3label,medprefbut,buth,
|
(xpos+edgespace+(2*medprefbut)+midspace),y3label,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
@@ -1959,14 +1942,10 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
(xpos+edgespace+medprefbut+midspace),y2,medprefbut,buth,
|
(xpos+edgespace+medprefbut+midspace),y2,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "");
|
0, 0, 0, 0, 0, "");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
uiDefBut(block, BUT, B_LOADUIFONT, "Select Font",
|
uiDefBut(block, BUT, B_LOADUIFONT, "Select Font",
|
||||||
xpos,y1,medprefbut,buth,
|
xpos,y1,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0, "Select a new font for the interface");
|
0, 0, 0, 0, 0, "Select a new font for the interface");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
|
|
||||||
uiDefButI(block, MENU|INT, B_SETFONTSIZE, fontsize_pup(),
|
uiDefButI(block, MENU|INT, B_SETFONTSIZE, fontsize_pup(),
|
||||||
(xpos+edgespace+medprefbut+midspace),y1,medprefbut,buth,
|
(xpos+edgespace+medprefbut+midspace),y1,medprefbut,buth,
|
||||||
@@ -2019,15 +1998,11 @@ void drawinfospace(ScrArea *sa, void *spacedata)
|
|||||||
"Enables automatic saving of temporary files");
|
"Enables automatic saving of temporary files");
|
||||||
|
|
||||||
if(U.flag & AUTOSAVE) {
|
if(U.flag & AUTOSAVE) {
|
||||||
uiBlockSetCol(block, BUTSALMON);
|
|
||||||
|
|
||||||
uiDefBut(block, BUT, B_LOADTEMP, "Open Recent",
|
uiDefBut(block, BUT, B_LOADTEMP, "Open Recent",
|
||||||
(xpos+edgespace),y1,medprefbut,buth,
|
(xpos+edgespace),y1,medprefbut,buth,
|
||||||
0, 0, 0, 0, 0,"Opens the most recently saved temporary file");
|
0, 0, 0, 0, 0,"Opens the most recently saved temporary file");
|
||||||
|
|
||||||
uiBlockSetCol(block, BUTGREY);
|
|
||||||
|
|
||||||
|
|
||||||
uiDefButI(block, NUM, B_RESETAUTOSAVE, "Minutes:",
|
uiDefButI(block, NUM, B_RESETAUTOSAVE, "Minutes:",
|
||||||
(xpos+edgespace+medprefbut+midspace),y2,medprefbut,buth,
|
(xpos+edgespace+medprefbut+midspace),y2,medprefbut,buth,
|
||||||
&(U.savetime), 1.0, 60.0, 0, 0,
|
&(U.savetime), 1.0, 60.0, 0, 0,
|
||||||
|
|||||||
@@ -843,7 +843,7 @@ void tbox_drawelem_text(x, y, type)
|
|||||||
}
|
}
|
||||||
|
|
||||||
glRasterPos2i(x1+5, y1+tbfontyofs);
|
glRasterPos2i(x1+5, y1+tbfontyofs);
|
||||||
BIF_DrawString(G.font, tbstr, (U.transopts & TR_MENUS), (type==0 || type==2)?0:1);
|
BIF_DrawString(G.font, tbstr, (U.transopts & TR_MENUS));
|
||||||
|
|
||||||
if(keystr && keystr[0]) {
|
if(keystr && keystr[0]) {
|
||||||
if(type & 1) {
|
if(type & 1) {
|
||||||
@@ -852,12 +852,12 @@ void tbox_drawelem_text(x, y, type)
|
|||||||
glRecti(x2-len2-2, y1+2, x2-3, y2-2);
|
glRecti(x2-len2-2, y1+2, x2-3, y2-2);
|
||||||
ColorFunc(TBOXWHITE);
|
ColorFunc(TBOXWHITE);
|
||||||
glRasterPos2i(x2-len2, y1+tbfontyofs);
|
glRasterPos2i(x2-len2, y1+tbfontyofs);
|
||||||
BIF_DrawString(G.font, keystr, (U.transopts & TR_MENUS), 1);
|
BIF_DrawString(G.font, keystr, (U.transopts & TR_MENUS));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
ColorFunc(TBOXBLACK);
|
ColorFunc(TBOXBLACK);
|
||||||
glRasterPos2i(x2-len2, y1+tbfontyofs);
|
glRasterPos2i(x2-len2, y1+tbfontyofs);
|
||||||
BIF_DrawString(G.font, keystr, (U.transopts & TR_MENUS), 0);
|
BIF_DrawString(G.font, keystr, (U.transopts & TR_MENUS));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1113,7 +1113,7 @@ short button(short *var, short min, short max, char *str)
|
|||||||
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
||||||
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
||||||
|
|
||||||
block= uiNewBlock(&listb, "button", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&listb, "button", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|
|
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|
|
||||||
UI_BLOCK_ENTER_OK);
|
UI_BLOCK_ENTER_OK);
|
||||||
|
|
||||||
@@ -1147,7 +1147,7 @@ short sbutton(char *var, float min, float max, char *str)
|
|||||||
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
||||||
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
||||||
|
|
||||||
block= uiNewBlock(&listb, "button", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&listb, "button", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
|
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
|
||||||
|
|
||||||
x1=mval[0]-150;
|
x1=mval[0]-150;
|
||||||
@@ -1180,7 +1180,7 @@ short fbutton(float *var, float min, float max, char *str)
|
|||||||
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
if(mval[0]>G.curscreen->sizex) mval[0]= G.curscreen->sizex-10;
|
||||||
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
if(mval[1]>G.curscreen->sizey) mval[1]= G.curscreen->sizey-10;
|
||||||
|
|
||||||
block= uiNewBlock(&listb, "button", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&listb, "button", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
|
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1);
|
||||||
|
|
||||||
x1=mval[0]-150;
|
x1=mval[0]-150;
|
||||||
@@ -1222,7 +1222,7 @@ int movetolayer_buts(unsigned int *lay)
|
|||||||
x1= pivot[0]-sizex+10;
|
x1= pivot[0]-sizex+10;
|
||||||
y1= pivot[1]-sizey/2;
|
y1= pivot[1]-sizey/2;
|
||||||
|
|
||||||
block= uiNewBlock(&listb, "button", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&listb, "button", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
|
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_RET_1);
|
||||||
|
|
||||||
dx= (sizex-5)/12;
|
dx= (sizex-5)/12;
|
||||||
@@ -1275,7 +1275,7 @@ void draw_numbuts_tip(char *str, int x1, int y1, int x2, int y2)
|
|||||||
temp= 0;
|
temp= 0;
|
||||||
while( BIF_GetStringWidth(G.fonts, str+temp, (U.transopts & TR_BUTTONS))>(x2 - x1-24)) temp++;
|
while( BIF_GetStringWidth(G.fonts, str+temp, (U.transopts & TR_BUTTONS))>(x2 - x1-24)) temp++;
|
||||||
glRasterPos2i(x1+16, y2-30);
|
glRasterPos2i(x1+16, y2-30);
|
||||||
BIF_DrawString(G.fonts, str+temp, (U.transopts & TR_BUTTONS), 0);
|
BIF_DrawString(G.fonts, str+temp, (U.transopts & TR_BUTTONS));
|
||||||
}
|
}
|
||||||
|
|
||||||
int do_clever_numbuts(char *name, int tot, int winevent)
|
int do_clever_numbuts(char *name, int tot, int winevent)
|
||||||
@@ -1305,7 +1305,7 @@ int do_clever_numbuts(char *name, int tot, int winevent)
|
|||||||
x1= mval[0]-sizex/2;
|
x1= mval[0]-sizex/2;
|
||||||
y2= mval[1]+sizey/2;
|
y2= mval[1]+sizey/2;
|
||||||
|
|
||||||
block= uiNewBlock(&listb, "numbuts", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
block= uiNewBlock(&listb, "numbuts", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
|
||||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_ENTER_OK);
|
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_ENTER_OK);
|
||||||
|
|
||||||
/* WATCH IT: TEX BUTTON EXCEPTION */
|
/* WATCH IT: TEX BUTTON EXCEPTION */
|
||||||
|
|||||||
@@ -213,8 +213,8 @@ void project_short_noclip(float *vec, short *adr)
|
|||||||
|
|
||||||
void project_float(float *vec, float *adr)
|
void project_float(float *vec, float *adr)
|
||||||
{
|
{
|
||||||
float fx, fy, vec4[4];
|
float vec4[4];
|
||||||
|
|
||||||
adr[0]= 3200.0;
|
adr[0]= 3200.0;
|
||||||
VECCOPY(vec4, vec);
|
VECCOPY(vec4, vec);
|
||||||
vec4[3]= 1.0;
|
vec4[3]= 1.0;
|
||||||
|
|||||||
Reference in New Issue
Block a user