[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [38934] branches/soc-2011-pepper: Merging trunk up to r38932.

Joerg Mueller nexyon at gmail.com
Tue Aug 2 14:16:07 CEST 2011


Revision: 38934
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=38934
Author:   nexyon
Date:     2011-08-02 12:16:06 +0000 (Tue, 02 Aug 2011)
Log Message:
-----------
Merging trunk up to r38932.

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

Modified Paths:
--------------
    branches/soc-2011-pepper/CMakeLists.txt
    branches/soc-2011-pepper/SConstruct
    branches/soc-2011-pepper/build_files/cmake/cmake_consistency_check.py
    branches/soc-2011-pepper/build_files/cmake/cmake_netbeans_project.py
    branches/soc-2011-pepper/build_files/cmake/cmake_qtcreator_project.py
    branches/soc-2011-pepper/build_files/cmake/macros.cmake
    branches/soc-2011-pepper/build_files/scons/config/darwin-config.py
    branches/soc-2011-pepper/build_files/scons/config/linux2-config.py
    branches/soc-2011-pepper/build_files/scons/config/win32-vc-config.py
    branches/soc-2011-pepper/build_files/scons/config/win64-vc-config.py
    branches/soc-2011-pepper/build_files/scons/tools/btools.py
    branches/soc-2011-pepper/doc/python_api/rst/bge.constraints.rst
    branches/soc-2011-pepper/doc/python_api/rst/bge.events.rst
    branches/soc-2011-pepper/doc/python_api/rst/bge.logic.rst
    branches/soc-2011-pepper/doc/python_api/rst/bge.render.rst
    branches/soc-2011-pepper/doc/python_api/rst/bge.texture.rst
    branches/soc-2011-pepper/doc/python_api/rst/bge.types.rst
    branches/soc-2011-pepper/doc/python_api/rst/bgl.rst
    branches/soc-2011-pepper/doc/python_api/sphinx_doc_gen.py
    branches/soc-2011-pepper/intern/ghost/CMakeLists.txt
    branches/soc-2011-pepper/intern/ghost/GHOST_C-api.h
    branches/soc-2011-pepper/intern/ghost/GHOST_ISystem.h
    branches/soc-2011-pepper/intern/ghost/GHOST_Types.h
    branches/soc-2011-pepper/intern/ghost/SConscript
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_C-api.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_DisplayManagerWin32.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_DropTargetWin32.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_DropTargetWin32.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_EventManager.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_EventNDOF.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManager.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManager.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_System.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_System.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemCocoa.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemPathsWin32.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemPathsWin32.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemWin32.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_SystemX11.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_TaskbarWin32.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_WindowWin32.h
    branches/soc-2011-pepper/release/scripts/modules/addon_utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy/__init__.py
    branches/soc-2011-pepper/release/scripts/modules/bpy/path.py
    branches/soc-2011-pepper/release/scripts/modules/bpy/utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/__init__.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/image_utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/io_utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/mesh_utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/object_utils.py
    branches/soc-2011-pepper/release/scripts/modules/bpy_extras/view3d_utils.py
    branches/soc-2011-pepper/release/scripts/modules/keyingsets_utils.py
    branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref.py
    branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_userpref_keymap.py
    branches/soc-2011-pepper/release/scripts/startup/bl_ui/space_view3d.py
    branches/soc-2011-pepper/release/scripts/templates/addon_add_object.py
    branches/soc-2011-pepper/source/blender/blenkernel/BKE_curve.h
    branches/soc-2011-pepper/source/blender/blenkernel/BKE_global.h
    branches/soc-2011-pepper/source/blender/blenkernel/BKE_material.h
    branches/soc-2011-pepper/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/curve.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/key.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/material.c
    branches/soc-2011-pepper/source/blender/blenkernel/intern/mesh.c
    branches/soc-2011-pepper/source/blender/blenlib/intern/BLI_args.c
    branches/soc-2011-pepper/source/blender/blenlib/intern/pbvh.c
    branches/soc-2011-pepper/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-pepper/source/blender/editors/curve/editcurve.c
    branches/soc-2011-pepper/source/blender/editors/gpencil/gpencil_paint.c
    branches/soc-2011-pepper/source/blender/editors/interface/interface_anim.c
    branches/soc-2011-pepper/source/blender/editors/interface/resources.c
    branches/soc-2011-pepper/source/blender/editors/object/object_relations.c
    branches/soc-2011-pepper/source/blender/editors/screen/screen_ops.c
    branches/soc-2011-pepper/source/blender/editors/sculpt_paint/paint_image.c
    branches/soc-2011-pepper/source/blender/editors/sculpt_paint/paint_stroke.c
    branches/soc-2011-pepper/source/blender/editors/space_image/image_intern.h
    branches/soc-2011-pepper/source/blender/editors/space_image/image_ops.c
    branches/soc-2011-pepper/source/blender/editors/space_image/space_image.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_draw.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_edit.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_fly.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_header.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_intern.h
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_ops.c
    branches/soc-2011-pepper/source/blender/editors/space_view3d/view3d_select.c
    branches/soc-2011-pepper/source/blender/editors/transform/transform.c
    branches/soc-2011-pepper/source/blender/editors/transform/transform_ops.c
    branches/soc-2011-pepper/source/blender/makesdna/DNA_userdef_types.h
    branches/soc-2011-pepper/source/blender/makesdna/DNA_view3d_types.h
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_ID.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_action.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_wm.c
    branches/soc-2011-pepper/source/blender/makesrna/intern/rna_wm_api.c
    branches/soc-2011-pepper/source/blender/modifiers/intern/MOD_uvproject.c
    branches/soc-2011-pepper/source/blender/python/intern/bpy_props.c
    branches/soc-2011-pepper/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-pepper/source/blender/windowmanager/WM_types.h
    branches/soc-2011-pepper/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2011-pepper/source/blender/windowmanager/intern/wm_init_exit.c
    branches/soc-2011-pepper/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-pepper/source/blender/windowmanager/intern/wm_window.c
    branches/soc-2011-pepper/source/blender/windowmanager/wm_event_types.h
    branches/soc-2011-pepper/source/gameengine/Ketsji/KX_PyConstraintBinding.cpp

Added Paths:
-----------
    branches/soc-2011-pepper/build_files/cmake/Modules/FindSpacenav.cmake
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerCocoa.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerCocoa.mm
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerWin32.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerWin32.h
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerX11.cpp
    branches/soc-2011-pepper/intern/ghost/intern/GHOST_NDOFManagerX11.h

Property Changed:
----------------
    branches/soc-2011-pepper/


Property changes on: branches/soc-2011-pepper
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:36830-38834
   + /trunk/blender:36830-38932

Modified: branches/soc-2011-pepper/CMakeLists.txt
===================================================================
--- branches/soc-2011-pepper/CMakeLists.txt	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/CMakeLists.txt	2011-08-02 12:16:06 UTC (rev 38934)
@@ -179,6 +179,7 @@
 option(WITH_LZMA          "Enable best LZMA compression, (used for pointcache)" ON)
 
 # Misc
+option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
 option(WITH_RAYOPTIMIZATION	"Enable use of SIMD (SSE) optimizations for the raytracer" ON) 
 if(UNIX AND NOT APPLE)
 	option(WITH_INSTALL_PORTABLE "Install redistributeable runtime, otherwise install into CMAKE_INSTALL_PREFIX" ON)
@@ -452,6 +453,19 @@
 		endif()
 	endif()
 
+	if (WITH_INPUT_NDOF)
+		find_package(Spacenav)
+		if(NOT SPACENAV_FOUND)
+			set(WITH_INPUT_NDOF OFF)
+		endif()
+
+		# use generic names within blenders buildsystem.
+		if(SPACENAV_FOUND)
+			set(NDOF_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIRS})
+			set(NDOF_LIBRARIES ${SPACENAV_LIBRARIES})
+		endif()
+	endif()
+
 	# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
 	set(PLATFORM_LINKLIBS "-lutil -lc -lm -lpthread -lstdc++")
 
