[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38365] branches/soc-2011-tomato: Merging r38343 through r38363 from trunk into soc-2011-tomato

Sergey Sharybin g.ulairi at gmail.com
Wed Jul 13 18:53:54 CEST 2011


Revision: 38365
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38365
Author:   nazgul
Date:     2011-07-13 16:53:54 +0000 (Wed, 13 Jul 2011)
Log Message:
-----------
Merging r38343 through r38363 from trunk into soc-2011-tomato

Revision Links:
--------------
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38343
    http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38363

Modified Paths:
--------------
    branches/soc-2011-tomato/CMakeLists.txt
    branches/soc-2011-tomato/doc/python_api/examples/bge.texture.py
    branches/soc-2011-tomato/intern/ghost/CMakeLists.txt
    branches/soc-2011-tomato/intern/ghost/SConscript
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_Debug.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_EventPrinter.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_EventPrinter.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_ISystem.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_NDOFManager.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemSDL.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowSDL.h
    branches/soc-2011-tomato/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/soc-2011-tomato/release/scripts/startup/bl_ui/space_node.py
    branches/soc-2011-tomato/source/blender/editors/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/editors/datafiles/CMakeLists.txt
    branches/soc-2011-tomato/source/blender/editors/space_node/node_draw.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_intern.h
    branches/soc-2011-tomato/source/blender/editors/space_node/node_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_view3d/view3d_buttons.c
    branches/soc-2011-tomato/source/blender/nodes/intern/CMP_nodes/CMP_blur.c
    branches/soc-2011-tomato/source/blender/nodes/intern/CMP_util.c

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemSDL.h
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowSDL.cpp
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_WindowSDL.h


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36831-38342
   + /trunk/blender:36831-38363

Modified: branches/soc-2011-tomato/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/CMakeLists.txt	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/CMakeLists.txt	2011-07-13 16:53:54 UTC (rev 38365)
@@ -90,6 +90,9 @@
 get_blender_version()
 
 # Blender internal features
+option(WITH_BLENDER "Build blender (disable to build only the blender player)" ON)
+mark_as_advanced(WITH_BLENDER)
+
 option(WITH_INTERNATIONAL "Enable I18N (International fonts and text)" ON)
 
 option(WITH_PYTHON        "Enable Embedded Python API  (only disable for development)" ON)
@@ -106,15 +109,21 @@
 option(WITH_GAMEENGINE    "Enable Game Engine" ON)
 option(WITH_PLAYER        "Build Player" OFF)
 
-option(WITH_AUDASPACE    "Build with blenders audio library" ON)
-mark_as_advanced(WITH_AUDASPACE)
+# GHOST Windowing Library Options
+option(WITH_GHOST_DEBUG   "Enable debugging output for the GHOST library" OFF)
+mark_as_advanced(WITH_GHOST_DEBUG)
 
