[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [35784] branches/particles-2010: svn merge -r35751:35783 https://svn.blender.org/svnroot/bf-blender/trunk/ blender

Lukas Toenne lukas.toenne at googlemail.com
Fri Mar 25 18:10:35 CET 2011


Revision: 35784
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=35784
Author:   lukastoenne
Date:     2011-03-25 17:10:35 +0000 (Fri, 25 Mar 2011)
Log Message:
-----------
svn merge -r35751:35783 https://svn.blender.org/svnroot/bf-blender/trunk/blender

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

Modified Paths:
--------------
    branches/particles-2010/CMakeLists.txt
    branches/particles-2010/build_files/cmake/cmake_qtcreator_project.py
    branches/particles-2010/intern/ghost/CMakeLists.txt
    branches/particles-2010/intern/ghost/SConscript
    branches/particles-2010/intern/ghost/intern/GHOST_SystemPathsX11.cpp
    branches/particles-2010/intern/ghost/intern/GHOST_SystemX11.cpp
    branches/particles-2010/intern/ghost/intern/GHOST_WindowX11.cpp
    branches/particles-2010/release/scripts/modules/bpy/utils.py
    branches/particles-2010/release/scripts/modules/rna_info.py
    branches/particles-2010/release/scripts/presets/keyconfig/maya.py
    branches/particles-2010/source/blender/blenkernel/BKE_animsys.h
    branches/particles-2010/source/blender/blenkernel/BKE_node.h
    branches/particles-2010/source/blender/blenkernel/BKE_object.h
    branches/particles-2010/source/blender/blenkernel/intern/anim_sys.c
    branches/particles-2010/source/blender/blenkernel/intern/constraint.c
    branches/particles-2010/source/blender/blenkernel/intern/node.c
    branches/particles-2010/source/blender/blenkernel/intern/object.c
    branches/particles-2010/source/blender/blenlib/BLI_string.h
    branches/particles-2010/source/blender/blenlib/intern/string.c
    branches/particles-2010/source/blender/collada/CMakeLists.txt
    branches/particles-2010/source/blender/collada/DocumentImporter.cpp
    branches/particles-2010/source/blender/collada/DocumentImporter.h
    branches/particles-2010/source/blender/collada/ExtraHandler.cpp
    branches/particles-2010/source/blender/collada/ExtraHandler.h
    branches/particles-2010/source/blender/editors/curve/editfont.c
    branches/particles-2010/source/blender/editors/interface/interface.c
    branches/particles-2010/source/blender/editors/interface/interface_layout.c
    branches/particles-2010/source/blender/editors/interface/interface_templates.c
    branches/particles-2010/source/blender/editors/object/object_add.c
    branches/particles-2010/source/blender/editors/object/object_relations.c
    branches/particles-2010/source/blender/editors/physics/physics_fluid.c
    branches/particles-2010/source/blender/editors/space_graph/graph_edit.c
    branches/particles-2010/source/blender/editors/space_graph/graph_intern.h
    branches/particles-2010/source/blender/editors/space_graph/graph_ops.c
    branches/particles-2010/source/blender/editors/space_image/image_buttons.c
    branches/particles-2010/source/blender/editors/space_logic/logic_window.c
    branches/particles-2010/source/blender/editors/space_node/node_draw.c
    branches/particles-2010/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/particles-2010/source/blender/editors/space_view3d/drawmesh.c
    branches/particles-2010/source/blender/makesdna/DNA_anim_types.h
    branches/particles-2010/source/blender/makesrna/RNA_access.h
    branches/particles-2010/source/blender/makesrna/intern/rna_access.c
    branches/particles-2010/source/blender/makesrna/intern/rna_define.c
    branches/particles-2010/source/blender/makesrna/intern/rna_internal_types.h
    branches/particles-2010/source/blender/makesrna/intern/rna_key.c
    branches/particles-2010/source/blender/makesrna/intern/rna_particle.c
    branches/particles-2010/source/blender/makesrna/intern/rna_rna.c
    branches/particles-2010/source/blender/makesrna/intern/rna_scene.c
    branches/particles-2010/source/blender/makesrna/intern/rna_space.c
    branches/particles-2010/source/blender/makesrna/intern/rna_wm.c
    branches/particles-2010/source/blender/nodes/MOD_node.h
    branches/particles-2010/source/blender/nodes/intern/CMP_nodes/CMP_image.c
    branches/particles-2010/source/blender/nodes/intern/MOD_nodes/MOD_mesh.c
    branches/particles-2010/source/blender/nodes/intern/MOD_nodes/MOD_transform.c
    branches/particles-2010/source/blender/python/generic/py_capi_utils.c
    branches/particles-2010/source/blender/python/generic/py_capi_utils.h
    branches/particles-2010/source/blender/python/intern/bpy_interface.c
    branches/particles-2010/source/blender/render/intern/source/render_texture.c
    branches/particles-2010/source/gameengine/Ketsji/KX_PythonInit.cpp
    branches/particles-2010/source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

Added Paths:
-----------
    branches/particles-2010/source/blender/collada/ExtraTags.cpp
    branches/particles-2010/source/blender/collada/ExtraTags.h

Property Changed:
----------------
    branches/particles-2010/


Property changes on: branches/particles-2010
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:33741-35751
   + /trunk/blender:33741-35783

Modified: branches/particles-2010/CMakeLists.txt
===================================================================
--- branches/particles-2010/CMakeLists.txt	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/CMakeLists.txt	2011-03-25 17:10:35 UTC (rev 35784)
@@ -85,6 +85,10 @@
 	option(WITH_OPENMP        "Enable OpenMP (has to be supported by the compiler)" OFF)
 endif()
 
+if(UNIX AND NOT APPLE)
+	option(WITH_X11_XINPUT "Enable X11 Xinput (tablet support)"	ON)
+endif()
+
 # Modifiers
 option(WITH_MOD_FLUID        	"Enable Elbeem Modifier (Fluid Simulation)" ON)
 option(WITH_MOD_DECIMATE       	"Enable Decimate Modifier" ON)
@@ -108,11 +112,7 @@
 
 # 3D format support
 # disable opencollada on non-apple unix because opencollada has no package for debian
-if(UNIX AND NOT APPLE)
-	option(WITH_OPENCOLLADA		"Enable OpenCollada Support (http://www.opencollada.org)"	OFF)
-else()
-	option(WITH_OPENCOLLADA		"Enable OpenCollada Support (http://www.opencollada.org)"	OFF)
-endif()
+option(WITH_OPENCOLLADA		"Enable OpenCollada Support (http://www.opencollada.org)"	OFF)
 
 # Sound output
 option(WITH_SDL           "Enable SDL for sound and joystick support" ON)
@@ -389,8 +389,12 @@
 	mark_as_advanced(X11_XF86keysym_INCLUDE_PATH)
 
 	# OpenSuse needs lutil, ArchLinux not, for now keep, can avoid by using --as-needed
-	set(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB} ${X11_Xinput_LIB}")
+	set(LLIBS "-lutil -lc -lm -lpthread -lstdc++ ${X11_X11_LIB}")
 
+	if(WITH_X11_XINPUT)
+		list(APPEND LLIBS ${X11_Xinput_LIB})
+	endif()
+
 	if(CMAKE_SYSTEM_NAME MATCHES "Linux")
 		if(NOT WITH_PYTHON_MODULE)
 			# BSD's dont use libdl.so

Modified: branches/particles-2010/build_files/cmake/cmake_qtcreator_project.py
===================================================================
--- branches/particles-2010/build_files/cmake/cmake_qtcreator_project.py	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/build_files/cmake/cmake_qtcreator_project.py	2011-03-25 17:10:35 UTC (rev 35784)
@@ -175,6 +175,40 @@
     return includes, defines
 
 
+def cmake_cache_var(var):
+    cache_file = open(os.path.join(CMAKE_DIR, "CMakeCache.txt"))
+    lines = [l_strip for l in cache_file for l_strip in (l.strip(),) if l_strip if not l_strip.startswith("//") if not l_strip.startswith("#")]
+    cache_file.close()
+
+    for l in lines:
+        if l.split(":")[0] == var:
+            return l.split("=", 1)[-1]
+    return None
+
+
+def cmake_compiler_defines():
+    compiler = cmake_cache_var("CMAKE_C_COMPILER")  # could do CXX too
+
+    if compiler is None:
+        print("Couldn't find the compiler, os defines will be omitted...")
+        return
+
+    import tempfile
+    temp_c = tempfile.mkstemp(suffix=".c")[1]
+    temp_def = tempfile.mkstemp(suffix=".def")[1]
+
+    os.system("%s -dM -E %s > %s" % (compiler, temp_c, temp_def))
+
+    temp_def_file = open(temp_def)
+    lines = [l.strip() for l in temp_def_file if l.strip()]
+    temp_def_file.close()
+
+    os.remove(temp_c)
+    os.remove(temp_def)
+
+    return lines
+
+
 def create_qtc_project_main():
     files = list(source_list(base, filename_check=is_project_file))
     files_rel = [relpath(f, start=PROJECT_DIR) for f in files]
@@ -220,7 +254,9 @@
         qtc_cfg = join(PROJECT_DIR, "%s.config" % FILE_NAME)
         f = open(qtc_cfg, 'w')
         f.write("// ADD PREDEFINED MACROS HERE!\n")
-        f.write("\n".join([("#define %s %s" % item) for item in defines]))
+        defines_final = [("#define %s %s" % item) for item in defines]
+        defines_final += cmake_compiler_defines()  # defines from the compiler
+        f.write("\n".join(defines_final))
 
     print("Blender project file written to: %s" % qtc_prj)
     # --- end

Modified: branches/particles-2010/intern/ghost/CMakeLists.txt
===================================================================
--- branches/particles-2010/intern/ghost/CMakeLists.txt	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/intern/ghost/CMakeLists.txt	2011-03-25 17:10:35 UTC (rev 35784)
@@ -118,6 +118,11 @@
 	endif()
 
 elseif(UNIX)
+
+	if(WITH_X11_XINPUT)
+		add_definitions(-DWITH_X11_XINPUT)
+	endif()
+
 	list(APPEND INC ${X11_X11_INCLUDE_PATH})
 
 	list(APPEND SRC
@@ -132,7 +137,9 @@
 		intern/GHOST_WindowX11.h
 	)
 
-	add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+	if(NOT WITH_INSTALL_PORTABLE)
+		add_definitions(-DPREFIX="${CMAKE_INSTALL_PREFIX}")
+	endif()
 
 	if(X11_XF86keysym_INCLUDE_PATH)
 		add_definitions(-DWITH_XF86KEYSYM)

Modified: branches/particles-2010/intern/ghost/SConscript
===================================================================
--- branches/particles-2010/intern/ghost/SConscript	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/intern/ghost/SConscript	2011-03-25 17:10:35 UTC (rev 35784)
@@ -21,7 +21,8 @@
             sources.remove('intern' + os.sep + f + 'Carbon.cpp')
         except ValueError:
             pass
-    defs += ['PREFIX=\\"/usr/local/\\"']
+    defs += ['PREFIX=\\"/usr/local/\\"']  # XXX, make an option
+    defs += ['WITH_X11_XINPUT']  # XXX, make an option
 
 elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     for f in pf:

Modified: branches/particles-2010/intern/ghost/intern/GHOST_SystemPathsX11.cpp
===================================================================
--- branches/particles-2010/intern/ghost/intern/GHOST_SystemPathsX11.cpp	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/intern/ghost/intern/GHOST_SystemPathsX11.cpp	2011-03-25 17:10:35 UTC (rev 35784)
@@ -43,11 +43,6 @@
 #include <stdio.h> // for fprintf only
 #include <cstdlib> // for exit
 
-#ifndef PREFIX
-#  define PREFIX "/usr/local"
-#endif
-
-
 using namespace std;
 
 GHOST_SystemPathsX11::GHOST_SystemPathsX11()
@@ -60,7 +55,12 @@
 
 const GHOST_TUns8* GHOST_SystemPathsX11::getSystemDir() const
 {
+	/* no prefix assumes a portable build which only uses bundled scripts */
+#ifdef PREFIX
 	return (GHOST_TUns8*) PREFIX "/share";
+#else
+	return NULL;
+#endif
 }
 
 const GHOST_TUns8* GHOST_SystemPathsX11::getUserDir() const

Modified: branches/particles-2010/intern/ghost/intern/GHOST_SystemX11.cpp
===================================================================
--- branches/particles-2010/intern/ghost/intern/GHOST_SystemX11.cpp	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/intern/ghost/intern/GHOST_SystemX11.cpp	2011-03-25 17:10:35 UTC (rev 35784)
@@ -76,10 +76,6 @@
 #include <stdio.h> // for fprintf only
 #include <cstdlib> // for exit
 
-#ifndef PREFIX
-#error "PREFIX not defined"
-#endif
-
 typedef struct NDOFPlatformInfo {
 	Display *display;
 	Window window;

Modified: branches/particles-2010/intern/ghost/intern/GHOST_WindowX11.cpp
===================================================================
--- branches/particles-2010/intern/ghost/intern/GHOST_WindowX11.cpp	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/intern/ghost/intern/GHOST_WindowX11.cpp	2011-03-25 17:10:35 UTC (rev 35784)
@@ -439,7 +439,9 @@
 
 	setTitle(title);
 
+#ifdef WITH_X11_XINPUT
 	initXInputDevices();
+#endif
 
 	// now set up the rendering context.
 	if (installDrawingContext(type) == GHOST_kSuccess) {
@@ -453,6 +455,7 @@
 	XFlush(m_display);
 }
 
+#ifdef WITH_X11_XINPUT
 /* 
 	Dummy function to get around IO Handler exiting if device invalid
 	Basically it will not crash blender now if you have a X device that 
@@ -493,6 +496,7 @@
 	return FALSE;
 }
 
+
 /*	Determining if an X device is a Tablet style device is an imperfect science.
 **  We rely on common conventions around device names as well as the type reported
 **  by Wacom tablets.  This code will likely need to be expanded for alternate tablet types
@@ -652,8 +656,9 @@
 		}
 		XFree(version);
 	}
-}	
+}
 
+#endif /* WITH_X11_XINPUT */
 
 	Window 
 GHOST_WindowX11::
@@ -1275,14 +1280,16 @@
 	if (m_custom_cursor) {
 		XFreeCursor(m_display, m_custom_cursor);
 	}
-	
+
+#ifdef WITH_X11_XINPUT
 	/* close tablet devices */
 	if(m_xtablet.StylusDevice)
 		XCloseDevice(m_display, m_xtablet.StylusDevice);
 	
 	if(m_xtablet.EraserDevice)
 		XCloseDevice(m_display, m_xtablet.EraserDevice);
-	
+#endif /* WITH_X11_XINPUT */
+
 	if (m_context != s_firstContext) {
 		glXDestroyContext(m_display, m_context);
 	}

Modified: branches/particles-2010/release/scripts/modules/bpy/utils.py
===================================================================
--- branches/particles-2010/release/scripts/modules/bpy/utils.py	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/release/scripts/modules/bpy/utils.py	2011-03-25 17:10:35 UTC (rev 35784)
@@ -357,7 +357,9 @@
     keyconfigs_old = keyconfigs[:]
 
     try:
-        exec(compile(open(filepath).read(), filepath, 'exec'), {"__file__": filepath})
+        file = open(filepath)
+        exec(compile(file.read(), filepath, 'exec'), {"__file__": filepath})
+        file.close()
     except:
         import traceback
         traceback.print_exc()

Modified: branches/particles-2010/release/scripts/modules/rna_info.py
===================================================================
--- branches/particles-2010/release/scripts/modules/rna_info.py	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/release/scripts/modules/rna_info.py	2011-03-25 17:10:35 UTC (rev 35784)
@@ -207,7 +207,7 @@
             self.fixed_type = None
 
         if self.type == "enum":
-            self.enum_items[:] = rna_prop.items.keys()
+            self.enum_items[:] = rna_prop.enum_items.keys()
             self.is_enum_flag = rna_prop.is_enum_flag
         else:
             self.is_enum_flag = False

Modified: branches/particles-2010/release/scripts/presets/keyconfig/maya.py
===================================================================
--- branches/particles-2010/release/scripts/presets/keyconfig/maya.py	2011-03-25 16:53:07 UTC (rev 35783)
+++ branches/particles-2010/release/scripts/presets/keyconfig/maya.py	2011-03-25 17:10:35 UTC (rev 35784)
@@ -7,372 +7,372 @@
 # Map 3D View
 km = kc.keymaps.new('3D View', space_type='VIEW_3D', region_type='WINDOW', modal=False)
 
-kmi = km.items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)
+kmi = km.keymap_items.new('view3d.manipulator', 'LEFTMOUSE', 'PRESS', any=True)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list