[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [16454] branches/sim_physics: svn merge -r 16411:16453 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Daniel Genrich daniel.genrich at gmx.net
Wed Sep 10 12:53:39 CEST 2008


Revision: 16454
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=16454
Author:   genscher
Date:     2008-09-10 12:53:38 +0200 (Wed, 10 Sep 2008)

Log Message:
-----------
svn merge -r 16411:16453 https://svn.blender.org/svnroot/bf-blender/trunk/blender

Modified Paths:
--------------
    branches/sim_physics/CMakeLists.txt
    branches/sim_physics/intern/ghost/GHOST_ISystem.h
    branches/sim_physics/intern/ghost/GHOST_Types.h
    branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.cpp
    branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.h
    branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.h
    branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.h
    branches/sim_physics/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/sim_physics/intern/ghost/intern/GHOST_WindowX11.h
    branches/sim_physics/source/blender/blenkernel/intern/armature.c
    branches/sim_physics/source/blender/blenkernel/intern/modifier.c
    branches/sim_physics/source/blender/blenkernel/intern/particle_system.c
    branches/sim_physics/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/sim_physics/source/blender/blenlib/BLI_arithb.h
    branches/sim_physics/source/blender/blenlib/intern/arithb.c
    branches/sim_physics/source/blender/include/BIF_meshlaplacian.h
    branches/sim_physics/source/blender/include/blendef.h
    branches/sim_physics/source/blender/nodes/intern/CMP_nodes/CMP_tonemap.c
    branches/sim_physics/source/blender/python/BPY_interface.c
    branches/sim_physics/source/blender/python/api2_2x/Lamp.c
    branches/sim_physics/source/blender/python/api2_2x/MTex.c
    branches/sim_physics/source/blender/python/api2_2x/MTex.h
    branches/sim_physics/source/blender/python/api2_2x/Material.c
    branches/sim_physics/source/blender/python/api2_2x/Particle.c
    branches/sim_physics/source/blender/python/api2_2x/World.c
    branches/sim_physics/source/blender/python/api2_2x/doc/Lamp.py
    branches/sim_physics/source/blender/python/api2_2x/doc/Material.py
    branches/sim_physics/source/blender/python/api2_2x/doc/Texture.py
    branches/sim_physics/source/blender/python/api2_2x/doc/World.py
    branches/sim_physics/source/blender/render/intern/source/convertblender.c
    branches/sim_physics/source/blender/render/intern/source/rendercore.c
    branches/sim_physics/source/blender/render/intern/source/renderdatabase.c
    branches/sim_physics/source/blender/render/intern/source/zbuf.c
    branches/sim_physics/source/blender/src/buttons_editing.c
    branches/sim_physics/source/blender/src/buttons_logic.c
    branches/sim_physics/source/blender/src/buttons_object.c
    branches/sim_physics/source/blender/src/buttons_shading.c
    branches/sim_physics/source/blender/src/drawaction.c
    branches/sim_physics/source/blender/src/drawgpencil.c
    branches/sim_physics/source/blender/src/drawipo.c
    branches/sim_physics/source/blender/src/drawview.c
    branches/sim_physics/source/blender/src/editmesh_loop.c
    branches/sim_physics/source/blender/src/editmesh_tools.c
    branches/sim_physics/source/blender/src/editobject.c
    branches/sim_physics/source/blender/src/editscreen.c
    branches/sim_physics/source/blender/src/gpencil.c
    branches/sim_physics/source/blender/src/header_view3d.c
    branches/sim_physics/source/blender/src/meshlaplacian.c
    branches/sim_physics/source/blender/src/resources.c
    branches/sim_physics/source/blender/src/space.c
    branches/sim_physics/source/blender/src/transform_orientations.c
    branches/sim_physics/source/blender/src/usiblender.c
    branches/sim_physics/source/gameengine/Converter/KX_ConvertSensors.cpp
    branches/sim_physics/source/gameengine/GamePlayer/CMakeLists.txt
    branches/sim_physics/source/gameengine/GamePlayer/ghost/GPG_Application.cpp
    branches/sim_physics/source/gameengine/GamePlayer/ghost/GPG_Application.h
    branches/sim_physics/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/sim_physics/source/gameengine/GamePlayer/netscape/test/resource/test.html
    branches/sim_physics/source/gameengine/Ketsji/KX_GameObject.cpp
    branches/sim_physics/source/gameengine/Ketsji/KX_GameObject.h
    branches/sim_physics/source/gameengine/Ketsji/KX_Light.cpp
    branches/sim_physics/source/gameengine/Physics/Bullet/CcdPhysicsEnvironment.cpp
    branches/sim_physics/source/gameengine/PyDoc/KX_GameObject.py

Added Paths:
-----------
    branches/sim_physics/release/scripts/scripttemplate_gamelogic.py
    branches/sim_physics/release/scripts/scripttemplate_gamelogic_basic.py
    branches/sim_physics/source/gameengine/GamePlayer/xembed/
    branches/sim_physics/source/gameengine/GamePlayer/xembed/CMakeLists.txt
    branches/sim_physics/source/gameengine/GamePlayer/xembed/UnixShell.c
    branches/sim_physics/source/gameengine/GamePlayer/xembed/blender_plugin_types.h
    branches/sim_physics/source/gameengine/GamePlayer/xembed/npunix.c

Removed Paths:
-------------
    branches/sim_physics/source/gameengine/GamePlayer/xembed/CMakeLists.txt
    branches/sim_physics/source/gameengine/GamePlayer/xembed/UnixShell.c
    branches/sim_physics/source/gameengine/GamePlayer/xembed/blender_plugin_types.h
    branches/sim_physics/source/gameengine/GamePlayer/xembed/npunix.c

Modified: branches/sim_physics/CMakeLists.txt
===================================================================
--- branches/sim_physics/CMakeLists.txt	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/CMakeLists.txt	2008-09-10 10:53:38 UTC (rev 16454)
@@ -64,6 +64,7 @@
 OPTION(WITH_FFMPEG		"Enable FFMPeg Support (http://ffmpeg.mplayerhq.hu/)"	OFF)
 OPTION(WITH_OPENAL		"Enable OpenAL Support (http://www.openal.org)"		ON)
 OPTION(WITH_OPENMP		"Enable OpenMP (has to be supported by the compiler)"	OFF)
+OPTION(WITH_WEBPLUGIN		"Enable Web Plugin (Mozilla-Unix only)"			OFF)
 
 IF(NOT WITH_GAMEENGINE AND WITH_PLAYER)
   MESSAGE("WARNING: WITH_PLAYER needs WITH_GAMEENGINE")
@@ -457,6 +458,13 @@
 SUBDIRS(source/creator)
 
 #-----------------------------------------------------------------------------
+# Blender WebPlugin
+IF(WITH_WEBPLUGIN) 
+  SET(MOZILLA_DIR "${CMAKE_SOURCE_DIR}/../gecko-sdk/" CACHE PATH "Gecko SDK path")
+  SET(WITH_PLAYER ON)
+ENDIF(WITH_WEBPLUGIN)
+
+#-----------------------------------------------------------------------------
 # Blender Player
 IF(WITH_PLAYER)
   SUBDIRS(blenderplayer)

Modified: branches/sim_physics/intern/ghost/GHOST_ISystem.h
===================================================================
--- branches/sim_physics/intern/ghost/GHOST_ISystem.h	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/GHOST_ISystem.h	2008-09-10 10:53:38 UTC (rev 16454)
@@ -224,13 +224,15 @@
 	 * @param	state		The state of the window when opened.
 	 * @param	type		The type of drawing context installed in this window.
 	 * @param	stereoVisual	Create a stereo visual for quad buffered stereo.
+	 * @param	parentWindow 	Parent (embedder) window
 	 * @return	The new window (or 0 if creation failed).
 	 */
 	virtual GHOST_IWindow* createWindow(
 		const STR_String& title,
 		GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
 		GHOST_TWindowState state, GHOST_TDrawingContextType type,
-		const bool stereoVisual) = 0;
+		const bool stereoVisual,
+		const GHOST_TEmbedderWindowID parentWindow = 0) = 0;
 
 	/**
 	 * Dispose a window.

Modified: branches/sim_physics/intern/ghost/GHOST_Types.h
===================================================================
--- branches/sim_physics/intern/ghost/GHOST_Types.h	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/GHOST_Types.h	2008-09-10 10:53:38 UTC (rev 16454)
@@ -100,6 +100,7 @@
 	GHOST_kWindowStateMaximized,
 	GHOST_kWindowStateMinimized,
 	GHOST_kWindowStateFullScreen,
+	GHOST_kWindowStateEmbedded,
 	GHOST_kWindowState8Normal = 8,
 	GHOST_kWindowState8Maximized,
 	GHOST_kWindowState8Minimized,
@@ -392,6 +393,15 @@
 } GHOST_DisplaySetting;
 
 
+#ifdef _WIN32
+typedef long GHOST_TEmbedderWindowID;
+#endif // _WIN32
+
+#ifndef _WIN32
+// I can't use "Window" from "<X11/Xlib.h>" because it conflits with Window defined in winlay.h
+typedef int GHOST_TEmbedderWindowID;
+#endif // _WIN32
+
 /**
  * A timer task callback routine.
  * @param task The timer task object.

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.cpp
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.cpp	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.cpp	2008-09-10 10:53:38 UTC (rev 16454)
@@ -402,7 +402,8 @@
 	GHOST_TUns32 height,
 	GHOST_TWindowState state,
 	GHOST_TDrawingContextType type,
-	bool stereoVisual
+	bool stereoVisual,
+	const GHOST_TEmbedderWindowID parentWindow
 )
 {
     GHOST_IWindow* window = 0;

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.h
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.h	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemCarbon.h	2008-09-10 10:53:38 UTC (rev 16454)
@@ -103,6 +103,7 @@
 	 * @param	height	The height the window.
 	 * @param	state	The state of the window when opened.
 	 * @param	type	The type of drawing context installed in this window.
+	 * @param	parentWindow 	Parent (embedder) window
 	 * @return	The new window (or 0 if creation failed).
 	 */
 	virtual GHOST_IWindow* createWindow(
@@ -113,7 +114,8 @@
 		GHOST_TUns32 height,
 		GHOST_TWindowState state,
 		GHOST_TDrawingContextType type,
-		const bool stereoVisual
+		const bool stereoVisual,
+		const GHOST_TEmbedderWindowID parentWindow = 0 
 	);
 	
 	/***************************************************************************************

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.cpp	2008-09-10 10:53:38 UTC (rev 16454)
@@ -169,7 +169,7 @@
 	const STR_String& title, 
 	GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
 	GHOST_TWindowState state, GHOST_TDrawingContextType type,
-	bool stereoVisual)
+	bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow )
 {
 	GHOST_Window* window = 0;
 	window = new GHOST_WindowWin32 (title, left, top, width, height, state, type, stereoVisual);

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.h
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.h	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemWin32.h	2008-09-10 10:53:38 UTC (rev 16454)
@@ -109,13 +109,14 @@
 	 * @param	height	The height the window.
 	 * @param	state	The state of the window when opened.
 	 * @param	type	The type of drawing context installed in this window.
+	 * @param	parentWindow 	Parent (embedder) window
 	 * @return	The new window (or 0 if creation failed).
 	 */
 	virtual GHOST_IWindow* createWindow(
 		const STR_String& title,
 		GHOST_TInt32 left, GHOST_TInt32 top, GHOST_TUns32 width, GHOST_TUns32 height,
 		GHOST_TWindowState state, GHOST_TDrawingContextType type,
-		const bool stereoVisual);
+		const bool stereoVisual, const GHOST_TEmbedderWindowID parentWindow = 0 );
 
 	/***************************************************************************************
 	 ** Event management functionality

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.cpp	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.cpp	2008-09-10 10:53:38 UTC (rev 16454)
@@ -191,6 +191,7 @@
 	 * @param	height	The height the window.
 	 * @param	state	The state of the window when opened.
 	 * @param	type	The type of drawing context installed in this window.
+	 * @param	parentWindow 	Parent (embedder) window
 	 * @return	The new window (or 0 if creation failed).
 	 */
 	GHOST_IWindow* 