@@ -1029,6 +1043,10 @@
 		set(TIFF_LIBPATH ${TIFF}/lib)
 	endif()
 
+	if (WITH_INPUT_NDOF)
+		# linker needs "-weak_framework 3DconnexionClient"
+	endif()
+
 	set(EXETYPE MACOSX_BUNDLE)
 
 	set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g")
@@ -1054,20 +1072,34 @@
 	endif()
 endif()
 
+# See TEST_SSE_SUPPORT() for how this is defined.
+
 if(WITH_RAYOPTIMIZATION)
 	if(CMAKE_COMPILER_IS_GNUCC)
-		if(SUPPORT_SSE_BUILD)
-			set(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}")
-			add_definitions(-D__SSE__ -D__MMX__)
+		set(_sse "-msse")
+		set(_sse2 "-msse2")
+	elseif(MSVC)
+		set(_sse "/arch:SSE")
+		set(_sse2 "/arch:SSE2")
+	else()
+		message(WARNING "SSE flags for this compiler not known")
+		set(_sse)
+		set(_sse2)
+	endif()
+
+	if(SUPPORT_SSE_BUILD)
+		set(PLATFORM_CFLAGS " ${_sse} ${PLATFORM_CFLAGS}")
+		add_definitions(-D__SSE__ -D__MMX__)
+	endif()
+	if(SUPPORT_SSE2_BUILD)
+		set(PLATFORM_CFLAGS " ${_sse2} ${PLATFORM_CFLAGS}")
+		add_definitions(-D__SSE2__)
+		if(NOT SUPPORT_SSE_BUILD) # dont double up
+			add_definitions(-D__MMX__)
 		endif()
