Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatt Ebb <matt@mke3.net>2006-06-01 13:03:43 +0400
committerMatt Ebb <matt@mke3.net>2006-06-01 13:03:43 +0400
commit46927c0a572288d182d2c106be0c5443157d8adc (patch)
treec5aa4547d2bc37067afa78139fb2b34ef92d9325
parentfd79bd260820225ea46dde6e2bb2206482ee172b (diff)
* Whoops, committed something I shouldn't have in the last one. Reverting.
* Added 'Make Local' to the menus. Also a minor capitalisation tweak.
-rw-r--r--source/blender/include/BDR_editobject.h3
-rw-r--r--source/blender/src/buttons_scene.c11
-rw-r--r--source/blender/src/editobject.c24
-rw-r--r--source/blender/src/header_info.c2
-rw-r--r--source/blender/src/header_view3d.c31
-rw-r--r--source/blender/src/space.c2
-rw-r--r--source/blender/src/toets.c2
7 files changed, 56 insertions, 19 deletions
diff --git a/source/blender/include/BDR_editobject.h b/source/blender/include/BDR_editobject.h
index a3f2a1061f1..af965117653 100644
--- a/source/blender/include/BDR_editobject.h
+++ b/source/blender/include/BDR_editobject.h
@@ -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);
diff --git a/source/blender/src/buttons_scene.c b/source/blender/src/buttons_scene.c
index 536a83154bd..236e0a55f3f 100644
--- a/source/blender/src/buttons_scene.c
+++ b/source/blender/src/buttons_scene.c
@@ -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");
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 47fcd74b1a7..fe53c870c49 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -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);
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index 441a306f0ba..d97e3a539a2 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -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, "");
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c
index c56a9eedfef..7e610ebf15f 100644
--- a/source/blender/src/header_view3d.c
+++ b/source/blender/src/header_view3d.c
@@ -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, "");
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index 6be21795b42..9ae3d546dcd 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -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)
diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c
index f6e49340656..9b46d9c5f43 100644
--- a/source/blender/src/toets.c
+++ b/source/blender/src/toets.c
@@ -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);