2.5 - Reworked the icon system a bit

* After several hours of manual dragging and typing the icon file is now 
enlarged and completely reorganised logically, rather than scattered 
throughout. This should provide a lot more room for growth, and is  a 
lot easier to work with (also allowing more space for toggle buttons 
that require two icon slots next to each other). The icon grid has now 
25 x 24 icons - hopefully this might last us for a couple more years :)

Some of the naming of icon defines is a bit ancient and can be cleaned 
up a bit further. Other devs, if when bringing spaces back, it's 
finding the wrong icon, or missing a define, try and look to see if 
it's already existing in the new icon file, or drop me a note and I'll 
fix it up.

Note: after these changes, older custom blender 2.4 icon 
files won't work and will need to be updated to the new layout.

* Enlarged the icons themselves from 15x16 pixels to 16x16 pixels (icon 
designer request). This is a more standard size, and is easier to fit 
stuff in proportionally.

* Added a bunch more of jendrzych's icons that weren't added previously 
since there wasn't space in the icon file (including a few more 
modifier icons)

* Tweaked the outliner somewhat, so that instead of just showing a 
generic 'object' icon for all objects, it shows 'object type' icons, 
per object type. This makes the outliner a lot more useful for browsing 
at a glance - a huge row of identical 'object' icons doesn't really 
give much useful information. See here:

http://mke3.net/blender/devel/2.5/outliner_obtypes.png
This commit is contained in:
Matt Ebb 2008-12-28 07:39:23 +00:00
parent 452f1d1ea9
commit fb32420330
7 changed files with 4630 additions and 3333 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 101 KiB

After

Width:  |  Height:  |  Size: 122 KiB

File diff suppressed because it is too large Load Diff

