Code cleanup's done by bedraw

This is patch #6886
https://projects.blender.org/tracker/index.php?func=detail&aid=6886&group_id=9&atid=127

removes some unused define's and some code that is no longer used and fixes some
formatting issues.

Kent
This commit is contained in:
Kent Mein
2007-06-28 15:57:54 +00:00
parent 85bbc4c3e2
commit cdb07720ed
3 changed files with 39 additions and 61 deletions

View File

@@ -40,7 +40,6 @@
#define MINFRAME 1
#define MINFRAMEF 1.0
#define MAXLAMP 32765
/* max length material array, 16 because of bits in matfrom */
#define MAXPICKBUF 10000
#define MAXSEQ 32
@@ -54,7 +53,7 @@
/* also fill in structs itself, dna cannot handle defines, duplicate with utildefines.h still */
#ifndef FILE_MAXDIR
#define FILE_MAXDIR 160
#define FILE_MAXDIR 160
#define FILE_MAXFILE 80
#endif
@@ -161,7 +160,6 @@
#define B_TEXALONE 47
#define B_MESHALONE 48
#define B_CURVEALONE 49
#define B_HEMESHALONE 50
/* EVENT < 50: alones en locals */
@@ -174,7 +172,7 @@
#define B_PLAINMENUS 66
#define B_GLRESLIMITCHANGED 69
#define B_GLRESLIMITCHANGED 69
#define B_SHOWSPLASH 70
#define B_RESETAUTOSAVE 71
#define B_SOUNDTOGGLE 72
@@ -215,17 +213,15 @@
#define B_AUTOKEY 139
#define B_SCENELOCK 140
#define B_LOCALVIEW 141
#define B_U_CAPSLOCK 142
#define B_U_CAPSLOCK 142
#define B_VIEWBUT 146
#define B_PERSP 147
#define B_PROPTOOL 148
#define B_VIEWRENDER 149
#define B_VIEWTRANS 150
#define B_VIEWZOOM 151
#define B_STARTGAME 152
#define B_VIEWRENDER 149
#define B_STARTGAME 150
#define B_MODESELECT 156
#define B_MODESELECT 156
#define B_AROUND 157
#define B_SEL_VERT 158
#define B_SEL_EDGE 159
@@ -233,8 +229,6 @@
#define B_MAN_TRANS 161
#define B_MAN_ROT 162
#define B_MAN_SCALE 163
#define B_HEMESHBROWSE 164
#define B_HEMESHLOCAL 165
/* IPO: 200 */
#define B_IPOHOME 201
@@ -245,10 +239,10 @@
#define B_IPOEXTRAP 206
#define B_IPOCYCLIC 207
#define B_IPOMAIN 208
#define B_IPOSHOWKEY 209
#define B_IPOCYCLICX 210
#define B_IPOSHOWKEY 209
#define B_IPOCYCLICX 210
/* warn: also used for oops and seq */
#define B_VIEW2DZOOM 211
#define B_VIEW2DZOOM 211
#define B_IPOPIN 212
#define B_IPO_ACTION_OB 213
#define B_IPO_ACTION_KEY 214
@@ -263,15 +257,15 @@
/* INFO: 300 */
/* watch: also in filesel.c and editobject.c */
#define B_INFOSCR 301
#define B_INFODELSCR 302
#define B_INFODELSCR 302
#define B_INFOSCE 304
#define B_INFODELSCE 305
#define B_INFODELSCE 305
#define B_FILEMENU 306
#define B_PACKFILE 307
#define B_CONSOLEOUT 308
#define B_CONSOLENUMLINES 309
#define B_USERPREF 310
#define B_USERPREF 310
#define B_LOADUIFONT 311
#define B_SETLANGUAGE 312
#define B_SETFONTSIZE 313
@@ -292,15 +286,15 @@
/* Definitions for the fileselect buttons in user prefs */
#define B_FONTDIRFILESEL 330
#define B_TEXTUDIRFILESEL 331
#define B_PLUGTEXDIRFILESEL 332
#define B_PLUGSEQDIRFILESEL 333
#define B_RENDERDIRFILESEL 334
#define B_PYTHONDIRFILESEL 335
#define B_PLUGTEXDIRFILESEL 332
#define B_PLUGSEQDIRFILESEL 333
#define B_RENDERDIRFILESEL 334
#define B_PYTHONDIRFILESEL 335
#define B_SOUNDDIRFILESEL 336
#define B_TEMPDIRFILESEL 337
/* yafray: for exportdir select */
#define B_YAFRAYDIRFILESEL 338
#define B_PYMENUEVAL 339 /* re-eval scripts registration in menus */
#define B_PYMENUEVAL 339 /* re-eval scripts registration in menus */
/* END Definitions for the fileselect buttons in user prefs */
/* IMAGE: 350 */
@@ -322,7 +316,7 @@
#define B_SIMACLONEDELETE 366
#define B_SIMANOTHING 368
#define B_SIMACURVES 369
#define B_SIMARANGE 370
#define B_SIMARANGE 370
#define B_SIMA_USE_ALPHA 371
#define B_SIMA_SHOW_ALPHA 372
#define B_SIMA_SHOW_ZBUF 373
@@ -333,16 +327,16 @@
#define B_SIMABTEXBROWSE 378
#define B_SIMABTEXDELETE 379
#define B_SIMARELOAD 380
#define B_SIMANAME 381
#define B_SIMAMULTI 382
#define B_SIMANAME 381
#define B_SIMAMULTI 382
#define B_TRANS_IMAGE 383
#define B_SIMA_REPACK 384
#define B_SIMA_PLAY 385
#define B_SIMA_PLAY 385
#define B_SIMA_RECORD 386
/* BUTS: 400 */
#define B_BUTSHOME 401
#define B_BUTSPREVIEW 402
#define B_BUTSPREVIEW 402
#define B_MATCOPY 403
#define B_MATPASTE 404
#define B_MESHTYPE 405
@@ -363,8 +357,8 @@
#define B_SYNTAX 509
/* SCRIPT: 525 */
#define B_SCRIPTBROWSE 526
#define B_SCRIPT2PREV 527
#define B_SCRIPTBROWSE 526
#define B_SCRIPT2PREV 527
/* FILE: 550 */
#define B_SORTFILELIST 551
@@ -384,7 +378,7 @@
#define B_ACTHOME 701
#define B_ACTCOPY 702
#define B_ACTPASTE 703
#define B_ACTPASTEFLIP 704
#define B_ACTPASTEFLIP 704
#define B_ACTCYCLIC 705
#define B_ACTCONT 706
#define B_ACTMAIN 707
@@ -395,23 +389,22 @@
#define B_TL_REW 751
#define B_TL_PLAY 752
#define B_TL_FF 753
#define B_TL_PREVKEY 754
#define B_TL_NEXTKEY 755
#define B_TL_PREVKEY 754
#define B_TL_NEXTKEY 755
#define B_TL_STOP 756
#define B_TL_PREVIEWON 757
#define B_TL_PREVIEWON 757
/* NLA: 801-850 */
#define B_NLAHOME 801
/* NODE: 851-900 */
#define B_NODEHOME 851
#define B_NODEHOME 851
#define B_NODE_USEMAT 852
#define B_NODE_USESCENE 853
/* FREE 901 - 999 */
#define B_NOTHING -1
#define B_NOP -1
@@ -420,22 +413,22 @@
#define B_KEEPORIG 2
#define B_BEAUTY 4
#define B_SMOOTH 8
#define B_BEAUTY_SHORT 16
#define B_BEAUTY_SHORT 16
#define B_AUTOFGON 32
#define B_KNIFE 0x80
#define B_PERCENTSUBD 0x40
#define B_MESH_X_MIRROR 0x100
#define B_JOINTRIA_UV 0x200
#define B_JOINTRIA_VCOL 0X400
#define B_JOINTRIA_SHARP 0X800
#define B_JOINTRIA_MAT 0X1000
#define B_PERCENTSUBD 0x40
#define B_MESH_X_MIRROR 0x100
#define B_JOINTRIA_UV 0x200
#define B_JOINTRIA_VCOL 0X400
#define B_JOINTRIA_SHARP 0X800
#define B_JOINTRIA_MAT 0X1000
/* DISPLAYMODE */
#define R_DISPLAYIMAGE 0
#define R_DISPLAYWIN 1
#define R_DISPLAYSCREEN 2
/* Gvp.flag and Gwp.flag */
/* Gvp.flag and Gwp.flag */
#define VP_COLINDEX 1
#define VP_AREA 2
#define VP_SOFT 4
@@ -443,7 +436,7 @@
#define VP_SPRAY 16
#define VP_MIRROR_X 32
#define VP_HARD 64
#define VP_ONLYVGROUP 128
#define VP_ONLYVGROUP 128
/* Error messages */
#define ERROR_LIBDATA_MESSAGE "Can't edit external libdata"