-option(WITH_SDL_GHOST    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
-mark_as_advanced(WITH_SDL_GHOST)
+option(WITH_GHOST_SDL    "Enable building blender against SDL for windowing rather then the native APIs" OFF)
+mark_as_advanced(WITH_GHOST_SDL)
 
+# Misc...
 option(WITH_HEADLESS      "Build without graphical support (renderfarm, server mode only)" OFF)
 mark_as_advanced(WITH_HEADLESS)
 
+option(WITH_AUDASPACE    "Build with blenders audio library (only disable if you know what you're doing!)" ON)
+mark_as_advanced(WITH_AUDASPACE)
+
+
 # (unix defaults to OpenMP On)
 if(UNIX AND NOT APPLE)
 	option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" ON)
@@ -207,6 +216,10 @@
 #-----------------------------------------------------------------------------
 # Check for conflicting/unsupported configurations
 
+if(NOT WITH_BLENDER AND NOT WITH_PLAYER)
+	message(FATAL_ERROR "At least one of WITH_BLENDER or WITH_PLAYER must be enabled, nothing to do!")
+endif()
+
 if(NOT WITH_GAMEENGINE AND WITH_PLAYER)
 	message(FATAL_ERROR "WITH_PLAYER requires WITH_GAMEENGINE")
 endif()
@@ -215,8 +228,8 @@
 	message(FATAL_ERROR "WITH_OPENAL/WITH_SDL/WITH_JACK/WITH_CODEC_FFMPEG require WITH_AUDASPACE")
 endif()
 
-if(NOT WITH_SDL AND WITH_SDL_GHOST)
-	message(FATAL_ERROR "WITH_SDL_GHOST requires WITH_SDL to be ON")
+if(NOT WITH_SDL AND WITH_GHOST_SDL)
+	message(FATAL_ERROR "WITH_GHOST_SDL requires WITH_SDL to be ON")
 endif()
 
 if(NOT WITH_IMAGE_OPENJPEG AND WITH_IMAGE_REDCODE)
@@ -443,7 +456,7 @@
 	# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
 	set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
-	if((NOT WITH_HEADLESS) AND (NOT WITH_SDL_GHOST))
+	if((NOT WITH_HEADLESS) AND (NOT WITH_GHOST_SDL))
 		find_package(X11 REQUIRED)
 		find_path(X11_XF86keysym_INCLUDE_PATH X11/XF86keysym.h ${X11_INC_SEARCH_PATH})
 		mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
@@ -1220,7 +1233,9 @@
 
 #-----------------------------------------------------------------------------
 # Blender Application
-add_subdirectory(source/creator)
+if(WITH_BLENDER)
+	add_subdirectory(source/creator)
+endif()
 
 
 #-----------------------------------------------------------------------------

Modified: branches/soc-2011-tomato/doc/python_api/examples/bge.texture.py
===================================================================
--- branches/soc-2011-tomato/doc/python_api/examples/bge.texture.py	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/doc/python_api/examples/bge.texture.py	2011-07-13 16:53:54 UTC (rev 38365)
@@ -29,4 +29,4 @@
     logic.video.source.play()
 
 # you need to call this function every frame to ensure update of the texture.
-logic.video.refresh(True)
\ No newline at end of file
+logic.video.refresh(True)

Modified: branches/soc-2011-tomato/intern/ghost/CMakeLists.txt
===================================================================
--- branches/soc-2011-tomato/intern/ghost/CMakeLists.txt	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/CMakeLists.txt	2011-07-13 16:53:54 UTC (rev 38365)
@@ -42,7 +42,6 @@
 	intern/GHOST_Path-api.cpp
 	intern/GHOST_DisplayManager.cpp
 	intern/GHOST_EventManager.cpp
-	intern/GHOST_EventPrinter.cpp
 	intern/GHOST_ISystem.cpp
 	intern/GHOST_ISystemPaths.cpp
 	intern/GHOST_ModifierKeys.cpp
@@ -75,7 +74,6 @@
 	intern/GHOST_EventKey.h
 	intern/GHOST_EventManager.h
 	intern/GHOST_EventNDOF.h
-	intern/GHOST_EventPrinter.h
 	intern/GHOST_EventString.h
 	intern/GHOST_EventTrackpad.h
 	intern/GHOST_EventWheel.h
@@ -89,7 +87,17 @@
 	intern/GHOST_WindowManager.h
 )
 
-if(WITH_HEADLESS OR WITH_SDL_GHOST)
+if(WITH_GHOST_DEBUG)
+	list(APPEND SRC
+		intern/GHOST_EventPrinter.cpp
+
+		intern/GHOST_EventPrinter.h
+	)
+	add_definitions(-DWITH_GHOST_DEBUG)
+endif()
+
+
+if(WITH_HEADLESS OR WITH_GHOST_SDL)
 	if(WITH_HEADLESS)
 		list(APPEND SRC
 			intern/GHOST_DisplayManagerNULL.h
@@ -107,7 +115,7 @@
 			intern/GHOST_SystemSDL.h
 			intern/GHOST_WindowSDL.h
 		)
-		add_definitions(-DWITH_SDL_GHOST)
+		add_definitions(-DWITH_GHOST_SDL)
 	endif()
 
 

Modified: branches/soc-2011-tomato/intern/ghost/SConscript
===================================================================
--- branches/soc-2011-tomato/intern/ghost/SConscript	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/SConscript	2011-07-13 16:53:54 UTC (rev 38365)
@@ -25,6 +25,7 @@
         except ValueError:
             pass
     incs += ' ' + env['BF_SDL_INC']
+    defs += ['WITH_GHOST_SDL']
 elif window_system in ('linux2', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'irix6', 'aix4', 'aix5'):
     for f in pf:
         try:
