svn merge ^/trunk/blender -r44204:44213
authorCampbell Barton <ideasman42@gmail.com>
Fri, 17 Feb 2012 21:07:18 +0000 (21:07 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Fri, 17 Feb 2012 21:07:18 +0000 (21:07 +0000)
19 files changed:
CMakeLists.txt
build_files/scons/config/freebsd7-config.py
build_files/scons/config/freebsd8-config.py
build_files/scons/config/freebsd9-config.py
build_files/scons/tools/btools.py
doc/python_api/rst/info_gotcha.rst
extern/CMakeLists.txt
extern/SConscript
extern/libmv/third_party/glog/src/config_freebsd.h
extern/libmv/third_party/glog/src/utilities.h
intern/ghost/CMakeLists.txt
intern/ghost/SConscript
intern/ghost/intern/GHOST_SystemX11.cpp
intern/ghost/intern/GHOST_SystemX11.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/ghost/intern/GHOST_WindowX11.h
source/blender/blenkernel/BKE_sound.h
source/blenderplayer/CMakeLists.txt
source/creator/CMakeLists.txt

index 6c0b9157dbafa121a37cea4d6f483cc0fd5a2730..9f6e8f88fd9465b449f6f5781faf8a0a62a89d22 100644 (file)
@@ -160,6 +160,11 @@ if(UNIX AND NOT APPLE)
        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)
+
+       # freebsd doesn't seems to support XDND
+       if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD")
+               option(WITH_GHOST_XDND   "Enable drag'n'drop support on Linux using XDND protocol" ON)
+       endif()
 else()
        # not an option for other OS's
        set(WITH_BUILTIN_GLEW ON)
index 7826ca226f6b9a1e90e7944760c22952d02e53da..8d0d09907bddc98f284943a19836371459e67192 100644 (file)
@@ -164,6 +164,8 @@ BF_EXPAT = '/usr/local'
 BF_EXPAT_LIB = 'expat'
 BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
 
+WITH_GHOST_XDND = False
+
 WITH_BF_OPENMP = True
 
 #Ray trace optimization
index f2d5cf2d0edee7e72131c696af1553ac4aa430c5..6222d63c271c182b46ccf464d2c5168e635fbaf3 100644 (file)
@@ -166,6 +166,8 @@ BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
 
 WITH_BF_OPENMP = True
 
+WITH_GHOST_XDND = False
+
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
index ea321b1a102853e76d15edade31403a453808bac..76539a330de1f4dbc8679461112302de84335032 100644 (file)
@@ -166,6 +166,8 @@ BF_EXPAT_LIBPATH = '${BF_EXPAT}/lib'
 
 WITH_BF_OPENMP = True
 
+WITH_GHOST_XDND = False
+
 #Ray trace optimization
 WITH_BF_RAYOPTIMIZATION = True
 BF_RAYOPTIMIZATION_SSE_FLAGS = ['-msse','-pthread']
index fe481d7ef345a494f9b222b8b9e8bf2acfa03c64..f5f013c86fb70efe71144d18569b6876022aa2e9 100644 (file)
@@ -138,6 +138,7 @@ def validate_arguments(args, bc):
             'WITH_BF_OPENMP', 'BF_OPENMP', 'BF_OPENMP_LIBPATH',
             'WITH_GHOST_COCOA',
             'WITH_GHOST_SDL',
+            'WITH_GHOST_XDND',
             'BF_GHOST_DEBUG',
             'USE_QTKIT',
             'BF_FANCY', 'BF_QUIET', 'BF_LINE_OVERWRITE',
@@ -567,7 +568,9 @@ def read_opts(env, cfg, args):
         ('BF_BOOST_INC', 'Boost include path', ''),
         ('BF_BOOST_LIB', 'Boost library', ''),
         ('BF_BOOST_LIBPATH', 'Boost library path', ''),
-        ('BF_BOOST_LIB_STATIC', 'Boost static library', '')
+        ('BF_BOOST_LIB_STATIC', 'Boost static library', ''),
+
+        (BoolVariable('WITH_GHOST_XDND', 'Build with drag-n-drop support on Linux platforms using XDND protocol', True))
     ) # end of opts.AddOptions()
 
     return localopts
