[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43087] branches/bmesh/blender: svn merge ^/trunk/blender -r43062:43085

Campbell Barton ideasman42 at gmail.com
Tue Jan 3 03:16:53 CET 2012


Revision: 43087
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43087
Author:   campbellbarton
Date:     2012-01-03 02:16:52 +0000 (Tue, 03 Jan 2012)
Log Message:
-----------
svn merge ^/trunk/blender -r43062:43085

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

Modified Paths:
--------------
    branches/bmesh/blender/CMakeLists.txt
    branches/bmesh/blender/intern/cycles/blender/blender_mesh.cpp
    branches/bmesh/blender/intern/cycles/blender/blender_object.cpp
    branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp
    branches/bmesh/blender/intern/ghost/CMakeLists.txt
    branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
    branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h
    branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
    branches/bmesh/blender/release/scripts/startup/bl_operators/anim.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/properties_data_mesh.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_userpref_keymap.py
    branches/bmesh/blender/release/scripts/startup/bl_ui/space_view3d.py
    branches/bmesh/blender/source/blender/blenkernel/BKE_particle.h
    branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
    branches/bmesh/blender/source/blender/editors/armature/editarmature.c
    branches/bmesh/blender/source/blender/editors/armature/poselib.c
    branches/bmesh/blender/source/blender/editors/armature/poseobject.c
    branches/bmesh/blender/source/blender/editors/include/ED_object.h
    branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c
    branches/bmesh/blender/source/blender/editors/mesh/mesh_data.c
    branches/bmesh/blender/source/blender/editors/object/object_edit.c
    branches/bmesh/blender/source/blender/editors/object/object_group.c
    branches/bmesh/blender/source/blender/editors/object/object_shapekey.c
    branches/bmesh/blender/source/blender/editors/object/object_vgroup.c
    branches/bmesh/blender/source/blender/editors/physics/dynamicpaint_ops.c
    branches/bmesh/blender/source/blender/editors/physics/particle_object.c
    branches/bmesh/blender/source/blender/editors/render/render_shading.c
    branches/bmesh/blender/source/blender/gpu/GPU_buffers.h
    branches/bmesh/blender/source/blender/gpu/intern/gpu_buffers.c
    branches/bmesh/blender/source/blender/makesrna/intern/makesrna.c
    branches/bmesh/blender/source/blender/python/mathutils/mathutils_Matrix.c
    branches/bmesh/blender/source/blender/render/intern/source/external_engine.c
    branches/bmesh/blender/source/gameengine/GameLogic/CMakeLists.txt
    branches/bmesh/blender/source/gameengine/GameLogic/Joystick/SCA_Joystick.cpp

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43062
   + /branches/soc-2011-cucumber:37517,38384,38387,38403-38404,38407,42997-42998
/branches/soc-2011-tomato:42376,42378-42379,42383,42385,42395,42397-42400,42407,42411,42418,42443-42444,42446,42467,42472,42486,42650-42652,42654-42655,42709-42710,42733-42734,42801
/trunk/blender:39992-43085

Modified: branches/bmesh/blender/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/CMakeLists.txt	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/CMakeLists.txt	2012-01-03 02:16:52 UTC (rev 43087)
@@ -156,6 +156,7 @@
 
 if(UNIX AND NOT APPLE)
 	option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support and unicode input)"	ON)
+	option(WITH_X11_XF86VMODE "Enable X11 video mode switching"	OFF)
 	option(WITH_BUILTIN_GLEW "Use GLEW OpenGL wrapper library bundled with blender" ON)
 	option(WITH_XDG_USER_DIRS    "Build with XDG Base Directory Specification (only config and documents for now)" OFF)
 	mark_as_advanced(WITH_XDG_USER_DIRS)
@@ -584,6 +585,17 @@
 		if(WITH_X11_XINPUT)
 			set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xinput_LIB}")
 		endif()
+
+		if(WITH_X11_XF86VMODE)
+			# XXX, why dont cmake make this available?
+			FIND_LIBRARY(X11_Xxf86vmode_LIB Xxf86vm   ${X11_LIB_SEARCH_PATH})
+			mark_as_advanced(X11_Xxf86vmode_LIB)
+			if(X11_Xxf86vmode_LIB)
+				set(PLATFORM_LINKLIBS "${PLATFORM_LINKLIBS} ${X11_Xxf86vmode_LIB}")
+			else()
+				set(WITH_X11_XF86VMODE OFF)
+			endif()
+		endif()
 	endif()
 
 	if(CMAKE_SYSTEM_NAME MATCHES "Linux")
