Got rid of some dead code

This commit is contained in:
Matt Ebb 2009-12-28 05:14:32 +00:00
parent dbf295b904
commit f9ee03f1b1
8 changed files with 0 additions and 809 deletions

@ -1210,114 +1210,6 @@ uiLayout *uiTemplateConstraint(uiLayout *layout, PointerRNA *ptr)
return draw_constraint(layout, ob, con);
}
/************************* Group Template ***************************/
#if 0
static void do_add_groupmenu(void *arg, int event)
{
Object *ob= OBACT;
if(ob) {
if(event== -1) {
Group *group= add_group( "Group" );
add_to_group(group, ob);
}
else
add_to_group(BLI_findlink(&G.main->group, event), ob);
ob->flag |= OB_FROMGROUP;
BASACT->flag |= OB_FROMGROUP;
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
}
}
static uiBlock *add_groupmenu(void *arg_unused)
{
uiBlock *block;
Group *group;
short xco=0, yco= 0, index=0;
char str[32];
block= uiNewBlock(&curarea->uiblocks, "add_constraintmenu", UI_EMBOSSP, UI_HELV, curarea->win);
uiBlockSetButmFunc(block, do_add_groupmenu, NULL);
uiDefBut(block, BUTM, B_NOP, "ADD NEW", 0, 20, 160, 19, NULL, 0.0, 0.0, 1, -1, "");
for(group= G.main->group.first; group; group= group->id.next, index++) {
/*if(group->id.lib) strcpy(str, "L ");*/ /* we cant allow adding objects inside linked groups, it wont be saved anyway */
if(group->id.lib==0) {
strcpy(str, " ");
strcat(str, group->id.name+2);
uiDefBut(block, BUTM, B_NOP, str, xco*160, -20*yco, 160, 19, NULL, 0.0, 0.0, 1, index, "");
yco++;
if(yco>24) {
yco= 0;
xco++;
}
}
}
uiTextBoundsBlock(block, 50);
uiBlockSetDirection(block, UI_DOWN);
return block;
}
static void group_ob_rem(void *gr_v, void *ob_v)
{
Object *ob= OBACT;
if(rem_from_group(gr_v, ob) && find_group(ob, NULL)==NULL) {
ob->flag &= ~OB_FROMGROUP;
BASACT->flag &= ~OB_FROMGROUP;
}
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
}
static void group_local(void *gr_v, void *unused)
{
Group *group= gr_v;
group->id.lib= NULL;
allqueue(REDRAWBUTSOBJECT, 0);
allqueue(REDRAWVIEW3D, 0);
}
uiLayout *uiTemplateGroup(uiLayout *layout, Object *ob, Group *group)
{
uiSetButLock(1, NULL);
uiDefBlockBut(block, add_groupmenu, NULL, "Add to Group", 10,150,150,20, "Add Object to a new Group");
/* all groups */
if(group->id.lib) {
uiLayoutRow()
uiBlockBeginAlign(block);
uiSetButLock(GET_INT_FROM_POINTER(group->id.lib), ERROR_LIBDATA_MESSAGE); /* We cant actually use this button */
uiDefBut(block, TEX, B_IDNAME, "GR:", 10, 120-yco, 100, 20, group->id.name+2, 0.0, 21.0, 0, 0, "Displays Group name. Click to change.");
uiClearButLock();
but= uiDefIconBut(block, BUT, B_NOP, ICON_PARLIB, 110, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Make Group local");
uiButSetFunc(but, group_local, group, NULL);
uiBlockEndAlign(block);
} else {
but = uiDefBut(block, TEX, B_IDNAME, "GR:", 10, 120-yco, 120, 20, group->id.name+2, 0.0, 21.0, 0, 0, "Displays Group name. Click to change.");
uiButSetFunc(but, test_idbutton_cb, group->id.name, NULL);
}
xco = 290;
if(group->id.lib==0) { /* cant remove objects from linked groups */
but = uiDefIconBut(block, BUT, B_NOP, ICON_X, xco, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove Group membership");
uiButSetFunc(but, group_ob_rem, group, ob);
}
}
#endif
/************************* Preview Template ***************************/

@ -75,343 +75,6 @@
#include "image_intern.h"
/* ************************ header area region *********************** */
#define B_NOP -1
#define B_REDR 1
#define B_SIMAGEPAINTTOOL 4
#define B_SIMA_USE_ALPHA 5
#define B_SIMA_SHOW_ALPHA 6
#define B_SIMA_SHOW_ZBUF 7
#define B_SIMA_RECORD 8
#define B_SIMA_PLAY 9
#if 0
static void do_image_imagemenu(void *arg, int event)
{
/* events >=20 are registered bpython scripts */
#ifndef DISABLE_PYTHON
if (event >= 20) BPY_menu_do_python(PYMENU_IMAGE, event - 20);
#endif
}
#ifndef DISABLE_PYTHON
{
BPyMenu *pym;
int i = 0;
/* note that we acount for the N previous entries with i+20: */
for (pym = BPyMenuTable[PYMENU_IMAGE]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
NULL, 0.0, 0.0, 1, i+20,
pym->tooltip?pym->tooltip:pym->filename);
}
}
#endif
#endif
#if 0
#ifndef DISABLE_PYTHON
static void do_image_uvs_scriptsmenu(void *arg, int event)
{
BPY_menu_do_python(PYMENU_UV, event);
allqueue(REDRAWIMAGE, 0);
}
static void image_uvs_scriptsmenu (void *args_unused)
{
uiBlock *block;
BPyMenu *pym;
int i= 0;
short yco = 20, menuwidth = 120;
block= uiNewBlock(&curarea->uiblocks, "image_uvs_scriptsmenu", UI_EMBOSSP);
uiBlockSetButmFunc(block, do_image_uvs_scriptsmenu, NULL);
/* note that we acount for the N previous entries with i+20: */
for (pym = BPyMenuTable[PYMENU_UV]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
NULL, 0.0, 0.0, 1, i,
pym->tooltip?pym->tooltip:pym->filename);
}
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
return block;
}
#endif /* DISABLE_PYTHON */
#endif
#if 0
static void do_image_buttons(bContext *C, void *arg, int event)
{
switch(event) {
case B_REDR:
ED_area_tag_redraw(CTX_wm_area(C));
break;
}
ToolSettings *settings= G.scene->toolsettings;
ID *id, *idtest;
int nr;
if(curarea->win==0) return;
if(event<=100) {
if(event<=50) do_global_buttons2(event);
else do_global_buttons(event);
return;
}
switch(event) {
case B_SIMABROWSE:
if(sima->imanr== -2) {
if(G.qual & LR_CTRLKEY) {
activate_databrowse_imasel((ID *)sima->image, ID_IM, 0, B_SIMABROWSE,
&sima->imanr, do_image_buttons);
} else {
activate_databrowse((ID *)sima->image, ID_IM, 0, B_SIMABROWSE,
&sima->imanr, do_image_buttons);
}
return;
}
if(sima->imanr < 0) break;
nr= 1;
id= (ID *)sima->image;
idtest= BLI_findlink(&G.main->image, sima->imanr-1);
if(idtest==NULL) { /* no new */
return;
}
if(idtest!=id) {
sima->image= (Image *)idtest;
if(idtest->us==0) idtest->us= 1;
BKE_image_signal(sima->image, &sima->iuser, IMA_SIGNAL_USER_NEW_IMAGE);
allqueue(REDRAWIMAGE, 0);
}
/* also when image is the same: assign! 0==no tileflag: */
image_changed(sima, (Image *)idtest);
BIF_undo_push("Assign image UV");
break;
case B_SIMAGETILE:
image_set_tile(sima, 1); /* 1: only tileflag */
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMA3DVIEWDRAW:
allqueue(REDRAWVIEW3D, 0);
break;
case B_SIMA_REDR_IMA_3D:
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMAPACKIMA:
pack_image_sima();
break;
case B_SIMA_REPACK:
BKE_image_memorypack(sima->image);
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMA_USE_ALPHA:
sima->flag &= ~(SI_SHOW_ALPHA|SI_SHOW_ZBUF);
scrarea_queue_winredraw(curarea);
scrarea_queue_headredraw(curarea);
break;
case B_SIMA_SHOW_ALPHA:
sima->flag &= ~(SI_USE_ALPHA|SI_SHOW_ZBUF);
scrarea_queue_winredraw(curarea);
scrarea_queue_headredraw(curarea);
break;
case B_SIMA_SHOW_ZBUF:
sima->flag &= ~(SI_SHOW_ALPHA|SI_USE_ALPHA);
scrarea_queue_winredraw(curarea);
scrarea_queue_headredraw(curarea);
break;
case B_SIMARELOAD:
reload_image_sima();
break;
case B_SIMAGELOAD:
open_image_sima(0);
break;
case B_SIMANAME:
if(sima->image) {
Image *ima;
char str[FILE_MAXDIR+FILE_MAXFILE];
/* name in ima has been changed by button! */
BLI_strncpy(str, sima->image->name, sizeof(str));
ima= BKE_add_image_file(str);
if(ima) {
BKE_image_signal(ima, &sima->iuser, IMA_SIGNAL_RELOAD);
image_changed(sima, ima);
}
BIF_undo_push("Load image");
allqueue(REDRAWIMAGE, 0);
}
break;
case B_SIMAMULTI:
if(sima && sima->image) {
BKE_image_multilayer_index(sima->image->rr, &sima->iuser);
allqueue(REDRAWIMAGE, 0);
}
break;
case B_TRANS_IMAGE:
image_editvertex_buts(NULL);
break;
case B_CURSOR_IMAGE:
image_editcursor_buts(NULL);
break;
case B_TWINANIM:
{
Image *ima;
int nr;
ima = sima->image;
if (ima) {
if(ima->flag & IMA_TWINANIM) {
nr= ima->xrep*ima->yrep;
if(ima->twsta>=nr) ima->twsta= 1;
if(ima->twend>=nr) ima->twend= nr-1;
if(ima->twsta>ima->twend) ima->twsta= 1;
}
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWVIEW3D, 0);
}
break;
}
case B_SIMACLONEBROWSE:
if(settings->imapaint.brush) {
Brush *brush= settings->imapaint.brush;
if(sima->menunr== -2) {
if(G.qual & LR_CTRLKEY) {
activate_databrowse_imasel((ID *)brush->clone.image, ID_IM, 0, B_SIMACLONEBROWSE,
&sima->menunr, do_image_buttons);
} else {
activate_databrowse((ID *)brush->clone.image, ID_IM, 0, B_SIMACLONEBROWSE,
&sima->menunr, do_image_buttons);
}
break;
}
if(sima->menunr < 0) break;
if(brush_clone_image_set_nr(brush, sima->menunr))
allqueue(REDRAWIMAGE, 0);
}
break;
case B_SIMACLONEDELETE:
if (settings->imapaint.brush)
if (brush_clone_image_delete(settings->imapaint.brush))
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMABRUSHCHANGE:
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWBUTSEDIT, 0);
break;
case B_SIMACURVES:
curvemapping_do_ibuf(sima->cumap, imagewindow_get_ibuf(sima));
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMARANGE:
curvemapping_set_black_white(sima->cumap, NULL, NULL);
curvemapping_do_ibuf(sima->cumap, imagewindow_get_ibuf(sima));
allqueue(REDRAWIMAGE, 0);
break;
case B_SIMABRUSHBROWSE:
if(sima->menunr==-2) {
activate_databrowse((ID*)settings->imapaint.brush, ID_BR, 0, B_SIMABRUSHBROWSE, &sima->menunr, do_global_buttons);
break;
}
else if(sima->menunr < 0) break;
if(brush_set_nr(&settings->imapaint.brush, sima->menunr)) {
BIF_undo_push("Browse Brush");
allqueue(REDRAWBUTSEDIT, 0);
allqueue(REDRAWIMAGE, 0);
}
break;
case B_SIMABRUSHDELETE:
if(brush_delete(&settings->imapaint.brush)) {
BIF_undo_push("Unlink Brush");
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWBUTSEDIT, 0);
}
break;
case B_KEEPDATA:
brush_toggled_fake_user(settings->imapaint.brush);
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWBUTSEDIT, 0);
break;
case B_SIMABRUSHLOCAL:
if(settings->imapaint.brush && settings->imapaint.brush->id.lib) {
if(okee("Make local")) {
make_local_brush(settings->imapaint.brush);
allqueue(REDRAWIMAGE, 0);
allqueue(REDRAWBUTSEDIT, 0);
}
}
break;
case B_SIMABTEXBROWSE:
if(settings->imapaint.brush) {
Brush *brush= settings->imapaint.brush;
if(sima->menunr==-2) {
MTex *mtex= brush->mtex[brush->texact];
ID *id= (ID*)((mtex)? mtex->tex: NULL);
if(G.qual & LR_CTRLKEY) {
activate_databrowse_imasel(id, ID_TE, 0, B_SIMABTEXBROWSE, &sima->menunr, do_image_buttons);
} else {
activate_databrowse(id, ID_TE, 0, B_SIMABTEXBROWSE, &sima->menunr, do_image_buttons);
}
break;
}
else if(sima->menunr < 0) break;
if(brush_texture_set_nr(brush, sima->menunr)) {
BIF_undo_push("Browse Brush Texture");
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWBUTSEDIT, 0);
allqueue(REDRAWIMAGE, 0);
}
}
break;
case B_SIMABTEXDELETE:
if(settings->imapaint.brush) {
if (brush_texture_delete(settings->imapaint.brush)) {
BIF_undo_push("Unlink Brush Texture");
allqueue(REDRAWBUTSSHADING, 0);
allqueue(REDRAWBUTSEDIT, 0);
allqueue(REDRAWIMAGE, 0);
}
}
break;
case B_SIMA_PLAY:
play_anim(0);
break;
case B_SIMA_RECORD:
imagespace_composite_flipbook(curarea);
break;
}
}
#endif
/********************** toolbox operator *********************/
static int toolbox_invoke(bContext *C, wmOperator *op, wmEvent *event)

