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:
authorJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
committerJiri Hnidek <jiri.hnidek@tul.cz>2006-08-20 19:22:56 +0400
commit2ee42ac01e6f4b154ac68976024af0615f7acb26 (patch)
tree9a2400a99bf7880a2f146c7a89bd2d8c0108374c /source/blender/src/header_info.c
parentffe630b452f4abb28c105fca2b8eb9fdb6e72370 (diff)
Huge commit: VERSE
- All code is in #ifdef ... #endif - Only make build system is supported and you have to add: export WITH_VERSE=true to user-def.mk file - Blender can share only mesh objects and bitmaps now - More informations can be found at wiki: http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlender http://mediawiki.blender.org/index.php/BlenderDev/VerseIntegrationToBlenderUserDoc I hope, that I didn't forget at anything
Diffstat (limited to 'source/blender/src/header_info.c')
-rw-r--r--source/blender/src/header_info.c87
1 files changed, 87 insertions, 0 deletions
diff --git a/source/blender/src/header_info.c b/source/blender/src/header_info.c
index 55a4ad49d93..bfbd9d1b265 100644
--- a/source/blender/src/header_info.c
+++ b/source/blender/src/header_info.c
@@ -79,6 +79,10 @@
#include "BIF_writeimage.h"
#include "BIF_drawscene.h"
+#ifdef WITH_VERSE
+#include "BIF_verse.h"
+#endif
+
#include "BKE_blender.h"
#include "BKE_depsgraph.h"
#include "BKE_exotic.h"
@@ -91,6 +95,10 @@
#include "BKE_scene.h"
#include "BKE_world.h"
+#ifdef WITH_VERSE
+#include "BKE_verse.h"
+#endif
+
#include "BLI_arithb.h"
#include "BLI_blenlib.h"
#include "BLO_writefile.h"
@@ -720,6 +728,82 @@ static uiBlock *info_file_exportmenu(void *arg_unused)
return block;
}
+#ifdef WITH_VERSE
+
+extern ListBase session_list;
+
+static void do_verse_filemenu(void *arg, int event)
+{
+ char address[64]; /* lenght of domain name is 63 characters or less */
+ VerseSession *session = NULL;
+ ScrArea *sa;
+
+ if(curarea->spacetype==SPACE_INFO) {
+ sa= closest_bigger_area();
+ areawinset(sa->win);
+ }
+
+ switch(event) {
+ case 0:
+ waitcursor(1);
+ printf("Connecting to localhost!\n");
+ b_verse_connect("localhost");
+ waitcursor(0);
+ break;
+ case 1:
+ address[0] = '\0';
+ if(sbutton(address, 0, 63, "Server:")) {
+ waitcursor(1);
+ printf("Connecting to %s\n", address);
+ b_verse_connect(address);
+ waitcursor(0);
+ }
+ break;
+ case 2:
+ session = session_menu();
+ if(session) {
+ printf("Disconnecting session: %s!\n", session->address);
+ end_verse_session(session, 1);
+ }
+ break;
+ case 3:
+ printf("Disconnecting all sessions!\n");
+ end_all_verse_sessions();
+ break;
+ }
+}
+
+static uiBlock *verse_filemenu(void *unusedargs)
+{
+ uiBlock *block;
+ short yco = 20, menuwidth = 120;
+
+ block= uiNewBlock(&curarea->uiblocks, "verse_filemenu", UI_EMBOSSP, UI_HELV, G.curscreen->mainwin);
+ uiBlockSetButmFunc(block, do_verse_filemenu, NULL);
+
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Connect to localhost", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 0, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Connect ...", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 1, "");
+ if(session_list.first != NULL) {
+ if(session_list.first != session_list.last) {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Disconnect ...",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 2, "");
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Disconnect all",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ }
+ else {
+ uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Disconnect",
+ 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 3, "");
+ }
+
+ }
+
+ uiBlockSetDirection(block, UI_RIGHT);
+ uiTextBoundsBlock(block, 60);
+
+ return block;
+}
+#endif
+
static void do_info_filemenu(void *arg, int event)
{
ScrArea *sa;
@@ -871,6 +955,9 @@ 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, "");
+#ifdef WITH_VERSE
+ uiDefIconTextBlockBut(block, verse_filemenu, NULL, ICON_RIGHTARROW_THIN, "Verse", 0, yco-=20, menuwidth, 19, "");
+#endif
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, "");