* Whoops, committed something I shouldn't have in the last one. Reverting.

* Added 'Make Local' to the menus. Also a minor capitalisation tweak.
This commit is contained in:
2006-06-01 09:03:43 +00:00
parent fd79bd2608
commit 46927c0a57
7 changed files with 56 additions and 19 deletions

View File

@@ -91,7 +91,8 @@ void do_single_tex_user(struct Tex **from);
void single_tex_users_expand(void);
void single_mat_users_expand(void);
void single_user(void);
void make_local(void);
void make_local_menu(void);
void make_local(int mode);
void adduplicate(int mode, int dupflag); /* when the dupflag is 0 no data is duplicated */
void selectlinks_menu(void);
void selectlinks(int nr);

View File

@@ -1271,21 +1271,12 @@ static void render_panel_render(void)
uiDefButBitI(block, TOG, R_RADIO, 0,"Radio", 647,142,40,29, &G.scene->r.mode, 0, 0, 0, 0, "Enable radiosity rendering");
uiBlockEndAlign(block);
/* uiBlockBeginAlign(block);
uiBlockBeginAlign(block);
uiDefButS(block, ROW,B_DIFF,"100%", 565,109,122,20,&G.scene->r.size,1.0,100.0, 0, 0, "Set render size to defined size");
uiDefButS(block, ROW,B_DIFF,"75%", 565,88,40,20,&G.scene->r.size,1.0,75.0, 0, 0, "Set render size to 3/4 of defined size");
uiDefButS(block, ROW,B_DIFF,"50%", 606,88,40,20,&G.scene->r.size,1.0,50.0, 0, 0, "Set render size to 1/2 of defined size");
uiDefButS(block, ROW,B_DIFF,"25%", 647,88,40,20,&G.scene->r.size,1.0,25.0, 0, 0, "Set render size to 1/4 of defined size");
uiBlockEndAlign(block);
*/
uiBlockBeginAlign(block);
uiDefButS(block, NUM,B_DIFF,"Size %:",
565, 109, 102, 20,
&G.scene->r.size, 1.0, 400.0, 0, 0, "The image width in pixels");
uiDefButS(block, MENU,B_REDR,"400% %x400|200% %x200|150% %x150|100% %x100|75% %x75|50% %x50|25% %x25",
667, 109, 20, 20,
&G.scene->r.size, 0, 0, 0, 0, "The image width in pixels");
uiBlockEndAlign(block);
uiBlockBeginAlign(block);
uiDefButBitI(block, TOG, R_FIELDS, 0,"Fields", 565,55,60,20,&G.scene->r.mode, 0, 0, 0, 0, "Enables field rendering");

View File

@@ -4136,7 +4136,24 @@ static void make_local_makelocalmaterial(Material *ma)
/* nodetree? XXX */
}
void make_local(void)
void make_local_menu(void)
{
int mode;
/* If you modify this menu, please remember to update view3d_edit_object_makelocalmenu
* in header_view3d.c and the menu in toolbox.c
*/
if(G.scene->id.lib) return;
mode = pupmenu("Make Local%t|Selected Objects %x1|Selected Objects and Data %x2|All %x3");
if (mode <= 0) return;
make_local(mode);
}
void make_local(int mode)
{
Base *base;
Object *ob;
@@ -4145,14 +4162,11 @@ void make_local(void)
Lamp *la;
Curve *cu;
ID *id;
int a, b, mode;
int a, b;
/* WATCH: the function new_id(..) re-inserts the id block!!! */
if(G.scene->id.lib) return;
mode= pupmenu("Make Local%t|Selected Objects %x1|Selected Objects and Data %x2|All %x3");
if(mode==3) {
all_local(NULL); // NULL is all libs
allqueue(REDRAWALL, 0);

View File

@@ -871,7 +871,7 @@ static uiBlock *info_filemenu(void *arg_unused)
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, "");
uiDefIconTextBlockBut(block, info_openrecentmenu, NULL, ICON_RIGHTARROW_THIN, "Open recent",0, yco-=20, 120, 19, "");
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, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");

View File

@@ -1692,6 +1692,36 @@ static uiBlock *view3d_edit_object_transformmenu(void *arg_unused)
return block;
}
static void do_view3d_edit_object_makelocalmenu(void *arg, int event)
{
switch(event) {
case 1:
case 2:
case 3:
make_local(event);
break;
}
}
static uiBlock *view3d_edit_object_makelocalmenu(void *arg_unused)
{
Object *ob=NULL;
uiBlock *block;
short yco = 20, menuwidth = 120;
block= uiNewBlock(&curarea->uiblocks, "view3d_edit_object_makelocalmenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
uiBlockSetButmFunc(block, do_view3d_edit_object_makelocalmenu, NULL);
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selected Objects|L, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Selected Objects and Data|L, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "All|L, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
uiBlockSetDirection(block, UI_RIGHT);
uiTextBoundsBlock(block, 60);
return block;
}
static void do_view3d_edit_object_makelinksmenu(void *arg, int event)
{
switch(event) {
@@ -2086,6 +2116,7 @@ static uiBlock *view3d_edit_objectmenu(void *arg_unused)
uiDefIconTextBlockBut(block, view3d_edit_object_makelinksmenu, NULL, ICON_RIGHTARROW_THIN, "Make Links", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_singleusermenu, NULL, ICON_RIGHTARROW_THIN, "Make Single User", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_makelocalmenu, NULL, ICON_RIGHTARROW_THIN, "Make Local", 0, yco-=20, 120, 19, "");
uiDefIconTextBlockBut(block, view3d_edit_object_copyattrmenu, NULL, ICON_RIGHTARROW_THIN, "Copy Attributes", 0, yco-=20, 120, 19, "");
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");

View File

@@ -1554,7 +1554,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
}
else {
if((G.qual==0))
make_local();
make_local_menu();
else if((G.qual==LR_SHIFTKEY))
selectlinks_menu();
else if(G.qual==LR_CTRLKEY)

View File

@@ -358,7 +358,7 @@ char *recent_filelist(void)
int event, i, ofs;
char pup[2048], *p;
p= pup + sprintf(pup, "Open recent%%t");
p= pup + sprintf(pup, "Open Recent%%t");
if (G.sce[0]) {
p+= sprintf(p, "|%s %%x%d", G.sce, 1);