@@ -203,14 +204,18 @@
 	GHOST_TUns32 height,
 	GHOST_TWindowState state,
 	GHOST_TDrawingContextType type,
-	bool stereoVisual
+	bool stereoVisual,
+	const GHOST_TEmbedderWindowID parentWindow
 ){
 	GHOST_WindowX11 * window = 0;
 	
 	if (!m_display) return 0;
 	
+
+	
+
 	window = new GHOST_WindowX11 (
-		this,m_display,title, left, top, width, height, state, type, stereoVisual
+		this,m_display,title, left, top, width, height, state, parentWindow, type, stereoVisual
 	);
 
 	if (window) {
@@ -511,7 +516,9 @@
 			}
 			break;
 		}
-			
+		
+		case DestroyNotify:
+			::exit(-1);	
 		// We're not interested in the following things.(yet...)
 		case NoExpose : 
 		case GraphicsExpose :

Modified: branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.h
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.h	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_SystemX11.h	2008-09-10 10:53:38 UTC (rev 16454)
@@ -108,6 +108,7 @@
 	 * @param	state		The state of the window when opened.
 	 * @param	type		The type of drawing context installed in this window.
 	 * @param       stereoVisual    Create a stereo visual for quad buffered stereo.
+	 * @param	parentWindow 	Parent (embedder) window
 	 * @return	The new window (or 0 if creation failed).
 	 */
 		GHOST_IWindow* 