-		if(SUPPORT_SSE2_BUILD)
-			set(PLATFORM_CFLAGS " -msse2 ${PLATFORM_CFLAGS}")
-			add_definitions(-D__SSE2__)
-			if(NOT SUPPORT_SSE_BUILD) # dont double up
-				add_definitions(-D__MMX__)
-			endif()
-		endif()
 	endif()
+	unset(_sse)
+	unset(_sse2)
 endif()
 
 if(WITH_IMAGE_OPENJPEG)
@@ -1306,6 +1338,7 @@
 	info_cfg_option(WITH_OPENCOLLADA)
 	info_cfg_option(WITH_FFTW3)
 	info_cfg_option(WITH_INTERNATIONAL)
+	info_cfg_option(WITH_INPUT_NDOF)
 
 	info_cfg_text("Compiler Options:")
 	info_cfg_option(WITH_BUILDINFO)

Modified: branches/soc-2011-pepper/SConstruct
===================================================================
--- branches/soc-2011-pepper/SConstruct	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/SConstruct	2011-08-02 12:16:06 UTC (rev 38934)
@@ -241,6 +241,7 @@
     target_env_defs['BF_BUILDINFO'] = False
     target_env_defs['BF_NO_ELBEEM'] = True
     target_env_defs['WITH_BF_PYTHON'] = False
+    target_env_defs['WITH_BF_3DMOUSE'] = False
     
     # Merge blenderlite, let command line to override
     for k,v in target_env_defs.iteritems():

Copied: branches/soc-2011-pepper/build_files/cmake/Modules/FindSpacenav.cmake (from rev 38931, trunk/blender/build_files/cmake/Modules/FindSpacenav.cmake)
===================================================================
--- branches/soc-2011-pepper/build_files/cmake/Modules/FindSpacenav.cmake	                        (rev 0)
+++ branches/soc-2011-pepper/build_files/cmake/Modules/FindSpacenav.cmake	2011-08-02 12:16:06 UTC (rev 38934)
@@ -0,0 +1,70 @@
+# - Find Spacenav library
+# Find the native Spacenav includes and library
+# This module defines
+#  SPACENAV_INCLUDE_DIRS, where to find spnav.h, Set when
+#                        SPACENAV_INCLUDE_DIR is found.
+#  SPACENAV_LIBRARIES, libraries to link against to use Spacenav.
+#  SPACENAV_ROOT_DIR, The base directory to search for Spacenav.
+#                    This can also be an environment variable.
+#  SPACENAV_FOUND, If false, do not try to use Spacenav.
+#
+# also defined, but not for general use are
+#  SPACENAV_LIBRARY, where to find the Spacenav library.
+
+#=============================================================================
+# Copyright 2011 Blender Foundation.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+
+# If SPACENAV_ROOT_DIR was defined in the environment, use it.
+IF(NOT SPACENAV_ROOT_DIR AND NOT $ENV{SPACENAV_ROOT_DIR} STREQUAL "")
+  SET(SPACENAV_ROOT_DIR $ENV{SPACENAV_ROOT_DIR})
+ENDIF()
+
+SET(_spacenav_SEARCH_DIRS
+  ${SPACENAV_ROOT_DIR}
+  /usr/local
+  /sw # Fink
+  /opt/local # DarwinPorts
+  /opt/csw # Blastwave
+)
+
+FIND_PATH(SPACENAV_INCLUDE_DIR
+  NAMES
+    spnav.h
+  HINTS
+    ${_spacenav_SEARCH_DIRS}
+  PATH_SUFFIXES
+    include
+)
+
+FIND_LIBRARY(SPACENAV_LIBRARY
+  NAMES
+    spnav
+  HINTS
+    ${_spacenav_SEARCH_DIRS}
+  PATH_SUFFIXES
+    lib64 lib
+  )
+
+# handle the QUIETLY and REQUIRED arguments and set SPACENAV_FOUND to TRUE if 
+# all listed variables are TRUE
+INCLUDE(FindPackageHandleStandardArgs)
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(Spacenav DEFAULT_MSG
+    SPACENAV_LIBRARY SPACENAV_INCLUDE_DIR)
+
+IF(SPACENAV_FOUND)
+  SET(SPACENAV_LIBRARIES ${SPACENAV_LIBRARY})
+  SET(SPACENAV_INCLUDE_DIRS ${SPACENAV_INCLUDE_DIR})
+ENDIF(SPACENAV_FOUND)
+
+MARK_AS_ADVANCED(
+  SPACENAV_INCLUDE_DIR
+  SPACENAV_LIBRARY
+)