@ -489,36 +489,12 @@ static void image_buttons_area_listener(ARegion *ar, wmNotifier *wmn)
/* add handlers, stuff you only do once or on area/region changes */
static void image_header_area_init(wmWindowManager *wm, ARegion *ar)
{
#if 0
UI_view2d_region_reinit(&ar->v2d, V2D_COMMONVIEW_HEADER, ar->winx, ar->winy);
#else
ED_region_header_init(ar);
#endif
}
static void image_header_area_draw(const bContext *C, ARegion *ar)
{
ED_region_header(C, ar);
#if 0
float col[3];
/* clear */
if(ED_screen_area_active(C))
UI_GetThemeColor3fv(TH_HEADER, col);
else
UI_GetThemeColor3fv(TH_HEADERDESEL, col);
glClearColor(col[0], col[1], col[2], 0.0);
glClear(GL_COLOR_BUFFER_BIT);
/* set view2d view matrix for scrolling (without scrollers) */
UI_view2d_view_ortho(C, &ar->v2d);
image_header_buttons(C, ar);
/* restore view matrix? */
UI_view2d_view_restore(C);
#endif
}
/**************************** spacetype *****************************/

@ -332,66 +332,3 @@ void FILE_OT_find_missing_files(wmOperatorType *ot)
/* properties */
WM_operator_properties_filesel(ot, 0, FILE_SPECIAL);
}
#if 0
static void info_filemenu(bContext *C, uiLayout *layout, void *arg_unused)
{
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
uiItemO(layout, NULL, 0, "WM_OT_read_homefile");
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
uiItemO(layout, NULL, 0, "WM_OT_open_mainfile");
// uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open Recent",0, yco-=20, 120, 19, "");
// uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Recover Last Session", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, "");
uiItemS(layout);
uiLayoutSetOperatorContext(layout, WM_OP_EXEC_AREA);
uiItemO(layout, NULL, 0, "WM_OT_save_mainfile");
uiLayoutSetOperatorContext(layout, WM_OP_INVOKE_AREA);
uiItemO(layout, NULL, 0, "WM_OT_save_as_mainfile");
#if 0
if(U.flag & USER_FILECOMPRESS) {
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
} else {
uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Compress File", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 35, "Enable file compression");
}
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Rendered Image...|F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 6, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot Subwindow|Ctrl F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 24, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Screenshot All|Ctrl Shift F3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
#if GAMEBLENDER == 1
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Game As Runtime...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 22, "");
#endif
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Save Default Settings|Ctrl U", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 31, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Load Factory Settings", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 32, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link|Shift F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Append or Link (Image Browser)|Ctrl F1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 7, "");
// uiDefIconTextBlockBut(block, info_file_importmenu, NULL, ICON_RIGHTARROW_THIN, "Import", 0, yco-=20, menuwidth, 19, "");
// uiDefIconTextBlockBut(block, info_file_exportmenu, NULL, ICON_RIGHTARROW_THIN, "Export", 0, yco-=20, menuwidth, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBlockBut(block, info_externalfiles, NULL, ICON_RIGHTARROW_THIN, "External Data",0, yco-=20, 120, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Quit Blender|Ctrl Q", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, "");
uiBlockSetDirection(block, UI_DOWN);
uiTextBoundsBlock(block, 80);
uiEndBlock(C, block);
return block;
#endif
}
#endif

