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:
authorRob Haarsma <phaseIV@zonnet.nl>2003-04-28 15:17:21 +0400
committerRob Haarsma <phaseIV@zonnet.nl>2003-04-28 15:17:21 +0400
commit52f6a630ce7e1723e9aceb3fd395349e4098357b (patch)
treea64361cf9b26d2284f62934dc1130882867388e6 /source/blender/src/editoops.c
parent71ffa4775252cb3dfe93011e24fc31ab7360bbb4 (diff)
Added rename/delete popups to the file and imageselect windows.
Redesigned the userpreference window layout. (not finished yet) Enhanced the texteditor with; a rightmousemenu, clipboard text support (for windows !) and the alt-m keystroke generates a 3d text object. (up to 1000 characters) (1, 2, 3, 4 and 7 from http://www.tncci.com/blender/feats.html)
Diffstat (limited to 'source/blender/src/editoops.c')
-rw-r--r--source/blender/src/editoops.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/source/blender/src/editoops.c b/source/blender/src/editoops.c
index bf3f7d995a6..11ca482f7a7 100644
--- a/source/blender/src/editoops.c
+++ b/source/blender/src/editoops.c
@@ -59,6 +59,7 @@
#include "BKE_global.h"
#include "BKE_scene.h"
+#include "BKE_library.h"
#include "BKE_material.h"
#include "BIF_space.h"
@@ -67,6 +68,7 @@
#include "BIF_editview.h"
#include "BIF_drawscene.h"
#include "BIF_mywindow.h"
+#include "BIF_toolbox.h"
#include "BDR_editobject.h"
@@ -75,6 +77,7 @@
#include "blendef.h"
#include "mydevice.h"
+#include "interface.h"
typedef struct TransOops {
@@ -82,6 +85,8 @@ typedef struct TransOops {
float oldloc[2];
} TransOops;
+struct ID *idt;
+
static void oops_to_select_objects(void)
{
@@ -598,3 +603,46 @@ void select_backlinked_oops(void)
oops_to_select_objects(); /* ook redr */
}
+
+
+void clever_numbuts_oops()
+{
+ Oops *oops;
+ Object *ob;
+ ID *id = idt;
+ char str1[10];
+ static char naam[256];
+ static char naam2[256];
+ static short doit;
+ int len;
+
+ if(G.soops->lockpoin) {
+ oops= G.soops->lockpoin;
+ ob = (Object *)oops->id;
+ if(oops->type==ID_LI) strcpy(naam, ((Library *)oops->id)->name);
+ else strcpy(naam, oops->id->name);
+
+ strcpy(naam2, naam+2);
+ str1[0]= oops->id->name[0];
+ str1[1]= oops->id->name[1];
+ str1[2]= ':';
+ str1[3]= 0;
+ if(strcmp(str1, "SC:")==0) strcpy(str1, "SCE:");
+ else if(strcmp(str1, "SR:")==0) strcpy(str1, "SCR:");
+
+// if( GS(id->name)==ID_IP) len= 110;
+// else len= 120;
+ len = 110;
+
+ add_numbut(0, TEX, str1, 0, len, naam2, "Rename Object");
+ if((oops->type==ID_OB || oops->type==ID_ME) && ob->type != OB_EMPTY) {
+ // add_numbut(1, TEX, str1, 0, len, naam2, "Name Object");
+ add_numbut(1, TOG|SHO, "Rename Linked Data", 0, 0, &doit, "Rename corresponding Datablock as well");
+ do_clever_numbuts("Rename Datablock", 2, REDRAW);
+ } else {
+ do_clever_numbuts("Rename Datablock", 1, REDRAW);
+ }
+
+ rename_id((ID *)oops->id, naam2);
+ }
+}