@@ -73,7 +74,9 @@
     Exit()
 
 if env['BF_GHOST_DEBUG']:
-    defs.append('BF_GHOST_DEBUG')
+    defs.append('WITH_GHOST_DEBUG')
+else:
+	sources.remove('intern' + os.sep + 'GHOST_EventPrinter.cpp')
 
 if window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     incs = env['BF_WINTAB_INC'] + ' ' + incs

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_Debug.h
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_Debug.h	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_Debug.h	2011-07-13 16:53:54 UTC (rev 38365)
@@ -41,9 +41,9 @@
 	#endif // DEBUG
 #endif // WIN32
 
-#ifdef BF_GHOST_DEBUG 
+#ifdef WITH_GHOST_DEBUG 
 	#define GHOST_DEBUG // spit ghost events to stdout
-#endif // BF_GHOST_DEBUG 
+#endif // WITH_GHOST_DEBUG 
 
 #ifdef GHOST_DEBUG
 	#include <iostream>

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp	2011-07-13 16:53:54 UTC (rev 38365)
@@ -1,5 +1,5 @@
 /*
- * $Id:
+ * $Id$
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or


Property changes on: branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h	2011-07-13 16:53:54 UTC (rev 38365)
@@ -1,5 +1,5 @@
 /*
- * $Id: GHOST_DisplayManagerSDL.h 37194 2011-06-05 00:10:20Z gsrb3d $
+ * $Id$
  * ***** BEGIN GPL LICENSE BLOCK *****
  *
  * This program is free software; you can redistribute it and/or
@@ -35,6 +35,10 @@
 	#include "SDL.h"
 }
 
+#if !SDL_VERSION_ATLEAST(1, 3, 0)
+#  error "SDL 1.3 or newer is needed to build with Ghost"
+#endif
+
 class GHOST_SystemSDL;
 
 class GHOST_DisplayManagerSDL : public GHOST_DisplayManager


Property changes on: branches/soc-2011-tomato/intern/ghost/intern/GHOST_DisplayManagerSDL.h
___________________________________________________________________
Added: svn:keywords
   + Author Date Id Revision
Added: svn:eol-style
   + native

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_EventPrinter.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_EventPrinter.cpp	2011-07-13 16:53:36 UTC (rev 38364)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_EventPrinter.cpp	2011-07-13 16:53:54 UTC (rev 38365)
@@ -37,6 +37,7 @@
 #include "GHOST_EventDragnDrop.h"
 #include "GHOST_Debug.h"
 
+#include <stdio.h>
 
 bool GHOST_EventPrinter::processEvent(GHOST_IEvent* event)
 {
@@ -82,17 +83,17 @@
 	case GHOST_kEventKeyUp:
 		{
 		GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
-		STR_String str;
+		char str[32]= {'\0'};
 		getKeyString(keyData->key, str);
-		std::cout << "GHOST_kEventKeyUp, key: " << str.Ptr();
+		std::cout << "GHOST_kEventKeyUp, key: " << str;
 		}
 		break;
 	case GHOST_kEventKeyDown:
 		{
 		GHOST_TEventKeyData* keyData = (GHOST_TEventKeyData*)((GHOST_IEvent*)event)->getData();
-		STR_String str;
+		char str[32]= {'\0'};
 		getKeyString(keyData->key, str);
-		std::cout << "GHOST_kEventKeyDown, key: " << str.Ptr();
+		std::cout << "GHOST_kEventKeyDown, key: " << str;
 		}
 		break;
 			
@@ -183,165 +184,161 @@
 }
 
 
-void GHOST_EventPrinter::getKeyString(GHOST_TKey key, STR_String& str) const
+void GHOST_EventPrinter::getKeyString(GHOST_TKey key, char str[32]) const
 {
 	if ((key >= GHOST_kKeyComma) && (key <= GHOST_kKeyRightBracket)) {
-		str = ((char)key);
+		sprintf(str, "%c", (char)key);
 	} else if ((key >= GHOST_kKeyNumpad0) && (key <= GHOST_kKeyNumpad9)) {
-		int number = key - GHOST_kKeyNumpad0;
-		STR_String numberStr (number);
-		str = "Numpad";
-		str += numberStr;
+		sprintf(str, "Numpad %d", (key - GHOST_kKeyNumpad0));

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list