@@ -119,9 +120,10 @@
 		GHOST_TUns32 height,
 		GHOST_TWindowState state,
 		GHOST_TDrawingContextType type,
-		const bool stereoVisual
+		const bool stereoVisual,
+		const GHOST_TEmbedderWindowID parentWindow = 0 
 	);
-	 
+
 	/**
 	 * @section Interface Inherited from GHOST_ISystem 
 	 */

Modified: branches/sim_physics/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/sim_physics/intern/ghost/intern/GHOST_WindowX11.cpp	2008-09-10 09:51:06 UTC (rev 16453)
+++ branches/sim_physics/intern/ghost/intern/GHOST_WindowX11.cpp	2008-09-10 10:53:38 UTC (rev 16454)
@@ -138,6 +138,7 @@
 	GHOST_TUns32 width,	
 	GHOST_TUns32 height,
 	GHOST_TWindowState state,
+	const GHOST_TEmbedderWindowID parentWindow,
 	GHOST_TDrawingContextType type,
 	const bool stereoVisual
 ) :
@@ -205,21 +206,57 @@
 
 	// create the window!
 
-	m_window = 
-		XCreateWindow(
-			m_display, 
-			RootWindow(m_display, m_visual->screen), 
-			left,
-			top,
-			width,
-			height,
-			0, // no border.
-			m_visual->depth,
-			InputOutput, 
-			m_visual->visual,
-			CWBorderPixel|CWColormap|CWEventMask, 
-			&xattributes
-		);
+	;
+	if (parentWindow == 0) {
+		m_window = 
+			XCreateWindow(
+				m_display, 
+				RootWindow(m_display, m_visual->screen), 
+				left,
+				top,
+				width,
+				height,
+				0, // no border.
+				m_visual->depth,
+				InputOutput, 
+				m_visual->visual,
+				CWBorderPixel|CWColormap|CWEventMask, 
+				&xattributes
+			);
+	} else {
+
+		Window root_return;
+		int x_return,y_return;
+		unsigned int w_return,h_return,border_w_return,depth_return;
+		GHOST_TInt32 screen_x, screen_y;
+		
+		XGetGeometry(m_display, parentWindow, &root_return, &x_return, &y_return,
+			&w_return, &h_return, &border_w_return, &depth_return );
+
+		left = 0;
+		top = 0;
+		width = w_return;
+		height = h_return;
+
+
+		m_window = XCreateWindow(
+				m_display, 
+				parentWindow,  // reparent against embedder 
+				left,
+				top,
+				width,

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list