index 281f068904484bc630450a33674ce3f29f140309..be11e88b2faca76ffc8d2e2d97c444d53485ea23 100644 (file)
@@ -118,14 +118,6 @@ If you insist - yes its possible, but scripts that use this hack wont be conside
    bpy.ops.wm.redraw_timer(type='DRAW_WIN_SWAP', iterations=1)
 
 
-Matrix multiplication is wrong
-==============================
-
-Every so often users complain that Blenders matrix math is wrong, the confusion comes from mathutils matrices being column-major to match OpenGL and the rest of Blenders matrix operations and stored matrix data.
-
-This is different to **numpy** which is row-major which matches what you would expect when using conventional matrix math notation.
-
-
 I can't edit the mesh in edit-mode!
 ===================================
 
index 5b2639ecb0ddbab34e6f4e05c3e4f1599a30f4d1..1d83410a3d7447c43d3d7c24b3731bced496b41f 100644 (file)
@@ -72,6 +72,8 @@ if(WITH_CARVE)
        add_subdirectory(carve)
 endif()
 
-if(UNIX AND NOT APPLE)
-       add_subdirectory(xdnd)
+if(WITH_GHOST_XDND)
+       if(UNIX AND NOT APPLE)
+               add_subdirectory(xdnd)
+       endif()
 endif()
index 5ecf9b1b2afc79fda6de64ac463289ef2e7007d8..67b74e9ee91facc601afc7a76c129eebcc1da39e 100644 (file)
@@ -35,5 +35,7 @@ if env['WITH_BF_LIBMV']:
 if env['WITH_BF_CARVE']:
     SConscript(['carve/SConscript'])
 
-if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'freebsd9', 'aix4', 'aix5'):
-    SConscript(['xdnd/SConscript'])
+if env['WITH_GHOST_XDND']:
+    # FreeBSD doesn't seems to support XDND protocol
+    if env['OURPLATFORM'] in ('linux', 'openbsd3', 'sunos5', 'aix4', 'aix5'):
+        SConscript(['xdnd/SConscript'])
index caaef9d998b181946d2158a0410593bde6b3f73b..28fa1f1c78b85ffabafddd15d972b9e64f2bce70 100644 (file)
@@ -11,7 +11,7 @@
 #define HAVE_DLFCN_H 1
 
 /* Define to 1 if you have the <execinfo.h> header file. */
-#define HAVE_EXECINFO_H 1
+#undef HAVE_EXECINFO_H
 
 /* Define if you have the `fcntl' function */
 #define HAVE_FCNTL 1
index 5c841a0b90b35a9fc9b8a8de7675ed449d64a4ca..bbb0eb0746cd032f6a9a120816c29b24be76dec4 100644 (file)
 // correctly when GetStackTrace() is called with max_depth == 0.
 // Some code may do that.
 
-#if __MINGW32__
+#if defined(__MINGW32__) || defined(__FreeBSD__)
 # undef STACKTRACE_H
 #elif defined(HAVE_LIB_UNWIND)
 # define STACKTRACE_H "stacktrace_libunwind-inl.h"
index 3d65f4972c40cfab7c361d3125aa667f65898261..5693aea08658c14a80ce8e78dfa4228a37c225a7 100644 (file)
@@ -220,18 +220,26 @@ elseif(UNIX)
                intern/GHOST_SystemX11.cpp
                intern/GHOST_SystemPathsX11.cpp
                intern/GHOST_WindowX11.cpp
-               intern/GHOST_DropTargetX11.cpp
 
                intern/GHOST_DisplayManagerX11.h
                intern/GHOST_SystemX11.h
                intern/GHOST_SystemPathsX11.h
                intern/GHOST_WindowX11.h
-               intern/GHOST_DropTargetX11.h
        )
 