View File

@@ -94,7 +94,6 @@
#include "blendef.h"
#include "mydevice.h"
static int viewmovetemp = 0;
extern int totipo_edit, totipo_sel;
/* headerbutton call, assuming full context is set */
@@ -1065,7 +1064,6 @@ void do_ipo_buttons(short event)
allqueue(REDRAWVIEW3D, 0);
break;
case B_VIEW2DZOOM:
viewmovetemp= 0;
view2dzoom(event);
scrarea_queue_headredraw(curarea);
break;

View File

@@ -153,8 +153,6 @@
#define TEST_EDITMESH if(G.obedit==0) return; \
if( (G.vd->lay & G.obedit->lay)==0 ) return;
static int viewmovetemp = 0;
void do_layer_buttons(short event)
{
static int oldlay= 1;
@@ -4750,18 +4748,7 @@ void do_view3d_buttons(short event)
if (select_area(SPACE_VIEW3D)) {
start_game();
}
break;
case B_VIEWZOOM:
viewmovetemp= 0;
viewmove(2);
scrarea_queue_headredraw(curarea);
break;
case B_VIEWTRANS:
viewmovetemp= 0;
viewmove(1);
scrarea_queue_headredraw(curarea);
break;
break;
case B_MODESELECT:
if (G.vd->modeselect == V3D_OBJECTMODE_SEL) {