@ -35,6 +35,675 @@
/* elubie: TODO: move the typedef for icons to UI_interface_icons.h */
/* and add/replace include of UI_resources.h by UI_interface_icons.h */
typedef enum {
#define BIFICONID_FIRST (ICON_BLENDER)
/* ui */
ICON_BLENDER,
ICON_HELP,
ICON_ERROR,
ICON_BLANK1, // XXX this is used lots, it's not actually 'blank'
ICON_TRIA_RIGHT,
ICON_TRIA_DOWN,
ICON_TRIA_LEFT,
ICON_TRIA_UP,
ICON_BLANK002,
ICON_PLUS,
ICON_DISCLOSURE_TRI_DOWN,
ICON_DISCLOSURE_TRI_RIGHT,
ICON_CHECKBOX_DEHLT,
ICON_CHECKBOX_HLT,
ICON_MENU_PANEL,
ICON_PYTHON,
ICON_BLANK003,
ICON_DOT,
ICON_BLANK004,
ICON_X,
ICON_BLANK005,
ICON_GO_LEFT,
ICON_BLANK006,
ICON_BLANK007,
ICON_BLANK008,
/* ui */
ICON_FULLSCREEN,
ICON_SPLITSCREEN,
ICON_RIGHTARROW_THIN,
ICON_BORDERMOVE,
ICON_VIEWZOOM,
ICON_ZOOMIN,
ICON_ZOOMOUT,
ICON_PANEL_CLOSE,
ICON_BLANK009,
ICON_EYEDROPPER,
ICON_BLANK010,
ICON_AUTO,
ICON_BLANK011,
ICON_BLANK012,
ICON_UNLOCKED,
ICON_LOCKED,
ICON_BLANK013,
ICON_BLANK014,
ICON_BLANK015,
ICON_RIGHTARROW,
ICON_DOWNARROW_HLT,
ICON_DOTSUP,
ICON_DOTSDOWN,
ICON_LINK,
ICON_INLINK,
/* available */
ICON_BLANK016,
ICON_BLANK017,
ICON_BLANK018,
ICON_BLANK019,
ICON_BLANK020,
ICON_BLANK021,
ICON_BLANK022,
ICON_BLANK023,
ICON_BLANK024,
ICON_BLANK025,
ICON_BLANK026,
ICON_BLANK027,
ICON_BLANK028,
ICON_BLANK029,
ICON_BLANK030,
ICON_BLANK031,
ICON_BLANK032,
ICON_BLANK033,
ICON_BLANK034,
ICON_BLANK035,
ICON_BLANK036,
ICON_BLANK037,
ICON_BLANK038,
ICON_BLANK039,
ICON_BLANK040,
/* BUTTONS */
ICON_LAMP,
ICON_MATERIAL,
ICON_TEXTURE,
ICON_ANIM,
ICON_WORLD,
ICON_SCENE,
ICON_EDIT,
ICON_GAME,
ICON_RADIO,
ICON_SCRIPT,
ICON_PARTICLES,
ICON_PHYSICS,
ICON_SPEAKER,
ICON_BLANK041,
ICON_BLANK042,
ICON_BLANK043,
ICON_BLANK044,
ICON_BLANK045,
ICON_BLANK046,
ICON_BLANK047,
ICON_BLANK048,
ICON_BLANK049,
ICON_BLANK050,
ICON_BLANK051,
ICON_BLANK052,
/* EDITORS */
ICON_VIEW3D,
ICON_IPO,
ICON_OOPS,
ICON_BUTS,
ICON_FILESEL,
ICON_IMAGE_COL,
ICON_INFO,
ICON_SEQUENCE,
ICON_TEXT,
ICON_IMASEL,
ICON_SOUND,
ICON_ACTION,
ICON_NLA,
ICON_SCRIPTWIN,
ICON_TIME,
ICON_NODE,
ICON_BLANK053,
ICON_BLANK054,
ICON_BLANK055,
ICON_BLANK056,
ICON_BLANK057,
ICON_BLANK058,
ICON_BLANK059,
ICON_BLANK060,
ICON_BLANK061,
/* MODES */
ICON_OBJECTMODE, // XXX fix this up
ICON_EDITMODE_HLT,
ICON_FACESEL_HLT,
ICON_VPAINT_HLT,
ICON_TPAINT_HLT,
ICON_WPAINT_HLT,
ICON_SCULPTMODE_HLT,
ICON_POSE_HLT,
ICON_PARTICLEMODE,
ICON_BLANK062,
ICON_BLANK063,
ICON_BLANK064,
ICON_BLANK065,
ICON_BLANK066,
ICON_BLANK067,
ICON_BLANK068,
ICON_BLANK069,
ICON_BLANK070,
ICON_BLANK071,
ICON_BLANK072,
ICON_BLANK073,
ICON_BLANK074,
ICON_BLANK075,
ICON_BLANK076,
ICON_BLANK077,
/* DATA */
ICON_SCENE_DEHLT,
ICON_IMAGE_DEHLT,
ICON_WORLD_DEHLT,
ICON_OBJECT,
ICON_MESH,
ICON_CURVE,
ICON_MBALL,
ICON_LATTICE,
ICON_LAMP_DEHLT,
ICON_MATERIAL_DEHLT,
ICON_TEXTURE_DEHLT,
ICON_IPO_DEHLT,
ICON_CAMERA_DEHLT,
ICON_BLANK078,
ICON_LIBRARY_DEHLT,
ICON_CIRCLE_DEHLT,
ICON_ARMATURE,
ICON_POSE_DEHLT,
ICON_BONE_DEHLT,
ICON_CONSTRAINT,
ICON_EDIT_DEHLT,
ICON_VGROUP,
ICON_BLANK079,
ICON_PACKAGE,
ICON_UGLYPACKAGE,
/* DATA */
ICON_SCENE_HLT,
ICON_IMAGE_HLT,
ICON_WORLD_HLT,
ICON_OBJECT_HLT,
ICON_MESH_HLT,
ICON_CURVE_HLT,
ICON_MBALL_HLT,
ICON_LATTICE_HLT,
ICON_LAMP_HLT,
ICON_MATERIAL_HLT,
ICON_TEXTURE_HLT,
ICON_IPO_HLT,
ICON_BLANK080,
ICON_BLANK081,
ICON_LIBRARY_HLT,
ICON_BLANK082,
ICON_BLANK083,
ICON_BLANK084,
ICON_BLANK085,
ICON_BLANK086,
ICON_BLANK087,
ICON_BLANK088,
ICON_BLANK089,
ICON_BLANK090,
ICON_BLANK091,
/* available */
ICON_BLANK092,
ICON_BLANK093,
ICON_BLANK094,
ICON_BLANK095,
ICON_BLANK096,
ICON_BLANK097,
ICON_BLANK098,
ICON_BLANK099,
ICON_BLANK100,
ICON_BLANK101,
ICON_BLANK102,
ICON_BLANK103,
ICON_BLANK104,
ICON_BLANK105,
ICON_BLANK106,
ICON_BLANK107,
ICON_BLANK108,
ICON_BLANK109,
ICON_BLANK110,
ICON_BLANK111,
ICON_BLANK112,
ICON_BLANK113,
ICON_BLANK114,
ICON_BLANK115,
ICON_BLANK116,
/* OUTLINER */
ICON_OUTLINER_OB_EMPTY,
ICON_OUTLINER_OB_MESH,
ICON_OUTLINER_OB_CURVE,
ICON_OUTLINER_OB_LATTICE,
ICON_OUTLINER_OB_META,
ICON_OUTLINER_OB_LAMP,
ICON_OUTLINER_OB_CAMERA,
ICON_OUTLINER_OB_ARMATURE,
ICON_BLANK117,
ICON_BLANK118,
ICON_BLANK119,
ICON_BLANK120,
ICON_BLANK121,
ICON_BLANK122,
ICON_BLANK123,
ICON_BLANK124,
ICON_BLANK125,
ICON_BLANK126,
ICON_BLANK127,
ICON_RESTRICT_VIEW_OFF,
ICON_RESTRICT_VIEW_ON,
ICON_RESTRICT_SELECT_OFF,
ICON_RESTRICT_SELECT_ON,
ICON_RESTRICT_RENDER_OFF,
ICON_RESTRICT_RENDER_ON,
/* OUTLINER */
ICON_BLANK128,
ICON_OUTLINER_DATA_MESH,
ICON_OUTLINER_DATA_CURVE,
ICON_OUTLINER_DATA_LATTICE,
ICON_OUTLINER_DATA_META,
ICON_OUTLINER_DATA_LAMP,
ICON_OUTLINER_DATA_CAMERA,
ICON_OUTLINER_DATA_ARMATURE,
ICON_OUTLINER_DATA_POSE,
ICON_OUTLINER_DATA_GENERIC,
ICON_BLANK128b,
ICON_BLANK129,
ICON_BLANK130,
ICON_BLANK131,
ICON_BLANK132,
ICON_BLANK133,
ICON_BLANK134,
ICON_BLANK135,
ICON_BLANK136,
ICON_BLANK137,
ICON_BLANK138,
ICON_BLANK139,
ICON_BLANK140,
ICON_BLANK141,
ICON_BLANK142,
/* MODIFIERS */
ICON_MODIFIER,
ICON_MOD_WAVE,
ICON_MOD_BUILD,
ICON_MOD_DECIM,
ICON_MOD_MIRROR,
ICON_MOD_SOFT,
ICON_MOD_SUBSURF,
ICON_HOOK,
ICON_MOD_PARTICLEINSTANCE,
ICON_MOD_PARTICLES,
ICON_MOD_BOOLEAN,
ICON_MOD_EDGESPLIT,
ICON_MOD_ARRAY,
ICON_MOD_UVPROJECT,
ICON_MOD_DISPLACE,
ICON_BLANK143,
ICON_BLANK144,
ICON_BLANK145,
ICON_BLANK146,
ICON_BLANK147,
ICON_BLANK148,
ICON_BLANK149,
ICON_BLANK150,
ICON_BLANK151,
ICON_BLANK152,
/* available */
ICON_BLANK153,
ICON_BLANK154,
ICON_BLANK155,
ICON_BLANK156,
ICON_BLANK157,
ICON_BLANK158,
ICON_BLANK159,
ICON_BLANK160,
ICON_BLANK161,
ICON_BLANK162,
ICON_BLANK163,
ICON_BLANK164,
ICON_BLANK165,
ICON_BLANK166,
ICON_BLANK167,
ICON_BLANK168,
ICON_BLANK169,
ICON_BLANK170,
ICON_BLANK171,
ICON_BLANK172,
ICON_BLANK173,
ICON_BLANK174,
ICON_BLANK175,
ICON_BLANK176,
ICON_BLANK177,
/* ANIMATION */
ICON_REC,
ICON_PLAY,
ICON_FF,
ICON_REW,
ICON_PAUSE,
ICON_PREV_KEYFRAME,
ICON_NEXT_KEYFRAME,
ICON_PLAY_AUDIO,
ICON_BLANK178,
ICON_BLANK179,
ICON_BLANK180,
ICON_PMARKER_ACT,
ICON_PMARKER_SEL,
ICON_PMARKER,
ICON_MARKER_HLT,
ICON_MARKER,
ICON_SPACE2, // XXX
ICON_SPACE3, // XXX
ICON_BLANK181,
ICON_KEY_DEHLT,
ICON_KEY_HLT,
ICON_MUTE_IPO_OFF,
ICON_MUTE_IPO_ON,
ICON_BLANK182,
ICON_BLANK183,
/* available */
ICON_BLANK184,
ICON_BLANK185,
ICON_BLANK186,
ICON_BLANK187,
ICON_BLANK188,
ICON_BLANK189,
ICON_BLANK190,
ICON_BLANK191,
ICON_BLANK192,
ICON_BLANK193,
ICON_BLANK194,
ICON_BLANK195,
ICON_BLANK196,
ICON_BLANK197,
ICON_BLANK198,
ICON_BLANK199,
ICON_BLANK200,
ICON_BLANK201,
ICON_BLANK202,
ICON_BLANK203,
ICON_BLANK204,
ICON_BLANK205,
ICON_BLANK206,
ICON_BLANK207,
ICON_BLANK208,
/* EDITING */
ICON_VERTEXSEL,
ICON_EDGESEL,
ICON_FACESEL,
ICON_BLANK209,
ICON_BLANK210,
ICON_ROTATE,
ICON_CURSOR,
ICON_ROTATECOLLECTION,
ICON_ROTATECENTER,
ICON_ROTACTIVE,
ICON_ALIGN,
ICON_BLANK211,
ICON_SMOOTHCURVE,
ICON_SPHERECURVE,
ICON_ROOTCURVE,
ICON_SHARPCURVE,
ICON_LINCURVE,
ICON_NOCURVE,
ICON_RNDCURVE,
ICON_PROP_OFF,
ICON_PROP_ON,
ICON_PROP_CON,
ICON_BLANK212,
ICON_BLANK213,
ICON_BLANK214,
/* EDITING */
ICON_MAN_TRANS,
ICON_MAN_ROT,
ICON_MAN_SCALE,
ICON_MANIPUL,
ICON_BLANK215,
ICON_SNAP_GEAR,
ICON_SNAP_GEO,
ICON_SNAP_NORMAL,
ICON_BLANK216,
ICON_BLANK217,
ICON_BLANK218,
ICON_STICKY_UVS_LOC,
ICON_STICKY_UVS_DISABLE,
ICON_STICKY_UVS_VERT,
ICON_CLIPUV_DEHLT,
ICON_CLIPUV_HLT,
ICON_BLANK218b,
ICON_BLANK219,
ICON_BLANK220,
ICON_BLANK221,
ICON_BLANK222,
ICON_BLANK223,
ICON_BLANK224,
ICON_BLANK225,
ICON_BLANK226,
/* EDITING */
ICON_PASTEDOWN,
ICON_COPYDOWN,
ICON_PASTEFLIPUP,
ICON_PASTEFLIPDOWN,
ICON_BLANK227,
ICON_BLANK228,
ICON_BLANK229,
ICON_BLANK230,
ICON_BLANK231,
ICON_BLANK232,
ICON_BLANK233,
ICON_BLANK234,
ICON_BLANK235,
ICON_BLANK236,
ICON_BLANK237,
ICON_BLANK238,
ICON_BLANK239,
ICON_BLANK240,
ICON_BLANK241,
ICON_BLANK242,
ICON_BLANK243,
ICON_BLANK244,
ICON_BLANK245,
ICON_BLANK246,
ICON_BLANK247,
/* 3D VIEW */
ICON_BBOX,
ICON_WIRE,
ICON_SOLID,
ICON_SMOOTH,
ICON_POTATO,
ICON_BLANK248,
ICON_ORTHO,
ICON_BLANK249,
ICON_CAMERA,
ICON_LOCKVIEW_OFF,
ICON_LOCKVIEW_ON,
ICON_BLANK250,
ICON_AXIS_SIDE,
ICON_AXIS_FRONT,
ICON_AXIS_TOP,
ICON_NDOF_DOM,
ICON_NDOF_TURN,
ICON_NDOF_FLY,
ICON_NDOF_TRANS,
ICON_LAYER_USED,
ICON_LAYER_ACTIVE,
ICON_BLANK254,
ICON_BLANK255,
ICON_BLANK256,
ICON_BLANK257,
/* available */
ICON_BLANK258,
ICON_BLANK259,
ICON_BLANK260,
ICON_BLANK261,
ICON_BLANK262,
ICON_BLANK263,
ICON_BLANK264,
ICON_BLANK265,
ICON_BLANK266,
ICON_BLANK267,
ICON_BLANK268,
ICON_BLANK269,
ICON_BLANK270,
ICON_BLANK271,
ICON_BLANK272,
ICON_BLANK273,
ICON_BLANK274,
ICON_BLANK275,
ICON_BLANK276,
ICON_BLANK277,
ICON_BLANK278,
ICON_BLANK279,
ICON_BLANK280,
ICON_BLANK281,
ICON_BLANK282,
/* FILE SELECT */
ICON_SORTALPHA,
ICON_SORTBYEXT,
ICON_SORTTIME,
ICON_SORTSIZE,
ICON_LONGDISPLAY,
ICON_SHORTDISPLAY,
ICON_GHOST,
ICON_BLANK283,
ICON_BLANK284,
ICON_BLANK285,
ICON_FOLDER_DEHLT,
ICON_FOLDER_HLT,
ICON_BLUEIMAGE_DEHLT,
ICON_BLUEIMAGE_HLT,
ICON_BPIBFOLDER_DEHLT,
ICON_BPIBFOLDER_HLT,
ICON_BPIBFOLDER_ERR,
ICON_BOOKMARKS,
ICON_FONTPREVIEW,
ICON_BLANK286,
ICON_BLANK287,
ICON_BLANK288,
ICON_BLANK289,
ICON_BLANK290,
ICON_BLANK291,
/* available */
ICON_BLANK292,
ICON_BLANK293,
ICON_BLANK294,
ICON_BLANK295,
ICON_BLANK296,
ICON_BLANK297,
ICON_BLANK298,
ICON_BLANK299,
ICON_BLANK300,
ICON_BLANK301,
ICON_BLANK302,
ICON_BLANK303,
ICON_BLANK304,
ICON_BLANK305,
ICON_BLANK306,
ICON_BLANK307,
ICON_BLANK308,
ICON_BLANK309,
ICON_BLANK310,
ICON_BLANK311,
ICON_BLANK312,
ICON_BLANK313,
ICON_BLANK314,
ICON_BLANK315,
ICON_BLANK316,
/* SHADING / TEXT */
ICON_MATPLANE,
ICON_MATSPHERE,
ICON_MATCUBE,
ICON_MONKEY,
ICON_HAIR,
ICON_RING,
ICON_BLANK317,
ICON_BLANK318,
ICON_BLANK319,
ICON_BLANK320,
ICON_BLANK321,
ICON_BLANK322,
ICON_BLANK5, // XXX CHANGE TO WORDWRAP
ICON_BLANK6, // XXX CHANGE TO WORDWRAP
ICON_SYNTAX, // XXX CHANGE OFF -> ON
ICON_SYNTAX_OFF,
ICON_LINENUMBERS_OFF, // XXX CREATE NEW
ICON_LINENUMBERS_ON,
ICON_SCRIPTPLUGINS, // XXX CREATE NEW
ICON_BLANK323,
ICON_BLANK324,
ICON_BLANK325,
ICON_BLANK326,
ICON_BLANK327,
ICON_BLANK328,
/* SEQUENCE / IMAGE EDITOR */
ICON_SEQ_SEQUENCER,
ICON_SEQ_PREVIEW,
ICON_SEQ_LUMA_WAVEFORM,
ICON_SEQ_CHROMA_SCOPE,
ICON_BLANK329,
ICON_BLANK330,
ICON_BLANK331,
ICON_BLANK332,
ICON_BLANK333,
ICON_TRANSP_HLT, // XXX CHANGE TO STRAIGHT ALPHA, Z ETC
ICON_TRANSP_DEHLT,
ICON_BLANK334,
ICON_BLANK335,
ICON_IMAGEFILE,
ICON_BLANK336,
ICON_BLANK337,
ICON_BLANK338,
ICON_BLANK339,
ICON_BLANK340,
ICON_BLANK341,
ICON_BLANK342,
ICON_BLANK343,
ICON_BLANK344,
ICON_BLANK345,
ICON_BLANK346,
/* vector icons */
VICON_VIEW3D,
VICON_EDIT,
VICON_EDITMODE_DEHLT,
VICON_EDITMODE_HLT,
VICON_DISCLOSURE_TRI_RIGHT,
VICON_DISCLOSURE_TRI_DOWN,
VICON_MOVE_UP,
VICON_MOVE_DOWN,
VICON_X
#define BIFICONID_LAST (VICON_X)
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
} BIFIconID;
#if 0
typedef enum {
#define BIFICONID_FIRST (ICON_VIEW3D)
ICON_VIEW3D,
@ -364,6 +1033,7 @@ typedef enum {
#define BIFICONID_LAST (VICON_X)
#define BIFNICONIDS (BIFICONID_LAST-BIFICONID_FIRST + 1)
} BIFIconID;
#endif
typedef enum {
#define BIFCOLORSHADE_FIRST (COLORSHADE_DARK)

@ -64,14 +64,14 @@
#include "interface_intern.h"
#include "ED_datafiles.h"
#define ICON_IMAGE_W 512
#define ICON_IMAGE_H 256
#define ICON_IMAGE_W 600
#define ICON_IMAGE_H 512
#define ICON_GRID_COLS 25
#define ICON_GRID_ROWS 12
#define ICON_GRID_ROWS 24
#define ICON_GRID_MARGIN 5
#define ICON_GRID_W 15
#define ICON_GRID_W 16
#define ICON_GRID_H 16
typedef struct IconImage {
@ -123,7 +123,7 @@ static void def_internal_icon(ImBuf *bbuf, int icon_id, int xofs, int yofs)
/* Here we store the rect in the icon - same as before */
for (y=0; y<ICON_DEFAULT_HEIGHT; y++) {
memcpy(&iimg->rect[y*ICON_DEFAULT_HEIGHT], &bbuf->rect[(y+yofs)*512+xofs], ICON_DEFAULT_HEIGHT*sizeof(int));
memcpy(&iimg->rect[y*ICON_DEFAULT_HEIGHT], &bbuf->rect[(y+yofs)*ICON_IMAGE_W+xofs], ICON_DEFAULT_HEIGHT*sizeof(int));
}
di->icon = iimg;
@ -399,39 +399,6 @@ static void vicon_move_down_draw(int x, int y, int w, int h, float alpha)
glDisable(GL_LINE_SMOOTH);
}
/***/
static void clear_icon_grid_margins(unsigned char *rect, int w, int h)
{
int x, y;
int xoffs=ICON_GRID_W+ICON_GRID_MARGIN;
int yoffs=ICON_GRID_H+ICON_GRID_MARGIN;
for (y=0; y<h; y++) {
unsigned char *row= &rect[y*w*4];
for (x=0; x<w; x++) {
unsigned char *pxl= &row[x*4];
if ((x % xoffs < ICON_GRID_MARGIN-2) || (x % xoffs > ICON_GRID_W+2))
pxl[3] = 0; //alpha channel == x+3
else if ((y % yoffs < ICON_GRID_MARGIN-2) || (y % yoffs > ICON_GRID_H+2))
pxl[3] = 0;
}
}
}
static void prepare_internal_icons(ImBuf *bbuf)
{
unsigned char *back= (unsigned char *)bbuf->rect;
/* this sets the icon grid margin area outside of icon to zero alpha */
clear_icon_grid_margins(back, bbuf->x, bbuf->y);
}
static void init_internal_icons()
{
bTheme *btheme= U.themes.first;
@ -458,14 +425,12 @@ static void init_internal_icons()
} else {
bbuf = IMB_ibImageFromMemory((int *)datatoc_blenderbuttons, datatoc_blenderbuttons_size, IB_rect);
}
prepare_internal_icons(bbuf);
for (y=0; y<ICON_GRID_ROWS; y++) {
for (x=0; x<ICON_GRID_COLS; x++) {
def_internal_icon(bbuf, BIFICONID_FIRST + y*ICON_GRID_COLS + x,
x*(ICON_GRID_W+ICON_GRID_MARGIN)+3,
y*(ICON_GRID_H+ICON_GRID_MARGIN)+3);
x*(ICON_GRID_W+ICON_GRID_MARGIN)+ICON_GRID_MARGIN,
y*(ICON_GRID_H+ICON_GRID_MARGIN)+ICON_GRID_MARGIN);
}
}

@ -437,14 +437,8 @@ void action_header_buttons(const bContext *C, ARegion *ar)
/* COPY PASTE */
uiBlockBeginAlign(block);
if (sa->headertype==HEADERTOP) {
uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYUP, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEUP, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer");
}
else {
uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYDOWN, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer");
}
uiDefIconBut(block, BUT, B_ACTCOPYKEYS, ICON_COPYDOWN, xco,yco,XIC,YIC, 0, 0, 0, 0, 0, "Copies the selected keyframes from the selected channel(s) to the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEKEYS, ICON_PASTEDOWN, xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Pastes the keyframes from the buffer");
uiBlockEndAlign(block);
xco += (XIC + 8);

@ -2996,10 +2996,10 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
case TSE_NLA_ACTION:
UI_icon_draw(x, y, ICON_ACTION); break;
case TSE_DEFGROUP_BASE:
UI_icon_draw(x, y, ICON_VERTEXSEL); break;
UI_icon_draw(x, y, ICON_VGROUP); break;
case TSE_BONE:
case TSE_EBONE:
UI_icon_draw(x, y, ICON_WPAINT_DEHLT); break;
UI_icon_draw(x, y, ICON_BONE_DEHLT); break;
case TSE_CONSTRAINT_BASE:
UI_icon_draw(x, y, ICON_CONSTRAINT); break;
case TSE_MODIFIER_BASE:
@ -3036,8 +3036,17 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
case eModifierType_Boolean:
UI_icon_draw(x, y, ICON_MOD_BOOLEAN); break;
case eModifierType_ParticleSystem:
UI_icon_draw(x, y, ICON_MOD_PARTICLEINSTANCE); break;
case eModifierType_ParticleInstance:
UI_icon_draw(x, y, ICON_PARTICLES); break;
UI_icon_draw(x, y, ICON_MOD_PARTICLES); break;
case eModifierType_EdgeSplit:
UI_icon_draw(x, y, ICON_MOD_EDGESPLIT); break;
case eModifierType_Array:
UI_icon_draw(x, y, ICON_MOD_ARRAY); break;
case eModifierType_UVProject:
UI_icon_draw(x, y, ICON_MOD_UVPROJECT); break;
case eModifierType_Displace:
UI_icon_draw(x, y, ICON_MOD_DISPLACE); break;
default:
UI_icon_draw(x, y, ICON_DOT); break;
}
@ -3046,9 +3055,9 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
case TSE_SCRIPT_BASE:
UI_icon_draw(x, y, ICON_TEXT); break;
case TSE_POSE_BASE:
UI_icon_draw(x, y, ICON_ARMATURE_DEHLT); break;
UI_icon_draw(x, y, ICON_ARMATURE); break;
case TSE_POSE_CHANNEL:
UI_icon_draw(x, y, ICON_WPAINT_DEHLT); break;
UI_icon_draw(x, y, ICON_BONE_DEHLT); break;
case TSE_PROXY:
UI_icon_draw(x, y, ICON_GHOST); break;
case TSE_R_LAYER_BASE:
@ -3085,22 +3094,44 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
UI_icon_draw(x, y, ICON_DOT); break;
}
}
else if (GS(tselem->id->name) == ID_OB) {
Object *ob= (Object *)tselem->id;
switch (ob->type) {
case OB_LAMP:
UI_icon_draw(x, y, ICON_OUTLINER_OB_LAMP); break;
case OB_MESH:
UI_icon_draw(x, y, ICON_OUTLINER_OB_MESH); break;
case OB_CAMERA:
UI_icon_draw(x, y, ICON_OUTLINER_OB_CAMERA); break;
case OB_CURVE:
UI_icon_draw(x, y, ICON_OUTLINER_OB_CURVE); break;
case OB_MBALL:
UI_icon_draw(x, y, ICON_OUTLINER_OB_META); break;
case OB_LATTICE:
UI_icon_draw(x, y, ICON_OUTLINER_OB_LATTICE); break;
case OB_ARMATURE:
UI_icon_draw(x, y, ICON_OUTLINER_OB_ARMATURE); break;
case OB_EMPTY:
UI_icon_draw(x, y, ICON_OUTLINER_OB_EMPTY); break;
}
}
else {
switch( GS(tselem->id->name)) {
case ID_SCE:
UI_icon_draw(x, y, ICON_SCENE_DEHLT); break;
case ID_OB:
UI_icon_draw(x, y, ICON_OBJECT); break;
//case ID_OB:
// UI_icon_draw(x, y, ICON_OBJECT); break;
case ID_ME:
UI_icon_draw(x, y, ICON_MESH); break;
UI_icon_draw(x, y, ICON_OUTLINER_DATA_MESH); break;
case ID_CU:
UI_icon_draw(x, y, ICON_CURVE); break;
UI_icon_draw(x, y, ICON_OUTLINER_DATA_CURVE); break;
case ID_MB:
UI_icon_draw(x, y, ICON_MBALL); break;
case ID_LT:
UI_icon_draw(x, y, ICON_LATTICE); break;
case ID_LA:
UI_icon_draw(x, y, ICON_LAMP_DEHLT); break;
UI_icon_draw(x, y, ICON_OUTLINER_DATA_LAMP); break;
case ID_MA:
UI_icon_draw(x, y, ICON_MATERIAL_DEHLT); break;
case ID_TE:
@ -3112,9 +3143,9 @@ static void tselem_draw_icon(float x, float y, TreeStoreElem *tselem, TreeElemen
case ID_SO:
UI_icon_draw(x, y, ICON_SPEAKER); break;
case ID_AR:
UI_icon_draw(x, y, ICON_ARMATURE); break;
UI_icon_draw(x, y, ICON_OUTLINER_DATA_ARMATURE); break;
case ID_CA:
UI_icon_draw(x, y, ICON_CAMERA_DEHLT); break;
UI_icon_draw(x, y, ICON_OUTLINER_DATA_CAMERA); break;
case ID_KE:
UI_icon_draw(x, y, ICON_EDIT_DEHLT); break;
case ID_WO:
@ -3250,9 +3281,9 @@ static void outliner_draw_tree_element(Scene *scene, ARegion *ar, SpaceOops *soo
// icons a bit higher
if(tselem->flag & TSE_CLOSED)
UI_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_RIGHT);
UI_icon_draw((float)icon_x, (float)*starty+2, ICON_DISCLOSURE_TRI_RIGHT);
else
UI_icon_draw((float)icon_x, (float)*starty+2, ICON_TRIA_DOWN);
UI_icon_draw((float)icon_x, (float)*starty+2, ICON_DISCLOSURE_TRI_DOWN);
}
offsx+= OL_X;
@ -3265,9 +3296,9 @@ static void outliner_draw_tree_element(Scene *scene, ARegion *ar, SpaceOops *soo
if(tselem->type==0 && tselem->id->lib) {
glPixelTransferf(GL_ALPHA_SCALE, 0.5f);
if(tselem->id->flag & LIB_INDIRECT)
UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_DATALIB);
UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_HLT);
else
UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_PARLIB);
UI_icon_draw((float)startx+offsx, (float)*starty+2, ICON_LIBRARY_DEHLT);
glPixelTransferf(GL_ALPHA_SCALE, 1.0f);
offsx+= OL_X;
}