-       list(APPEND INC
-               ../../extern/xdnd
-       )
+       if(WITH_GHOST_XDND)
+               add_definitions(-DWITH_XDND)
+
+               list(APPEND INC
+                       ../../extern/xdnd
+               )
+
+               list(APPEND SRC
+                       intern/GHOST_DropTargetX11.cpp
+
+                       intern/GHOST_DropTargetX11.h
+               )
+       endif()
 
        if(X11_XF86keysym_INCLUDE_PATH)
                add_definitions(-DWITH_XF86KEYSYM)
index d83107717fcf481578f88bbff524052cbf27bacd..3410f11a97176ecb3c8ed58d2aacac9e61bf4d6a 100644 (file)
@@ -42,7 +42,12 @@ elif window_system in ('linux', 'openbsd3', 'sunos5', 'freebsd7', 'freebsd8', 'f
     # defs += ['PREFIX=\\"/usr/local/\\"']  # XXX, make an option
     defs += ['WITH_X11_XINPUT']  # XXX, make an option
 
-    incs += ' #/extern/xdnd'
+    # freebsd doesn't seem to support XDND protocol
+    if env['WITH_GHOST_XDND'] and window_system not in ('freebsd7', 'freebsd8', 'freebsd9'):
+        incs += ' #/extern/xdnd'
+        defs += ['WITH_XDND']
+    else:
+        sources.remove('intern' + os.sep + 'GHOST_DropTargetX11.cpp')
 
 elif window_system in ('win32-vc', 'win32-mingw', 'cygwin', 'linuxcross', 'win64-vc'):
     for f in pf:
index 7261770771ad04c7fac3cdde7342f7dcf59c1ed6..857d9e79e57e1df1c10085163e6bd024a2300dc6 100644 (file)
 #include "GHOST_EventButton.h"
 #include "GHOST_EventWheel.h"
 #include "GHOST_DisplayManagerX11.h"
-#include "GHOST_DropTargetX11.h"
 #include "GHOST_EventDragnDrop.h"
 #ifdef WITH_INPUT_NDOF
 #include "GHOST_NDOFManagerX11.h"
 #endif
 
+#ifdef WITH_XDND
+#include "GHOST_DropTargetX11.h"
+#endif
+
 #include "GHOST_Debug.h"
 
 #include <X11/Xatom.h>
@@ -711,10 +714,14 @@ GHOST_SystemX11::processEvent(XEvent *xe)
                                        }
                                }
                        } else {
+#ifdef WITH_XDND
                                /* try to handle drag event (if there's no such events, GHOST_HandleClientMessage will return zero) */
                                if (window->getDropTarget()->GHOST_HandleClientMessage(xe) == false) {
                                        /* Unknown client message, ignore */
                                }
+#else
+                               /* Unknown client message, ignore */
+#endif
                        }
 
                        break;
@@ -1485,6 +1492,7 @@ void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
        }
 }
 
+#ifdef WITH_XDND
 GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType, 
                                                                                                        GHOST_TDragnDropTypes draggedObjectType,
                                                                                                        GHOST_IWindow* window,
@@ -1498,3 +1506,4 @@ GHOST_TSuccess GHOST_SystemX11::pushDragDropEvent(GHOST_TEventType eventType,
                                                                                                          window,mouseX,mouseY,data)
                        );
 }
+#endif
index 1aec218d6f13fa641de9ff651c921a6a18be1e02..62f5ba341d417126855c81aebc2538fe0d896f5d 100644 (file)
@@ -235,6 +235,7 @@ public:
         */
        void putClipboard(GHOST_TInt8 *buffer, bool selection) const;
 
+#if WITH_XDND
        /**
         * Creates a drag'n'drop event and pushes it immediately onto the event queue. 
         * Called by GHOST_DropTargetX11 class.
@@ -246,6 +247,7 @@ public:
         * @return Indication whether the event was handled. 
         */
        static GHOST_TSuccess pushDragDropEvent(GHOST_TEventType eventType, GHOST_TDragnDropTypes draggedObjectType,GHOST_IWindow* window, int mouseX, int mouseY, void* data);