@ -1228,47 +1228,6 @@ void ED_init_node_butfuncs(void)
/* ************** Generic drawing ************** */
#if 0
void node_rename_but(char *s)
{
uiBlock *block;
ListBase listb={0, 0};
int dy, x1, y1, sizex=80, sizey=30;
short pivot[2], mval[2], ret=0;
getmouseco_sc(mval);
pivot[0]= CLAMPIS(mval[0], (sizex+10), G.curscreen->sizex-30);
pivot[1]= CLAMPIS(mval[1], (sizey/2)+10, G.curscreen->sizey-(sizey/2)-10);
if (pivot[0]!=mval[0] || pivot[1]!=mval[1])
warp_pointer(pivot[0], pivot[1]);
mywinset(G.curscreen->mainwin);
x1= pivot[0]-sizex+10;
y1= pivot[1]-sizey/2;
dy= sizey/2;
block= uiNewBlock(&listb, "button", UI_EMBOSS, UI_HELV, G.curscreen->mainwin);
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_NUMSELECT|UI_BLOCK_ENTER_OK);
/* buttons have 0 as return event, to prevent menu to close on hotkeys */
uiBlockBeginAlign(block);
uiDefBut(block, TEX, B_NOP, "Name: ", (short)(x1),(short)(y1+dy), 150, 19, s, 0.0, 19.0, 0, 0, "Node user name");
uiBlockEndAlign(block);
uiDefBut(block, BUT, 32767, "OK", (short)(x1+150), (short)(y1+dy), 29, 19, NULL, 0, 0, 0, 0, "");
uiBoundsBlock(block, 2);
ret= uiDoBlocks(&listb, 0, 0);
}
#endif
void draw_nodespace_back_pix(ARegion *ar, SpaceNode *snode, int color_manage)
{

@ -1142,31 +1142,6 @@ void NODE_OT_resize(wmOperatorType *ot)
#if 0
/* ******************** rename ******************* */
/* should go through RNA */
void node_rename(SpaceNode *snode)
{
bNode *node, *rename_node;
short found_node= 0;
/* check if a node is selected */
for(node= snode->edittree->nodes.first; node; node= node->next) {
if(node->flag & SELECT) {
found_node= 1;
break;
}
}
if(found_node) {
rename_node= nodeGetActive(snode->edittree);
node_rename_but((char *)rename_node->name);
// allqueue(REDRAWNODE, 1);
}
}
/* ********************** select ******************** */
/* used in buttons to check context, also checks for edited groups */
@ -2185,38 +2160,4 @@ void NODE_OT_show_cyclic_dependencies(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
#if 0
/* ******************** main event loop ****************** */
void winqreadnodespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
{
if(val) {
switch(event) {
case CKEY: /* sort again, showing cyclics */
ntreeSolveOrder(snode->edittree);
doredraw= 1;
break;
case EKEY:
// XXX snode_handle_recalc(snode);
break;
case RKEY:
if(G.qual==LR_CTRLKEY) {
node_rename(snode);
}
else if(G.qual==LR_SHIFTKEY) {
if(okee("Read saved Full Sample Layers"))
node_read_fullsamplelayers(snode);
}
else {
if(okee("Read saved Render Layers"))
node_read_renderlayers(snode);
}
break;
}
}
}
#endif

@ -87,76 +87,6 @@
/* ************************ header area region *********************** */
#ifndef DISABLE_PYTHON
#if 0
static void do_text_template_scriptsmenu(bContext *C, void *arg, int event)
{
// XXX BPY_menu_do_python(PYMENU_SCRIPTTEMPLATE, event);
}
static uiBlock *text_template_scriptsmenu(bContext *C, void *args_unused)
{
ARegion *ar= CTX_wm_region(C);
uiBlock *block;
// XXX BPyMenu *pym;
// int i= 0;
// short yco = 20, menuwidth = 120;
block= uiBeginBlock(C, ar, "text_template_scriptsmenu", UI_EMBOSSP);
uiBlockSetButmFunc(block, do_text_template_scriptsmenu, NULL);
/* note that we acount for the N previous entries with i+20: */
/* XXX for (pym = BPyMenuTable[PYMENU_SCRIPTTEMPLATE]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
NULL, 0.0, 0.0, 1, i,
pym->tooltip?pym->tooltip:pym->filename);
}*/
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
uiEndBlock(C, block);
uiDrawBlock(C, block);
return block;
}
static void do_text_plugin_scriptsmenu(bContext *C, void *arg, int event)
{
// XXX BPY_menu_do_python(PYMENU_TEXTPLUGIN, event);
}
static uiBlock *text_plugin_scriptsmenu(bContext *C, void *args_unused)
{
ARegion *ar= CTX_wm_region(C);
uiBlock *block;
// XXX BPyMenu *pym;
// int i= 0;
// short yco = 20, menuwidth = 120;
block= uiBeginBlock(C, ar, "text_plugin_scriptsmenu", UI_EMBOSSP);
uiBlockSetButmFunc(block, do_text_plugin_scriptsmenu, NULL);
/* note that we acount for the N previous entries with i+20: */
/* XXX for (pym = BPyMenuTable[PYMENU_TEXTPLUGIN]; pym; pym = pym->next, i++) {
uiDefIconTextBut(block, BUTM, 1, ICON_PYTHON, pym->name, 0, yco-=20, menuwidth, 19,
NULL, 0.0, 0.0, 1, i,
pym->tooltip?pym->tooltip:pym->filename);
}*/
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
uiEndBlock(C, block);
uiDrawBlock(C, block);
return block;
}
#endif
#endif
/************************** properties ******************************/
ARegion *text_has_properties_region(ScrArea *sa)

@ -477,27 +477,6 @@ static void v3d_editvertex_buts(const bContext *C, uiLayout *layout, View3D *v3d
}
}
#if 0
/* assumes armature active */
static void validate_bonebutton_cb(bContext *C, void *bonev, void *namev)
{
Object *ob= CTX_data_active_object(C);
if(ob && ob->type==OB_ARMATURE) {
Bone *bone= bonev;
char oldname[32], newname[32];
/* need to be on the stack */
BLI_strncpy(newname, bone->name, 32);
BLI_strncpy(oldname, (char *)namev, 32);
/* restore */
BLI_strncpy(bone->name, oldname, 32);
ED_armature_bone_rename(ob->data, oldname, newname); // editarmature.c
}
}
#endif
static void v3d_transform_butsR(uiLayout *layout, PointerRNA *ptr)
{
uiLayout *split, *colsub;
@ -934,92 +913,6 @@ void selectTransformOrientation_func(bContext *C, void *target, void *unused)
BIF_selectTransformOrientation(C, (TransformOrientation *) target);
}
#if 0 // XXX not used
static void view3d_panel_transform_spaces(const bContext *C, Panel *pa)
{
Scene *scene= CTX_data_scene(C);
Object *obedit= CTX_data_edit_object(C);
View3D *v3d= CTX_wm_view3d(C);
ListBase *transform_spaces = &scene->transform_spaces;
TransformOrientation *ts = transform_spaces->first;
uiBlock *block;
uiBut *but;
int xco = 20, yco = 70;
int index;
block= uiLayoutAbsoluteBlock(pa->layout);
uiBlockBeginAlign(block);
if (obedit)
uiDefBut(block, BUT, B_TRANSFORMSPACEADD, "Add", xco,120,80,20, 0, 0, 0, 0, 0, "Add the selected element as a Transform Orientation");
else
uiDefBut(block, BUT, B_TRANSFORMSPACEADD, "Add", xco,120,80,20, 0, 0, 0, 0, 0, "Add the active object as a Transform Orientation");
uiDefBut(block, BUT, B_TRANSFORMSPACECLEAR, "Clear", xco + 80,120,80,20, 0, 0, 0, 0, 0, "Removal all Transform Orientations");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButS(block, ROW, B_REDR, "Global", xco, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_GLOBAL,0, 0, "Global Transform Orientation");
uiDefButS(block, ROW, B_REDR, "Local", xco + 40, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_LOCAL, 0, 0, "Local Transform Orientation");
uiDefButS(block, ROW, B_REDR, "Normal", xco + 80, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_NORMAL,0, 0, "Normal Transform Orientation");
uiDefButS(block, ROW, B_REDR, "View", xco + 120, 90, 40,20, &v3d->twmode, 5.0, (float)V3D_MANIP_VIEW, 0, 0, "View Transform Orientation");
for (index = V3D_MANIP_CUSTOM, ts = transform_spaces->first ; ts ; ts = ts->next, index++) {
if (v3d->twmode == index) {
but = uiDefIconButS(block,ROW, B_REDR, ICON_CHECKBOX_HLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation");
}
else {
but = uiDefIconButS(block,ROW, B_REDR, ICON_CHECKBOX_DEHLT, xco,yco,XIC,YIC, &v3d->twmode, 5.0, (float)index, 0, 0, "Use this Custom Transform Orientation");
}
uiButSetFunc(but, selectTransformOrientation_func, ts, NULL);
uiDefBut(block, TEX, 0, "", xco+=XIC, yco,100+XIC,20, &ts->name, 0, 30, 0, 0, "Edits the name of this Transform Orientation");
but = uiDefIconBut(block, BUT, B_REDR, ICON_X, xco+=100+XIC,yco,XIC,YIC, 0, 0, 0, 0, 0, "Deletes this Transform Orientation");
uiButSetFunc(but, removeTransformOrientation_func, ts, NULL);
xco = 20;
yco -= 25;
}
uiBlockEndAlign(block);
}
#endif // XXX not used
#if 0
static void brush_idpoin_handle(bContext *C, ID *id, int event)
{
Brush **br = current_brush_source(CTX_data_scene(C));
if(!br)
return;
switch(event) {
case UI_ID_BROWSE:
(*br) = (Brush*)id;
break;
case UI_ID_DELETE:
brush_delete(br);
break;
case UI_ID_RENAME:
/* XXX ? */
break;
case UI_ID_ADD_NEW:
if(id) {
(*br) = copy_brush((Brush*)id);
id->us--;
}
else
(*br) = add_brush("Brush");
break;
case UI_ID_OPEN:
/* XXX not implemented */
break;
}
}
#endif
static void view3d_panel_object(const bContext *C, Panel *pa)
{
uiBlock *block;