Modified: branches/soc-2011-pepper/build_files/cmake/cmake_consistency_check.py
===================================================================
--- branches/soc-2011-pepper/build_files/cmake/cmake_consistency_check.py	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/cmake/cmake_consistency_check.py	2011-08-02 12:16:06 UTC (rev 38934)
@@ -39,7 +39,7 @@
     file_handle = open(f, 'r')
     data = file_handle.readlines()
     file_handle.close()
-    
+
     l = data[i]
     ws = l[:len(l) - len(l.lstrip())]
 

Modified: branches/soc-2011-pepper/build_files/cmake/cmake_netbeans_project.py
===================================================================
--- branches/soc-2011-pepper/build_files/cmake/cmake_netbeans_project.py	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/cmake/cmake_netbeans_project.py	2011-08-02 12:16:06 UTC (rev 38934)
@@ -37,7 +37,7 @@
                           source_list,
                           is_project_file,
                           is_c_header,
-                          is_py,
+                          # is_py,
                           cmake_advanced_info,
                           cmake_compiler_defines,
                           )

Modified: branches/soc-2011-pepper/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- branches/soc-2011-pepper/build_files/cmake/cmake_qtcreator_project.py	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/cmake/cmake_qtcreator_project.py	2011-08-02 12:16:06 UTC (rev 38934)
@@ -33,7 +33,7 @@
 
 from project_info import (SIMPLE_PROJECTFILE,
                           SOURCE_DIR,
-                          CMAKE_DIR,
+                          # CMAKE_DIR,
                           PROJECT_DIR,
                           source_list,
                           is_project_file,

Modified: branches/soc-2011-pepper/build_files/cmake/macros.cmake
===================================================================
--- branches/soc-2011-pepper/build_files/cmake/macros.cmake	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/cmake/macros.cmake	2011-08-02 12:16:06 UTC (rev 38934)
@@ -314,6 +314,10 @@
 	if(WITH_MEM_JEMALLOC)
 		target_link_libraries(${target} ${JEMALLOC_LIBRARIES})
 	endif()
+	if(WITH_INPUT_NDOF)
+		target_link_libraries(${target} ${NDOF_LIBRARIES})
+	endif()
+
 	if(WIN32 AND NOT UNIX)
 		target_link_libraries(${target} ${PTHREADS_LIBRARIES})
 	endif()

Modified: branches/soc-2011-pepper/build_files/scons/config/darwin-config.py
===================================================================
--- branches/soc-2011-pepper/build_files/scons/config/darwin-config.py	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/scons/config/darwin-config.py	2011-08-02 12:16:06 UTC (rev 38934)
@@ -264,8 +264,10 @@
     BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse']
 elif MACOSX_ARCHITECTURE == 'x86_64':
     BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-msse2']
-    
 
+# SpaceNavigator and related 3D mice
+WITH_BF_3DMOUSE = True
+
 #############################################################################
 ###################  various compile settings and flags    ##################
 #############################################################################
@@ -294,6 +296,9 @@
 	else:
 		PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS+['-framework','QuickTime']
 
+if WITH_BF_3DMOUSE:
+	PLATFORM_LINKFLAGS = PLATFORM_LINKFLAGS + ['-weak_framework','3DconnexionClient']
+
 #note to build succesfully on 10.3.9 SDK you need to patch  10.3.9 by adding the SystemStubs.a lib from 10.4
 LLIBS = ['stdc++', 'SystemStubs']
 

Modified: branches/soc-2011-pepper/build_files/scons/config/linux2-config.py
===================================================================
--- branches/soc-2011-pepper/build_files/scons/config/linux2-config.py	2011-08-02 12:16:00 UTC (rev 38933)
+++ branches/soc-2011-pepper/build_files/scons/config/linux2-config.py	2011-08-02 12:16:06 UTC (rev 38934)
@@ -192,6 +192,10 @@
 WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
 
+#SpaceNavigator and friends
+WITH_BF_3DMOUSE = True
+BF_3DMOUSE_LIB = 'spnav'
+
 ##
 CC = 'gcc'
 CXX = 'g++'
@@ -223,6 +227,8 @@

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list