+#endif
 
        /**
         * @see GHOST_ISystem
index ea99a9ea7b482cb9cae48e06a1d3574d00b15b15..3ceafcab3ce71d9f15a0502ec39263025b277068 100644 (file)
 
 #include "GHOST_WindowX11.h"
 #include "GHOST_SystemX11.h"
-#include "GHOST_DropTargetX11.h"
 #include "STR_String.h"
 #include "GHOST_Debug.h"
 
+#ifdef WITH_XDND
+#include "GHOST_DropTargetX11.h"
+#endif
+
 // For standard X11 cursors
 #include <X11/cursorfont.h>
 #include <X11/Xatom.h>
@@ -326,10 +329,12 @@ GHOST_WindowX11(
                XSelectInput(m_display , parentWindow, SubstructureNotifyMask);
                
        }       
-       
+
+#ifdef WITH_XDND
        /* initialize drop target for newly created window */
        m_dropTarget = new GHOST_DropTargetX11(this, m_system);
        GHOST_PRINT("Set drop target\n");
+#endif
 
        /*
         * One of the problem with WM-spec is that can't set a property
@@ -1323,7 +1328,9 @@ GHOST_WindowX11::
        }
 #endif
 
+#ifdef WITH_XDND
        delete m_dropTarget;
+#endif
 
        XDestroyWindow(m_display, m_window);
        XFree(m_visual);
index eae6cad5a6dcddcfc86b799ea7798ce07033dce6..5430c5916fc4311680308a26137313d97c545cab 100644 (file)
 
 class STR_String;
 class GHOST_SystemX11;
+
+#ifdef WITH_XDND
 class GHOST_DropTargetX11;
+#endif
 
 /**
  * X11 implementation of GHOST_IWindow.
@@ -225,8 +228,10 @@ public:
        XIC getX11_XIC() { return m_xic; }
 #endif
 
+#ifdef WITH_XDND
        GHOST_DropTargetX11* getDropTarget()
        { return m_dropTarget; }
+#endif
 
        /*
         * Need this in case that we want start the window
@@ -365,7 +370,9 @@ private :
        /** Cache of XC_* ID's to XCursor structures */
        std::map<unsigned int, Cursor> m_standard_cursors;
 
+#ifdef WITH_XDND
        GHOST_DropTargetX11 * m_dropTarget;
+#endif
 
 #ifdef WITH_X11_XINPUT
        /* Tablet devices */
index 90477647b88bd992c721e52b8a00a76f2b94c50b..8b01dbde531bd6ef856ca77cb91a381e7daa3650 100644 (file)
@@ -79,7 +79,7 @@ void sound_load(struct Main *main, struct bSound* sound);
 
 void sound_free(struct bSound* sound);
 
-#ifdef AUD_CAPI
+#ifdef __AUD_C_API_H__
 AUD_Device* sound_mixdown(struct Scene *scene, AUD_DeviceSpecs specs, int start, float volume);
 #endif
 
index d90668b7732cce4899e93f713b7d434af698ad98..1bf55cd96dee4b3951a4800758f761cfc824d84c 100644 (file)
@@ -186,6 +186,10 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS extern_carve)
        endif()
 
+       if(WITH_GHOST_XDND)
+               list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
+       endif()
+
        if(WITH_CODEC_QUICKTIME)
                list(APPEND BLENDER_SORTED_LIBS bf_quicktime)
        endif()
index 057c19dd5c450347d4b3b00009a6b6c150ef4c95..b39d2a5b5c2fbe000b51fcb65b3e7c68b181f05d 100644 (file)
@@ -830,7 +830,6 @@ endif()
                extern_minilzo
                extern_lzma
                extern_colamd
-               extern_xdnd
                ge_logic_ketsji
                extern_recastnavigation
                ge_phys_common
@@ -894,6 +893,10 @@ endif()
                list(APPEND BLENDER_SORTED_LIBS extern_carve)
        endif()
 
+       if(WITH_GHOST_XDND)
+               list(APPEND BLENDER_SORTED_LIBS extern_xdnd)
+       endif()
+
        foreach(SORTLIB ${BLENDER_SORTED_LIBS})
                set(REMLIB ${SORTLIB})
                foreach(SEARCHLIB ${BLENDER_LINK_LIBS})