@@ -1547,6 +1559,7 @@
 
 	info_cfg_text("System Options:")
 	info_cfg_option(WITH_INSTALL_PORTABLE)
+	info_cfg_option(WITH_X11_XF86VMODE)
 	info_cfg_option(WITH_X11_XINPUT)
 	info_cfg_option(WITH_BUILTIN_GLEW)
 

Modified: branches/bmesh/blender/intern/cycles/blender/blender_mesh.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/blender/blender_mesh.cpp	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/cycles/blender/blender_mesh.cpp	2012-01-03 02:16:52 UTC (rev 43087)
@@ -78,8 +78,9 @@
 
 	for(b_mesh.faces.begin(f); f != b_mesh.faces.end(); ++f) {
 		int4 vi = get_int4(f->vertices_raw());
-		int n= (vi[3] == 0)? 3: 4;
-		int shader = used_shaders[f->material_index()];
+		int n = (vi[3] == 0)? 3: 4;
+		int mi = clamp(f->material_index(), 0, used_shaders.size()-1);
+		int shader = used_shaders[mi];
 		bool smooth = f->use_smooth();
 
 		mesh->add_triangle(vi[0], vi[1], vi[2], shader, smooth);

Modified: branches/bmesh/blender/intern/cycles/blender/blender_object.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/blender/blender_object.cpp	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/cycles/blender/blender_object.cpp	2012-01-03 02:16:52 UTC (rev 43087)
@@ -234,13 +234,20 @@
 
 				object_free_duplilist(*b_ob);
 
-				/* check if we should render duplicator */
 				hide = true;
-				BL::Object::particle_systems_iterator b_psys;
+			}
 
-				for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys)
-					if(b_psys->settings().use_render_emitter())
-						hide = false;
+			/* check if we should render or hide particle emitter */
+			BL::Object::particle_systems_iterator b_psys;
+			bool render_emitter = false;
+
+			for(b_ob->particle_systems.begin(b_psys); b_psys != b_ob->particle_systems.end(); ++b_psys) {
+				if(b_psys->settings().use_render_emitter()) {
+					hide = false;
+					render_emitter = true;
+				}
+				else if(!render_emitter)
+					hide = true;
 			}
 
 			if(!hide) {

Modified: branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp
===================================================================
--- branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/cycles/blender/blender_sync.cpp	2012-01-03 02:16:52 UTC (rev 43087)
@@ -69,13 +69,13 @@
 	BL::BlendData::materials_iterator b_mat;
 
 	for(b_data.materials.begin(b_mat); b_mat != b_data.materials.end(); ++b_mat)
-		if(b_mat->is_updated())
+		if(b_mat->is_updated() || (b_mat->node_tree() && b_mat->node_tree().is_updated()))
 			shader_map.set_recalc(*b_mat);
 
 	BL::BlendData::lamps_iterator b_lamp;
 
 	for(b_data.lamps.begin(b_lamp); b_lamp != b_data.lamps.end(); ++b_lamp)
-		if(b_lamp->is_updated())
+		if(b_lamp->is_updated() || (b_lamp->node_tree() && b_lamp->node_tree().is_updated()))
 			shader_map.set_recalc(*b_lamp);
 
 	BL::BlendData::objects_iterator b_ob;
@@ -107,7 +107,8 @@
 	BL::BlendData::worlds_iterator b_world;
 
 	for(b_data.worlds.begin(b_world); b_world != b_data.worlds.end(); ++b_world)
-		if(world_map == b_world->ptr.data && b_world->is_updated())
+		if(world_map == b_world->ptr.data &&
+			(b_world->is_updated() || (b_world->node_tree() && b_world->node_tree().is_updated())))
 			world_recalc = true;
 
 	bool recalc =

Modified: branches/bmesh/blender/intern/ghost/CMakeLists.txt
===================================================================
--- branches/bmesh/blender/intern/ghost/CMakeLists.txt	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/ghost/CMakeLists.txt	2012-01-03 02:16:52 UTC (rev 43087)
@@ -234,6 +234,13 @@
 		)
 	endif()
 
+	if(WITH_X11_XF86VMODE)
+		add_definitions(-DWITH_X11_XF86VMODE)
+		list(APPEND INC_SYS
+			${X11_xf86vmode_INCLUDE_PATH}
+		)
+	endif()
+
 	if(WITH_INPUT_NDOF)
 		list(APPEND SRC
 			intern/GHOST_NDOFManagerX11.cpp

Modified: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.cpp	2012-01-03 02:16:52 UTC (rev 43087)
@@ -36,7 +36,7 @@
 }
 
 GHOST_TSuccess
-GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays)
+GHOST_DisplayManagerSDL::getNumDisplays(GHOST_TUns8& numDisplays) const
 {
 	numDisplays=  SDL_GetNumVideoDisplays();
 	return GHOST_kSuccess;
@@ -44,7 +44,7 @@
 
 
 GHOST_TSuccess GHOST_DisplayManagerSDL::getNumDisplaySettings(GHOST_TUns8 display,
-                                                              GHOST_TInt32& numSettings)
+                                                              GHOST_TInt32& numSettings) const
 {
 	GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");
 	numSettings= GHOST_TInt32(1);
@@ -54,7 +54,7 @@
 GHOST_TSuccess
 GHOST_DisplayManagerSDL::getDisplaySetting(GHOST_TUns8 display,
                                            GHOST_TInt32 index,
-                                           GHOST_DisplaySetting& setting)
+                                           GHOST_DisplaySetting& setting) const
 {
 
 	GHOST_ASSERT(display < 1, "Only single display systems are currently supported.\n");
@@ -74,7 +74,7 @@
 
 GHOST_TSuccess
 GHOST_DisplayManagerSDL::getCurrentDisplaySetting(GHOST_TUns8 display,
-                                                  GHOST_DisplaySetting& setting)
+                                                  GHOST_DisplaySetting& setting) const
 {
 	return getDisplaySetting(display,GHOST_TInt32(0),setting);
 }

Modified: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerSDL.h	2012-01-03 02:16:52 UTC (rev 43087)
@@ -46,20 +46,20 @@
 	GHOST_DisplayManagerSDL(GHOST_SystemSDL *system);
 
 	GHOST_TSuccess
-	getNumDisplays(GHOST_TUns8& numDisplays);
+	getNumDisplays(GHOST_TUns8& numDisplays) const;
 
 	GHOST_TSuccess
 	getNumDisplaySettings(GHOST_TUns8 display,
-	                      GHOST_TInt32& numSettings);
+	                      GHOST_TInt32& numSettings) const;
 
 	GHOST_TSuccess
 	getDisplaySetting(GHOST_TUns8 display,
 	                  GHOST_TInt32 index,
-	                  GHOST_DisplaySetting& setting);
+	                  GHOST_DisplaySetting& setting) const;
 
 	GHOST_TSuccess
 	getCurrentDisplaySetting(GHOST_TUns8 display,
-	                         GHOST_DisplaySetting& setting);
+	                         GHOST_DisplaySetting& setting) const;
 
 	GHOST_TSuccess
 	setCurrentDisplaySetting(GHOST_TUns8 display,

Modified: branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerX11.cpp
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerX11.cpp	2012-01-03 02:11:11 UTC (rev 43086)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_DisplayManagerX11.cpp	2012-01-03 02:16:52 UTC (rev 43087)
@@ -20,7 +20,9 @@
  *
  * The Original Code is: all of this file.
  *
- * Contributor(s): none yet.
+ * Video mode switching
+ * Copyright (C) 1997-2001 Id Software, Inc.
+ * Ported from Quake 2 by Alex Fraser <alex at phatcore.com>
  *
  * ***** END GPL LICENSE BLOCK *****
  */
@@ -29,6 +31,10 @@
  *  \ingroup GHOST
  */
 
+#ifdef WITH_X11_XF86VMODE
+#  include <X11/Xlib.h>
+#  include <X11/extensions/xf86vmode.h>
+#endif
 
 #include "GHOST_DisplayManagerX11.h"
 #include "GHOST_SystemX11.h"
@@ -112,12 +118,74 @@
 	GHOST_TUns8 display,
 	const GHOST_DisplaySetting& setting
 ){
-	// This is never going to work robustly in X 
-	// but it's currently part of the full screen interface
+#ifdef WITH_X11_XF86VMODE
+	//
+	// Mode switching code ported from Quake 2:
+	// ftp://ftp.idsoftware.com/idstuff/source/q2source-3.21.zip
+	// See linux/gl_glx.c:GLimp_SetMode
+	//
+	int majorVersion, minorVersion;
+	XF86VidModeModeInfo **vidmodes;
+	Display *dpy = m_system->getXDisplay();
+	int scrnum, num_vidmodes;
+	int best_fit, best_dist, dist, x, y;
 
-	// we fudge it for now.
+	scrnum = DefaultScreen(dpy);
 
+	// Get video mode list
+	majorVersion = minorVersion = 0;

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-blender-cvs mailing list