@ -5864,7 +5864,7 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
xco+= (a-2)*(XIC/2)+3;
/* LOCK */
uiDefIconButS(block, ICONTOG, B_SCENELOCK, ICON_UNLOCKED, xco+=XIC,yco,XIC,YIC, &(v3d->scenelock), 0, 0, 0, 0, "Locks Active Camera and layers to Scene (Ctrl `)");
uiDefIconButS(block, ICONTOG, B_SCENELOCK, ICON_LOCKVIEW_OFF, xco+=XIC,yco,XIC,YIC, &(v3d->scenelock), 0, 0, 0, 0, "Locks Active Camera and layers to Scene (Ctrl `)");
xco+= XIC+10;
}
@ -5946,29 +5946,18 @@ void view3d_header_buttons(const bContext *C, ARegion *ar)
if (ob && (ob->flag & OB_POSEMODE)) {
xco+= XIC/2;
uiBlockBeginAlign(block);
if(ar->alignment==RGN_ALIGN_TOP) {
uiDefIconBut(block, BUT, B_ACTCOPY, ICON_COPYUP,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Copies the current pose to the buffer");
uiDefIconBut(block, BUT, B_ACTPASTE, ICON_PASTEUP,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the pose from the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEFLIP, ICON_PASTEFLIPUP,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the mirrored pose from the buffer");
}
else {
uiDefIconBut(block, BUT, B_ACTCOPY, ICON_COPYDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Copies the current pose to the buffer");
uiBlockSetButLock(block, object_data_is_libdata(ob), "Can't edit external libdata");
uiDefIconBut(block, BUT, B_ACTPASTE, ICON_PASTEDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the pose from the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEFLIP, ICON_PASTEFLIPDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the mirrored pose from the buffer");
}
uiDefIconBut(block, BUT, B_ACTCOPY, ICON_COPYDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Copies the current pose to the buffer");
uiBlockSetButLock(block, object_data_is_libdata(ob), "Can't edit external libdata");
uiDefIconBut(block, BUT, B_ACTPASTE, ICON_PASTEDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the pose from the buffer");
uiDefIconBut(block, BUT, B_ACTPASTEFLIP, ICON_PASTEFLIPDOWN,
xco+=XIC,yco,XIC,YIC, 0, 0, 0, 0, 0,
"Pastes the mirrored pose from the buffer");
uiBlockEndAlign(block);
}
}