reverting previous commit from Mitchell. His commit went to the trunk instead of...
authorDalai Felinto <dfelinto@gmail.com>
Sat, 29 May 2010 21:31:57 +0000 (21:31 +0000)
committerDalai Felinto <dfelinto@gmail.com>
Sat, 29 May 2010 21:31:57 +0000 (21:31 +0000)
svn merge -r 29067:29066 https://svn.blender.org/svnroot/bf-blender/trunk/blender

29 files changed:
CMakeLists.txt
config/linuxcross-config.py
config/win32-mingw-config.py
intern/ghost/GHOST_ISystem.h
intern/ghost/intern/GHOST_System.cpp
intern/ghost/intern/GHOST_System.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/sound/sound_ops.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/makesdna/DNA_object_types.h
source/blender/makesrna/intern/rna_object.c
source/blender/python/generic/blf_api.c
source/blender/windowmanager/wm_event_types.h
source/gameengine/Converter/BL_BlenderDataConversion.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.cpp
source/gameengine/Converter/KX_BlenderSceneConverter.h
source/gameengine/GamePlayer/ghost/GPG_Application.cpp
source/gameengine/GamePlayer/ghost/GPG_Application.h
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/CMakeLists.txt
source/gameengine/Ketsji/KX_ConvertPhysicsObject.h
source/gameengine/Ketsji/KX_ConvertPhysicsObjects.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp
source/gameengine/Ketsji/SConscript
source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
source/gameengine/Physics/common/PHY_DynamicTypes.h
source/gameengine/Rasterizer/RAS_2DFilterManager.cpp
source/gameengine/Rasterizer/RAS_2DFilterManager.h
source/gameengine/Rasterizer/RAS_OpenGLRasterizer/RAS_OpenGLRasterizer.cpp

index 70187c091f4555e20145f65b30e39606fa4d7f80..da116758f04450a59ce91f7118d761bb2a9f472a 100644 (file)
@@ -162,19 +162,23 @@ IF(UNIX AND NOT APPLE)
        FIND_PACKAGE(Freetype)
        # UNSET(FREETYPE_INCLUDE_DIRS CACHE) # cant use
 
-       # No way to set py31. remove for now.
-       # FIND_PACKAGE(PythonLibs)
-       SET(PYTHON /usr)
-       SET(PYTHON_VERSION 3.1)
-       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
-       # SET(PYTHON_BINARY python) # not used yet
-       SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
-       SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
-  
-       # FIND_PACKAGE(PythonInterp) # not used yet
-       # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
-  
-       SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+
+       IF(WITH_PYTHON)
+               # No way to set py31. remove for now.
+               # FIND_PACKAGE(PythonLibs)
+               SET(PYTHON /usr)
+               SET(PYTHON_VERSION 3.1)
+               SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}" CACHE STRING "")
+               # SET(PYTHON_BINARY python) # not used yet
+               SET(PYTHON_LIB python${PYTHON_VERSION} CACHE STRING "")
+               SET(PYTHON_LIBPATH ${PYTHON}/lib CACHE STRING "")
+       
+               # FIND_PACKAGE(PythonInterp) # not used yet
+               # SET(PYTHON_BINARY ${PYTHON_EXECUTABLE} CACHE STRING "")
+
+               SET(PYTHON_LINKFLAGS "-Xlinker -export-dynamic")
+       ENDIF(WITH_PYTHON)
+
 
        IF(WITH_SDL)
                FIND_PACKAGE(SDL)
@@ -184,23 +188,27 @@ IF(UNIX AND NOT APPLE)
                ENDIF(NOT SDL_FOUND)
        ENDIF(WITH_SDL)
 
-       SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
-       FIND_PATH(OPENEXR_INC
-               ImfXdr.h
-               PATHS
-               ${OPENEXR}/include/OpenEXR
-               /usr/local/include/OpenEXR
-               /sw/include/OpenEXR
-               /opt/local/include/OpenEXR
-               /opt/csw/include/OpenEXR
-               /opt/include/OpenEXR
-       )
-       SET(OPENEXR_LIB Half IlmImf Iex Imath)
-
-       SET(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
-       SET(FFMPEG_INC ${FFMPEG}/include)
-       SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
-       SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+       IF(WITH_OPENEXR)
+               SET(OPENEXR /usr CACHE FILEPATH "OPENEXR Directory")
+               FIND_PATH(OPENEXR_INC
+                       ImfXdr.h
+                       PATHS
+                       ${OPENEXR}/include/OpenEXR
+                       /usr/local/include/OpenEXR
+                       /sw/include/OpenEXR
+                       /opt/local/include/OpenEXR
+                       /opt/csw/include/OpenEXR
+                       /opt/include/OpenEXR
+               )
+               SET(OPENEXR_LIB Half IlmImf Iex Imath)
+       ENDIF(WITH_OPENEXR)
+
+       IF(WITH_FFMPEG)
+               SET(FFMPEG /usr CACHE FILEPATH "FFMPEG Directory")
+               SET(FFMPEG_INC ${FFMPEG}/include)
+               SET(FFMPEG_LIB avformat avcodec avutil avdevice swscale CACHE STRING "FFMPEG Libraries")
+               SET(FFMPEG_LIBPATH ${FFMPEG}/lib)
+       ENDIF(WITH_FFMPEG)
   
        IF(WITH_FFTW3)
                SET(FFTW3 /usr)
@@ -247,6 +255,10 @@ IF(UNIX AND NOT APPLE)
        IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
                # BSD's dont use libdl.so
                SET(LLIBS "${LLIBS} -ldl")
+
+               # binreloc is linux only
+               SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
+               SET(BINRELOC_INC ${BINRELOC}/include)
        ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
 
        IF(WITH_OPENMP)
@@ -267,6 +279,7 @@ IF(UNIX AND NOT APPLE)
        INCLUDE_DIRECTORIES(${JPEG_INCLUDE_DIR} ${PNG_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR} )
 ENDIF(UNIX AND NOT APPLE)
 
+
 IF(WIN32)
 
        # this file is included anyway when building under Windows with cl.exe
@@ -279,48 +292,19 @@ IF(WIN32)
                message("64 bit compiler detected.")
                SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/win64)
        ENDIF(CMAKE_CL_64)
+       
+       ADD_DEFINITIONS(-DWIN32)
 
-       SET(PYTHON ${LIBDIR}/python)
-       SET(PYTHON_VERSION 3.1)
-       SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
-       # SET(PYTHON_BINARY python) # not used yet
-       SET(PYTHON_LIB python31)
-       SET(PYTHON_LIBPATH ${PYTHON}/lib)
-
-       IF(WITH_OPENAL)
-               SET(OPENAL ${LIBDIR}/openal)
-               SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
-               SET(OPENAL_LIBRARY wrap_oal)
-               SET(OPENAL_LIBPATH ${OPENAL}/lib)
-       ENDIF(WITH_OPENAL)
-
-       IF(WITH_SNDFILE)
-               SET(SNDFILE ${LIBDIR}/sndfile)
-               SET(SNDFILE_INC ${SNDFILE}/include)
-               SET(SNDFILE_LIB libsndfile-1)
-               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
-       ENDIF(WITH_SNDFILE)
-  
        SET(ICONV ${LIBDIR}/iconv)
        SET(ICONV_INC ${ICONV}/include)
        SET(ICONV_LIB iconv)
        SET(ICONV_LIBPATH ${ICONV}/lib)
 
-       SET(QUICKTIME ${LIBDIR}/QTDevWin)
-       SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
-       SET(QUICKTIME_LIB qtmlClient)
-       SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
-
        SET(LIBSAMPLERATE ${LIBDIR}/samplerate)
        SET(LIBSAMPLERATE_INC ${LIBSAMPLERATE}/include)
        SET(LIBSAMPLERATE_LIB libsamplerate)
        SET(LIBSAMPLERATE_LIBPATH ${LIBSAMPLERATE}/lib)
 
-       SET(SDL ${LIBDIR}/sdl)
-       SET(SDL_INCLUDE_DIR ${SDL}/include)
-       SET(SDL_LIBRARY SDL)
-       SET(SDL_LIBPATH ${SDL}/lib)
-
        SET(PNG "${LIBDIR}/png")
        SET(PNG_INC "${PNG}/include")
        SET(PNG_LIBPATH ${PNG}/lib)
@@ -331,6 +315,43 @@ IF(WIN32)
 
        SET(WINTAB_INC ${LIBDIR}/wintab/include) 
 
+       IF(WITH_PYTHON)
+               SET(PYTHON ${LIBDIR}/python)
+               SET(PYTHON_VERSION 3.1)
+               SET(PYTHON_INC "${PYTHON}/include/python${PYTHON_VERSION}")
+               # SET(PYTHON_BINARY python) # not used yet
+               SET(PYTHON_LIB python31)
+               SET(PYTHON_LIBPATH ${PYTHON}/lib)
+       ENDIF(WITH_PYTHON)
+
+       IF(WITH_OPENAL)
+               SET(OPENAL ${LIBDIR}/openal)
+               SET(OPENAL_INCLUDE_DIR ${OPENAL}/include)
+               SET(OPENAL_LIBRARY wrap_oal)
+               SET(OPENAL_LIBPATH ${OPENAL}/lib)
+       ENDIF(WITH_OPENAL)
+
+       IF(WITH_SNDFILE)
+               SET(SNDFILE ${LIBDIR}/sndfile)
+               SET(SNDFILE_INC ${SNDFILE}/include)
+               SET(SNDFILE_LIB libsndfile-1)
+               SET(SNDFILE_LIBPATH ${SNDFILE}/lib)
+       ENDIF(WITH_SNDFILE)
+
+       IF(WITH_SDL)
+               SET(SDL ${LIBDIR}/sdl)
+               SET(SDL_INCLUDE_DIR ${SDL}/include)
+               SET(SDL_LIBRARY SDL)
+               SET(SDL_LIBPATH ${SDL}/lib)
+       ENDIF(WITH_SDL)
+
+       IF(WITH_QUICKTIME)
+               SET(QUICKTIME ${LIBDIR}/QTDevWin)
+               SET(QUICKTIME_INC ${QUICKTIME}/CIncludes)
+               SET(QUICKTIME_LIB qtmlClient)
+               SET(QUICKTIME_LIBPATH ${QUICKTIME}/Libraries)
+       ENDIF(WITH_QUICKTIME)
+
        IF(MSVC)
                IF(CMAKE_CL_64)
                        SET(LLIBS kernel32 user32 vfw32 winmm ws2_32 )
@@ -349,8 +370,6 @@ IF(WIN32)
                SET(CMAKE_C_FLAGS_RELEASE "/O2 /Ob2 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
                SET(CMAKE_C_FLAGS_MINSIZEREL "/O1 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /J" CACHE STRING "MSVC MT flags " FORCE)
                SET(CMAKE_C_FLAGS_RELWITHDEBINFO "/O2 /Ob1 /DNDEBUG /EHsc /MT /W3 /nologo /Zi /J" CACHE STRING "MSVC MT flags " FORCE)
-
-               ADD_DEFINITIONS(-DWIN32)
                
                IF(WITH_OPENMP)
                        SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /openmp ")
@@ -457,19 +476,19 @@ IF(WIN32)
        ELSE(MSVC) # MINGW
                SET(LLIBS "-lshell32 -lshfolder -lgdi32 -lmsvcrt -lwinmm -lmingw32 -lm -lws2_32 -lz -lstdc++ -lole32 -luuid")
 
-               SET(CMAKE_CXX_FLAGS                "-pipe -funsigned-char -fno-strict-aliasing -mwindows" CACHE STRING "Mingw C++ flags " FORCE)
-               SET(CMAKE_C_FLAGS                  "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C flags " FORCE)
+               SET(CMAKE_CXX_FLAGS                "-pipe -funsigned-char -fno-strict-aliasing -mwindows" CACHE STRING "Mingw C++ flags ")
+               SET(CMAKE_C_FLAGS                  "-pipe -funsigned-char -fno-strict-aliasing" CACHE STRING "Mingw C flags ")
 
-               SET(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g" CACHE STRING "Mingw debug C++ flags " FORCE)
-               SET(CMAKE_CXX_FLAGS_RELEASE        "   -O2" CACHE STRING "Mingw release C++ flags " FORCE)
-               SET(CMAKE_CXX_FLAGS_MINSIZEREL     "   -Os" CACHE STRING "Mingw minsize release C++ flags " FORCE)
-               SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Mingw release, debug C++ flags " FORCE)
+               SET(CMAKE_CXX_FLAGS_DEBUG          "-O0 -g" CACHE STRING "Mingw debug C++ flags ")
+               SET(CMAKE_CXX_FLAGS_RELEASE        "   -O2" CACHE STRING "Mingw release C++ flags ")
+               SET(CMAKE_CXX_FLAGS_MINSIZEREL     "   -Os" CACHE STRING "Mingw minsize release C++ flags ")
+               SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g" CACHE STRING "Mingw release, debug C++ flags ")
 
-               SET(CMAKE_C_FLAGS_DEBUG            "-O0 -g" CACHE STRING "Mingw debug C flags " FORCE)
-               SET(CMAKE_C_FLAGS_RELEASE          "-O2"    CACHE STRING "Mingw release C flags " FORCE)
-               SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os"    CACHE STRING "Mingw minsize release C flags " FORCE)
-               SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g" CACHE STRING "Mingw release, debug C++ flags " FORCE)
-               ADD_DEFINITIONS(-DFREE_WINDOWS -DWIN32)
+               SET(CMAKE_C_FLAGS_DEBUG            "-O0 -g" CACHE STRING "Mingw debug C flags ")
+               SET(CMAKE_C_FLAGS_RELEASE          "-O2"    CACHE STRING "Mingw release C flags ")
+               SET(CMAKE_C_FLAGS_MINSIZEREL       "-Os"    CACHE STRING "Mingw minsize release C flags ")
+               SET(CMAKE_C_FLAGS_RELWITHDEBINFO   "-O2 -g" CACHE STRING "Mingw release, debug C++ flags ")
+               ADD_DEFINITIONS(-DFREE_WINDOWS)
                
                IF(WITH_OPENMP)
                        SET(LLIBS "${LLIBS} -lgomp")
@@ -526,7 +545,7 @@ IF(WIN32)
                IF(WITH_OPENEXR)
                        SET(OPENEXR ${LIBDIR}/gcc/openexr)
                        SET(OPENEXR_INC ${OPENEXR}/include ${OPENEXR}/include/OpenEXR)
-                       SET(OPENEXR_LIB Half IlmImf Iex)
+                       SET(OPENEXR_LIB Half IlmImf Iex IlmThread)
                        SET(OPENEXR_LIBPATH ${OPENEXR}/lib)
                ENDIF(WITH_OPENEXR)
 
@@ -551,6 +570,7 @@ IF(WIN32)
 
 ENDIF(WIN32)
 
+
 IF(APPLE)
        IF(WITH_LIBS10.5)
                SET(LIBDIR ${CMAKE_SOURCE_DIR}/../lib/darwin-9.x.universal)
@@ -729,11 +749,6 @@ IF(APPLE)
 
 ENDIF(APPLE)
 
-IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-       SET(BINRELOC ${CMAKE_SOURCE_DIR}/extern/binreloc)
-       SET(BINRELOC_INC ${BINRELOC}/include)
-ENDIF(CMAKE_SYSTEM_NAME MATCHES "Linux")
-
 
 # buildinfo
 IF(WITH_BUILDINFO)
index 2fb1a4a39d680f49ec7f47c1d0b75c36734b70c3..0f8a15a8c75036100afd672811c27ea7d9b9deb5 100644 (file)
@@ -55,7 +55,7 @@ WITH_BF_OPENEXR = True
 WITH_BF_STATICOPENEXR = False
 BF_OPENEXR = LIBDIR + '/gcc/openexr'
 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
-BF_OPENEXR_LIB = ' Half IlmImf Iex '
+BF_OPENEXR_LIB = ' Half IlmImf Iex IlmThread '
 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
index 491652ab13300200fda14f99587d91ae7257a844..141658d32170bc0c8a96eb7c15b6f37f45f30a1e 100644 (file)
@@ -54,7 +54,7 @@ WITH_BF_OPENEXR = True
 WITH_BF_STATICOPENEXR = False
 BF_OPENEXR = LIBDIR + '/gcc/openexr'
 BF_OPENEXR_INC = '${BF_OPENEXR}/include ${BF_OPENEXR}/include/OpenEXR'
-BF_OPENEXR_LIB = ' Half IlmImf Iex '
+BF_OPENEXR_LIB = ' Half IlmImf Iex IlmThread '
 BF_OPENEXR_LIBPATH = '${BF_OPENEXR}/lib'
 # Warning, this static lib configuration is untested! users of this OS please confirm.
 BF_OPENEXR_LIB_STATIC = '${BF_OPENEXR}/lib/libHalf.a ${BF_OPENEXR}/lib/libIlmImf.a ${BF_OPENEXR}/lib/libIex.a ${BF_OPENEXR}/lib/libImath.a ${BF_OPENEXR}/lib/libIlmThread.a'
index 6762af89d76601246b12bde3fd1f0499dae64ab1..8d80c74e1409c3bbd1e508c2eb9bd6c0ed19b656 100644 (file)
@@ -258,7 +258,7 @@ public:
         * @return      Indication of success.
         */
        virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
-               const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0) = 0;
+               const bool stereoVisual) = 0;
 
        /**
         * Ends full screen mode.
index b1b1241fbe70e60c0c967047e67771cd7d53dbd4..c89534e01c554f7a1163d73b0f9e03a9009a95a3 100644 (file)
@@ -133,7 +133,7 @@ bool GHOST_System::validWindow(GHOST_IWindow* window)
 
 
 GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
-                                                                                        const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
+                                                                                        const bool stereoVisual)
 {
        GHOST_TSuccess success = GHOST_kFailure;
        GHOST_ASSERT(m_windowManager, "GHOST_System::beginFullScreen(): invalid window manager")
@@ -145,7 +145,7 @@ GHOST_TSuccess GHOST_System::beginFullScreen(const GHOST_DisplaySetting& setting
                        success = m_displayManager->setCurrentDisplaySetting(GHOST_DisplayManager::kMainDisplay, setting);
                        if (success == GHOST_kSuccess) {
                 //GHOST_PRINT("GHOST_System::beginFullScreen(): creating full-screen window\n");
-                               success = createFullScreenWindow((GHOST_Window**)window, stereoVisual, numOfAASamples);
+                               success = createFullScreenWindow((GHOST_Window**)window, stereoVisual);
                                if (success == GHOST_kSuccess) {
                                        m_windowManager->beginFullScreen(*window, stereoVisual);
                                }
@@ -327,7 +327,7 @@ GHOST_TSuccess GHOST_System::exit()
 }
 
 
-GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const bool stereoVisual, const GHOST_TUns16 numOfAASamples)
+GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const bool stereoVisual)
 {
        GHOST_TSuccess success;
        GHOST_ASSERT(m_displayManager, "GHOST_System::createFullScreenWindow(): invalid display manager")
@@ -341,8 +341,7 @@ GHOST_TSuccess GHOST_System::createFullScreenWindow(GHOST_Window** window, const
                                        0, 0, settings.xPixels, settings.yPixels,
                                        GHOST_kWindowStateFullScreen,
                                        GHOST_kDrawingContextTypeOpenGL,
-                                       stereoVisual,
-                                       numOfAASamples);
+                                       stereoVisual);
                success = *window == 0 ? GHOST_kFailure : GHOST_kSuccess;
        }
        return success;
index 30a38564b47f57b02d00f139e682f9b6475fb3f0..d6c6a356323758d3df60a39d6ce2e3ac1a2d8755 100644 (file)
@@ -141,7 +141,7 @@ public:
         * @return      Indication of success.
         */
        virtual GHOST_TSuccess beginFullScreen(const GHOST_DisplaySetting& setting, GHOST_IWindow** window,
-               const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0);
+               const bool stereoVisual);
 
        /**
         * Ends full screen mode.
@@ -330,7 +330,7 @@ protected:
         * @return Indication of success.
         */
        virtual GHOST_TSuccess createFullScreenWindow(GHOST_Window** window,
-               const bool stereoVisual, const GHOST_TUns16 numOfAASamples = 0);
+               const bool stereoVisual);
 
        /** The display manager (platform dependant). */
        GHOST_DisplayManager* m_displayManager;
index fb0822de67766d97d313b58a77ad9ff50ed18fe6..4e3ffad48aec26b77790c6421baf6e5f9c7553e5 100644 (file)
@@ -1659,7 +1659,7 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
                                my= event->y;
                                ui_window_to_block(data->region, block, &mx, &my);
 
-                               if ((but->y1 <= my) && (my <= but->y2) && (but->x1 <= mx) && (mx <= but->x2)) {
+                               if (ui_mouse_inside_button(data->region, but, mx, my)) {
                                        ui_textedit_set_cursor_pos(but, data, mx);
                                        but->selsta = but->selend = but->pos;
                                        data->selstartx= mx;
@@ -1999,14 +1999,17 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
                if(event->type == MOUSEMOVE)
                        return WM_UI_HANDLER_CONTINUE;
                
-               if(event->type == ESCKEY) {
-                       /* data->cancel doesnt work, this button opens immediate */
-                       if(but->flag & UI_BUT_IMMEDIATE)
-                               ui_set_but_val(but, 0);
-                       else
-                               data->cancel= 1;
-                       button_activate_state(C, but, BUTTON_STATE_EXIT);
-                       return WM_UI_HANDLER_BREAK;
+               if(event->type == LEFTMOUSE && event->val==KM_PRESS) {
+                       /* only cancel if click outside the button */
+                       if(ui_mouse_inside_button(but->active->region, but, event->x, event->y) == 0) {
+                               /* data->cancel doesnt work, this button opens immediate */
+                               if(but->flag & UI_BUT_IMMEDIATE)
+                                       ui_set_but_val(but, 0);
+                               else
+                                       data->cancel= 1;
+                               button_activate_state(C, but, BUTTON_STATE_EXIT);
+                               return WM_UI_HANDLER_BREAK;
+                       }
                }
                
                /* always set */
@@ -2040,15 +2043,11 @@ static int ui_do_but_HOTKEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data
        return WM_UI_HANDLER_CONTINUE;
 }
 
-
 static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, wmEvent *event)
 {
        if(data->state == BUTTON_STATE_HIGHLIGHT) {
                if(ELEM3(event->type, LEFTMOUSE, PADENTER, RETKEY) && event->val==KM_PRESS) {
-                       short event= (short)ui_get_but_val(but);
-                       /* hardcoded prevention from editing or assigning ESC */
-                       if(event!=ESCKEY)
-                               button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
+                       button_activate_state(C, but, BUTTON_STATE_WAIT_KEY_EVENT);
                        return WM_UI_HANDLER_BREAK;
                }
        }
@@ -2057,7 +2056,7 @@ static int ui_do_but_KEYEVT(bContext *C, uiBut *but, uiHandleButtonData *data, w
                        return WM_UI_HANDLER_CONTINUE;
 
                if(event->val==KM_PRESS) {
-                       if(event->type!=ESCKEY && WM_key_event_string(event->type)[0])
+                       if(WM_key_event_string(event->type)[0])
                                ui_set_but_val(but, event->type);
                        else
                                data->cancel= 1;
index 376db0d3d5822488e11985f5079287c919efc122..be4f6ff0570d3ba53c91fca6b377978bedb63a4c 100644 (file)
 #include <stdlib.h>
 #include <stdio.h>
 
+#include "MEM_guardedalloc.h"
+
 #include "DNA_packedFile_types.h"
 #include "DNA_scene_types.h"
 #include "DNA_space_types.h"
 #include "DNA_sequence_types.h"
+#include "DNA_userdef_types.h"
 
 #include "BKE_context.h"
 #include "BKE_global.h"
 
 /******************** open sound operator ********************/
 
+static void open_init(bContext *C, wmOperator *op)
+{
+       PropertyPointerRNA *pprop;
+       
+       op->customdata= pprop= MEM_callocN(sizeof(PropertyPointerRNA), "OpenPropertyPointerRNA");
+       uiIDContextProperty(C, &pprop->ptr, &pprop->prop);
+}
+
 static int open_exec(bContext *C, wmOperator *op)
 {
        char path[FILE_MAX];
        bSound *sound;
+       PropertyPointerRNA *pprop;
+       PointerRNA idptr;
        AUD_SoundInfo info;
 
        RNA_string_get(op->ptr, "path", path);
-
        sound = sound_new_file(CTX_data_main(C), path);
 
+       if(!op->customdata)
+               open_init(C, op);
+       
        if (sound==NULL || sound->playback_handle == NULL) {
+               if(op->customdata) MEM_freeN(op->customdata);
                BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
                return OPERATOR_CANCELLED;
        }
@@ -80,6 +96,7 @@ static int open_exec(bContext *C, wmOperator *op)
 
        if (info.specs.channels == AUD_CHANNELS_INVALID) {
                sound_delete(C, sound);
+               if(op->customdata) MEM_freeN(op->customdata);
                BKE_report(op->reports, RPT_ERROR, "Unsupported audio format");
                return OPERATOR_CANCELLED;
        }
@@ -87,12 +104,34 @@ static int open_exec(bContext *C, wmOperator *op)
        if (RNA_boolean_get(op->ptr, "cache")) {
                sound_cache(sound, 0);
        }
+       
+       /* hook into UI */
+       pprop= op->customdata;
+       
+       if(pprop->prop) {
+               /* when creating new ID blocks, use is already 1, but RNA
+                * pointer se also increases user, so this compensates it */
+               sound->id.us--;
+               
+               RNA_id_pointer_create(&sound->id, &idptr);
+               RNA_property_pointer_set(&pprop->ptr, pprop->prop, idptr);
+               RNA_property_update(C, &pprop->ptr, pprop->prop);
+       }
 
+       MEM_freeN(op->customdata);
        return OPERATOR_FINISHED;
 }
 
 static int open_invoke(bContext *C, wmOperator *op, wmEvent *event)
 {
+       if(!RNA_property_is_set(op->ptr, "relative_path"))
+               RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS);
+       
+       if(RNA_property_is_set(op->ptr, "path"))
+               return open_exec(C, op);
+       
+       open_init(C, op);
+       
        return WM_operator_filesel(C, op, event);
 }
 
@@ -113,6 +152,7 @@ void SOUND_OT_open(wmOperatorType *ot)
        /* properties */
        WM_operator_properties_filesel(ot, FOLDERFILE|SOUNDFILE|MOVIEFILE, FILE_SPECIAL, FILE_OPENFILE);
        RNA_def_boolean(ot->srna, "cache", FALSE, "Cache", "Cache the sound in memory.");
+       RNA_def_boolean(ot->srna, "relative_path", FALSE, "Relative Path", "Load image with relative path to current .blend file");
 }
 
 /* ******************************************************* */
index 3d039f07a65cbb15b1a6d01710319e113757dff0..5c2fe184d657327eedbb862bfa217dce41b1ceab 100644 (file)
@@ -1157,8 +1157,8 @@ static int viewzoom_invoke(bContext *C, wmOperator *op, wmEvent *event)
                        else {
                                
                                /* Set y move = x move as MOUSEZOOM uses only x axis to pass magnification value */
-                               vod->origy = vod->oldy = event->x;
-                               viewzoom_apply(vod, event->x, event->prevx, USER_ZOOM_DOLLY);
+                               vod->origy = vod->oldy = vod->origy + event->x - event->prevx;
+                               viewzoom_apply(vod, event->prevx, event->prevy, USER_ZOOM_DOLLY);
                        }
                        request_depth_update(CTX_wm_region_view3d(C));
                        
index e6b2e9a056c0e839f3e603daa42a75079a49db04..9649b8351a6829e81d6b1f89a40d9fff41caffd5 100644 (file)
@@ -402,7 +402,6 @@ extern Object workob;
 #define OB_BOUND_POLYH         4
 #define OB_BOUND_POLYT         5
 #define OB_BOUND_DYN_MESH   6
-#define OB_BOUND_CAPSULE       7
 
 
 /* **************** BASE ********************* */
index 6e7a06af3ab228ccb99c12d8bde7094e53227bb9..12c4bb79e3709e17962a3c7b1c67d1f8eb934697 100644 (file)
@@ -73,7 +73,6 @@ static EnumPropertyItem collision_bounds_items[] = {
        {OB_BOUND_CONE, "CONE", 0, "Cone", ""},
        {OB_BOUND_POLYT, "CONVEX_HULL", 0, "Convex Hull", ""},
        {OB_BOUND_POLYH, "TRIANGLE_MESH", 0, "Triangle Mesh", ""},
-       {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""},
        //{OB_DYN_MESH, "DYNAMIC_MESH", 0, "Dynamic Mesh", ""},
        {0, NULL, 0, NULL, NULL}};
 
@@ -330,7 +329,6 @@ static EnumPropertyItem *rna_Object_collision_bounds_itemf(bContext *C, PointerR
                RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CYLINDER);
                RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_SPHERE);
                RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_BOX);
-               RNA_enum_items_add_value(&item, &totitem, collision_bounds_items, OB_BOUND_CAPSULE);
        }
 
        RNA_enum_item_end(&item, &totitem);
@@ -1445,7 +1443,6 @@ static void rna_def_object(BlenderRNA *brna)
                {OB_BOUND_SPHERE, "SPHERE", 0, "Sphere", ""},
                {OB_BOUND_CYLINDER, "CYLINDER", 0, "Cylinder", ""},
                {OB_BOUND_CONE, "CONE", 0, "Cone", ""},
-               {OB_BOUND_CAPSULE, "CAPSULE", 0, "Capsule", ""},
                {OB_BOUND_POLYH, "POLYHEDER", 0, "Polyheder", ""},
                {0, NULL, 0, NULL, NULL}};
 
index 3e19bbeb5690f4e748733005680146d1060d4ccf..67f07ad837886413830c4eb14c91918e1357c91a 100644 (file)
@@ -402,4 +402,4 @@ PyObject *BLF_Init(void)
        PyModule_AddIntConstant(submodule, "KERNING_DEFAULT", BLF_KERNING_DEFAULT);
 
        return (submodule);
-}
\ No newline at end of file
+}
index 7b83e1d4179193bc8f25229aeb718a258a5342dc..a93214e9a54fe0b0d8f9283c9ef6f1099e775733 100644 (file)
 #define ISTWEAK(event) (event >= EVT_TWEAK_L && event <= EVT_GESTURE)
 
 /* test whether event type is acceptable as hotkey, excluding modifiers */
-#define ISHOTKEY(event)        ((ISKEYBOARD(event) || ISMOUSE(event)) && !(event>=LEFTCTRLKEY && event<=ESCKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
+#define ISHOTKEY(event)        ((ISKEYBOARD(event) || ISMOUSE(event)) && !(event>=LEFTCTRLKEY && event<=LEFTSHIFTKEY) && !(event>=UNKNOWNKEY && event<=GRLESSKEY))
 
 /* **************** BLENDER GESTURE EVENTS ********************* */
 
index efd93eb3102d2ceada9dcf6ec65abddb526607be..2f0f70ed9fe0db623b2e3ba01bfb3712636ee85b 100644 (file)
@@ -1570,13 +1570,6 @@ void BL_CreatePhysicsObjectNew(KX_GameObject* gameobj,
                                objprop.m_boundobject.c.m_height = 2.f*bb.m_extends[2];
                                break;
                        }
-                       case OB_BOUND_CAPSULE:
-                       {
-                               objprop.m_boundclass = KX_BOUNDCAPSULE;
-                               objprop.m_boundobject.c.m_radius = MT_max(bb.m_extends[0], bb.m_extends[1]);
-                               objprop.m_boundobject.c.m_height = bb.m_extends[2];
-                               break;
-                       }
                }
        }
 
@@ -2698,4 +2691,4 @@ void BL_ConvertBlenderObjects(struct Main* maggie,
        MT_Scalar distance = (activecam)? activecam->GetCameraFar() - activecam->GetCameraNear(): 100.0f;
        RAS_BucketManager *bucketmanager = kxscene->GetBucketManager();
        bucketmanager->OptimizeBuckets(distance);
-}
\ No newline at end of file
+}
index 4792ead8be20473f517b521f6fd0009ffdf2a0a2..3a5bb92b4fa2059fdde12b708aec31df93a820a9 100644 (file)
@@ -932,7 +932,7 @@ Main* KX_BlenderSceneConverter::GetMainDynamicPath(const char *path)
        return NULL;
 }
 
-bool KX_BlenderSceneConverter::LinkBlendFile(const char *path, char *group, char *filter, KX_Scene *scene_merge, char **err_str)
+bool KX_BlenderSceneConverter::LinkBlendFile(const char *path, char *group, KX_Scene *scene_merge, char **err_str)
 {
        bContext *C;
        Main *main_newlib; /* stored as a dynamic 'main' until we free it */
@@ -941,7 +941,6 @@ bool KX_BlenderSceneConverter::LinkBlendFile(const char *path, char *group, char
        BlendHandle *bpy_openlib = NULL;        /* ptr to the open .blend file */       
        int idcode= BLO_idcode_from_name(group);
        short flag= 0; /* dont need any special options */
-       bool found = false; /* used for error reporting when using item */
        ReportList reports;
        static char err_local[255];
        
@@ -950,48 +949,50 @@ bool KX_BlenderSceneConverter::LinkBlendFile(const char *path, char *group, char
                snprintf(err_local, sizeof(err_local), "invalid ID type given \"%s\"\n", group);
                return false;
        }
+       
+       if(GetMainDynamicPath(path)) {
+               snprintf(err_local, sizeof(err_local), "blend file already open \"%s\"\n", path);
+               *err_str= err_local;
+               return false;
+       }
 
-       main_newlib = GetMainDynamicPath(path);
-
-       if (main_newlib == NULL)
-       {
-               bpy_openlib = BLO_blendhandle_from_file( (char *)path );
-               if(bpy_openlib==NULL) {
-                       snprintf(err_local, sizeof(err_local), "could not open blendfile \"%s\"\n", path);
-                       *err_str= err_local;
-                       return false;
-               }
-               
-               main_newlib= (Main *)MEM_callocN( sizeof(Main), "BgeMain");
-               C= CTX_create();
-               CTX_data_main_set(C, main_newlib);
-               BKE_reports_init(&reports, RPT_STORE);  
+       bpy_openlib = BLO_blendhandle_from_file( (char *)path );
+       if(bpy_openlib==NULL) {
+               snprintf(err_local, sizeof(err_local), "could not open blendfile \"%s\"\n", path);
+               *err_str= err_local;
+               return false;
+       }
+       
+       main_newlib= (Main *)MEM_callocN( sizeof(Main), "BgeMain");
+       C= CTX_create();
+       CTX_data_main_set(C, main_newlib);
+       BKE_reports_init(&reports, RPT_STORE);  
 
-               /* here appending/linking starts */
-               main_tmp = BLO_library_append_begin(C, &bpy_openlib, (char *)path);
-               
-               names = BLO_blendhandle_get_datablock_names( bpy_openlib, idcode);
-               
-               int i=0;
-               LinkNode *n= names;
-               while(n) {
-                       BLO_library_append_named_part(C, main_tmp, &bpy_openlib, (char *)n->link, idcode, 0);
-                       n= (LinkNode *)n->next;
-                       i++;
-               }
-               BLI_linklist_free(names, free); /* free linklist *and* each node's data */
-               
-               BLO_library_append_end(C, main_tmp, &bpy_openlib, idcode, flag);
-               BLO_blendhandle_close(bpy_openlib);
-               
-               CTX_free(C);
-               BKE_reports_clear(&reports);
-               /* done linking */      
-               
-               /* needed for lookups*/
-               GetMainDynamic().push_back(main_newlib);
-               strncpy(main_newlib->name, path, sizeof(main_newlib->name));
+       /* here appending/linking starts */
+       main_tmp = BLO_library_append_begin(C, &bpy_openlib, (char *)path);
+       
+       names = BLO_blendhandle_get_datablock_names( bpy_openlib, idcode);
+       
+       int i=0;
+       LinkNode *n= names;
+       while(n) {
+               BLO_library_append_named_part(C, main_tmp, &bpy_openlib, (char *)n->link, idcode, 0);
+               n= (LinkNode *)n->next;
+               i++;
        }
+       BLI_linklist_free(names, free); /* free linklist *and* each node's data */
+       
+       BLO_library_append_end(C, main_tmp, &bpy_openlib, idcode, flag);
+       BLO_blendhandle_close(bpy_openlib);
+       
+       CTX_free(C);
+       BKE_reports_clear(&reports);
+       /* done linking */      
+       
+       /* needed for lookups*/
+       GetMainDynamic().push_back(main_newlib);
+       strncpy(main_newlib->name, path, sizeof(main_newlib->name));    
+       
        
        if(idcode==ID_ME) {
                /* Convert all new meshes into BGE meshes */
@@ -999,39 +1000,24 @@ bool KX_BlenderSceneConverter::LinkBlendFile(const char *path, char *group, char
                KX_Scene *kx_scene= m_currentScene;
        
                for(mesh= (ID *)main_newlib->mesh.first; mesh; mesh= (ID *)mesh->next ) {
-                       /* If item is defined, use it to filter meshes */
-                       if (!strcmp(filter, "") || !strcmp(filter, mesh->name+2))
-                       {
-                               found = true;
-                               RAS_MeshObject *meshobj = BL_ConvertMesh((Mesh *)mesh, NULL, scene_merge, this);
-                               kx_scene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj);
-                       }
+                       RAS_MeshObject *meshobj = BL_ConvertMesh((Mesh *)mesh, NULL, scene_merge, this);
+                       kx_scene->GetLogicManager()->RegisterMeshName(meshobj->GetName(),meshobj);
                }
        }
        else if(idcode==ID_SCE) {               
                /* Merge all new linked in scene into the existing one */
                ID *scene;
                for(scene= (ID *)main_newlib->scene.first; scene; scene= (ID *)scene->next ) {
-                       /* If item is defined, use it to filter scenes */
-                       if (!strcmp(filter, "") || !strcmp(filter, scene->name+2))
-                       {
-                               found = true;
-                               printf("Loading scene: %s\n", scene->name+2);
-                               /* merge into the base  scene */
-                               KX_Scene* other= m_ketsjiEngine->CreateScene((Scene *)scene);
-                               scene_merge->MergeScene(other);
-                               
-                               // RemoveScene(other); // Dont run this, it frees the entire scene converter data, just delete the scene
-                               delete other;
-                       }
+                       printf("SceneName: %s\n", scene->name);
+                       
+                       /* merge into the base  scene */
+                       KX_Scene* other= m_ketsjiEngine->CreateScene((Scene *)scene);
+                       scene_merge->MergeScene(other);
+                       
+                       // RemoveScene(other); // Dont run this, it frees the entire scene converter data, just delete the scene
+                       delete other;
                }
        }
-
-       if (found == false)
-       {
-               printf("Item not found: %s\n", filter);
-               return false;
-       }
        
        return true;
 }
index 341e45464300528ef1e65896af1598d5ec053541..3dd3afb56629c9f657f37c25f5a5d777ff6e3f7f 100644 (file)
@@ -142,7 +142,7 @@ public:
        struct Main*              GetMainDynamicPath(const char *path);
        vector<struct Main*> &GetMainDynamic();
        
-       bool LinkBlendFile(const char *path, char *group, char *filter, KX_Scene *scene_merge, char **err_str);
+       bool LinkBlendFile(const char *path, char *group, KX_Scene *scene_merge, char **err_str);
        bool MergeScene(KX_Scene *to, KX_Scene *from);
        RAS_MeshObject *ConvertMeshSpecial(KX_Scene* kx_scene, Main *maggie, const char *name);
        bool FreeBlendFile(struct Main *maggie);
index bde4bf3892bf62285b7844de8f0e50f543f9e970..71507642226d321f674dbbef72abcfecd7bac86e 100644 (file)
@@ -228,8 +228,7 @@ static HWND findGhostWindowHWND(GHOST_IWindow* window)
 bool GPG_Application::startScreenSaverPreview(
        HWND parentWindow,
        const bool stereoVisual,
-       const int stereoMode,
-       const GHOST_TUns16 samples)
+       const int stereoMode)
 {
        bool success = false;
 
@@ -241,7 +240,7 @@ bool GPG_Application::startScreenSaverPreview(
                STR_String title = "";
                                                        
                m_mainWindow = fSystem->createWindow(title, 0, 0, windowWidth, windowHeight, GHOST_kWindowStateMinimized,
-                       GHOST_kDrawingContextTypeOpenGL, stereoVisual, samples);
+                       GHOST_kDrawingContextTypeOpenGL, stereoVisual);
                if (!m_mainWindow) {
                        printf("error: could not create main window\n");
                        exit(-1);
@@ -283,10 +282,9 @@ bool GPG_Application::startScreenSaverFullScreen(
                int height,
                int bpp,int frequency,
                const bool stereoVisual,
-               const int stereoMode,
-               const GHOST_TUns16 samples)
+               const int stereoMode)
 {
-       bool ret = startFullScreen(width, height, bpp, frequency, stereoVisual, stereoMode, samples);
+       bool ret = startFullScreen(width, height, bpp, frequency, stereoVisual, stereoMode);
        if (ret)
        {
                HWND ghost_hwnd = findGhostWindowHWND(m_mainWindow);
@@ -308,14 +306,13 @@ bool GPG_Application::startWindow(STR_String& title,
        int windowWidth,
        int windowHeight,
        const bool stereoVisual,
-       const int stereoMode,
-       const GHOST_TUns16 samples)
+       const int stereoMode)
 {
        bool success;
        // Create the main window
        //STR_String title ("Blender Player - GHOST");
        m_mainWindow = fSystem->createWindow(title, windowLeft, windowTop, windowWidth, windowHeight, GHOST_kWindowStateNormal,
-               GHOST_kDrawingContextTypeOpenGL, stereoVisual, samples);
+               GHOST_kDrawingContextTypeOpenGL, stereoVisual);
        if (!m_mainWindow) {
                printf("error: could not create main window\n");
                exit(-1);
@@ -337,11 +334,10 @@ bool GPG_Application::startWindow(STR_String& title,
 bool GPG_Application::startEmbeddedWindow(STR_String& title,
        const GHOST_TEmbedderWindowID parentWindow, 
        const bool stereoVisual, 
-       const int stereoMode,
-       const GHOST_TUns16 samples) {
+       const int stereoMode) {
 
        m_mainWindow = fSystem->createWindow(title, 0, 0, 0, 0, GHOST_kWindowStateNormal,
-               GHOST_kDrawingContextTypeOpenGL, stereoVisual,samples, parentWindow);
+               GHOST_kDrawingContextTypeOpenGL, stereoVisual, parentWindow);
 
        if (!m_mainWindow) {
                printf("error: could not create main window\n");
@@ -362,8 +358,7 @@ bool GPG_Application::startFullScreen(
                int height,
                int bpp,int frequency,
                const bool stereoVisual,
-               const int stereoMode,
-               const GHOST_TUns16 samples)
+               const int stereoMode)
 {
        bool success;
        // Create the main window
index e6a47628923f84aed4e1c838964ac3f6e84abb4f..48a6c8e78ecf309fd38cadfdda6d846b0860b34e 100644 (file)
@@ -59,12 +59,12 @@ public:
 
                        bool SetGameEngineData(struct Main* maggie, struct Scene* scene, int argc, char** argv);
                        bool startWindow(STR_String& title, int windowLeft, int windowTop, int windowWidth, int windowHeight,
-                       const bool stereoVisual, const int stereoMode, const GHOST_TUns16 numOfAASamples = 0);
-                       bool startFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
-                       bool startEmbeddedWindow(STR_String& title, const GHOST_TEmbedderWindowID parent_window, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
+                       const bool stereoVisual, const int stereoMode);
+                       bool startFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode);
+                       bool startEmbeddedWindow(STR_String& title, const GHOST_TEmbedderWindowID parent_window, const bool stereoVisual, const int stereoMode);
 #ifdef WIN32
-                       bool startScreenSaverFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
-                       bool startScreenSaverPreview(HWND parentWindow, const bool stereoVisual, const int stereoMode, const GHOST_TUns16 samples=0);
+                       bool startScreenSaverFullScreen(int width, int height, int bpp, int frequency, const bool stereoVisual, const int stereoMode);
+                       bool startScreenSaverPreview(HWND parentWindow, const bool stereoVisual, const int stereoMode);
 #endif
 
        virtual bool processEvent(GHOST_IEvent* event);
index 69df00949a89f14fe7f934926705b2b0d18d2662..b7ed8666325aa223e57ca8e71f03a936ef1c4abe 100644 (file)
@@ -214,7 +214,6 @@ void usage(const char* program)
        printf("  -c: keep console window open\n\n");
 #endif
        printf("  -d: turn debugging on\n\n");
-       printf("  -m: sets the number of samples to request for multisampling");
        printf("  -g: game engine options:\n\n");
        printf("       Name                       Default      Description\n");
        printf("       ------------------------------------------------------------------------\n");
@@ -230,7 +229,6 @@ void usage(const char* program)
        printf("\n");
        printf("example: %s -w 320 200 10 10 -g noaudio c:\\loadtest.blend\n", program);
        printf("example: %s -g show_framerate = 0 c:\\loadtest.blend\n", program);
-       printf("example: %s -m 4 game.blend", program);
 }
 
 static void get_filename(int argc, char **argv, char *filename)
@@ -336,7 +334,6 @@ int main(int argc, char** argv)
        int windowHeight = 480;
        GHOST_TUns32 fullScreenWidth = 0;
        GHOST_TUns32 fullScreenHeight= 0;
-       GHOST_TUns16 aaSamples = 4;
        int fullScreenBpp = 32;
        int fullScreenFrequency = 60;
        GHOST_TEmbedderWindowID parentWindow = 0;
@@ -511,12 +508,6 @@ int main(int argc, char** argv)
                                        }
                                }
                                break;
-                       case 'm':
-                               i++;
-
-                               if ((i+1) < argc)
-                                       aaSamples = atoi(argv[i++]);
-                               break;
                                        
                        case 'h':
                                usage(argv[0]);
@@ -819,13 +810,13 @@ int main(int argc, char** argv)
                                                                if (scr_saver_mode == SCREEN_SAVER_MODE_SAVER)
                                                                {
                                                                        app.startScreenSaverFullScreen(fullScreenWidth, fullScreenHeight, fullScreenBpp, fullScreenFrequency,
-                                                                               stereoWindow, stereomode, aaSamples);
+                                                                               stereoWindow, stereomode);
                                                                }
                                                                else
 #endif
                                                                {
                                                                        app.startFullScreen(fullScreenWidth, fullScreenHeight, fullScreenBpp, fullScreenFrequency,
-                                                                               stereoWindow, stereomode, aaSamples);
+                                                                               stereoWindow, stereomode);
                                                                }
                                                        }
                                                        else
@@ -865,16 +856,16 @@ int main(int argc, char** argv)
 #ifdef WIN32
                                                                if (scr_saver_mode == SCREEN_SAVER_MODE_PREVIEW)
                                                                {
-                                                                       app.startScreenSaverPreview(scr_saver_hwnd, stereoWindow, stereomode, aaSamples);
+                                                                       app.startScreenSaverPreview(scr_saver_hwnd, stereoWindow, stereomode);
                                                                }
                                                                else
 #endif
                                                                {
                                                                                                                                                                                                                if (parentWindow != 0)
-                                                                               app.startEmbeddedWindow(title, parentWindow, stereoWindow, stereomode, aaSamples);
+                                                                               app.startEmbeddedWindow(title, parentWindow, stereoWindow, stereomode);
                                                                        else
                                                                                app.startWindow(title, windowLeft, windowTop, windowWidth, windowHeight,
-                                                                               stereoWindow, stereomode, aaSamples);
+                                                                               stereoWindow, stereomode);
                                                                }
                                                        }
                                                }
index 1d41a7bcddbb33ebe56a2e9247bf34af669d5f2b..c4af701f87be66b814843ee38f15acaf06c774d8 100644 (file)
@@ -69,10 +69,6 @@ ELSE(WITH_SDL)
        ADD_DEFINITIONS(-DDISABLE_SDL)
 ENDIF(WITH_SDL)
 
-if(WITH_DDS)
-       ADD_DEFINITIONS(-DWITH_DDS)
-ENDIF(WITH_DDS)
-
 IF(WITH_PYTHON)
        SET(INC ${INC} ${PYTHON_INC})
 ELSE(WITH_PYTHON)
index 850bf4b4ad48b20fef7d262131fac825ab6d0cd4..879bcd472c6d6227eb8d259826fb0c2040e5a76e 100644 (file)
@@ -53,8 +53,7 @@ typedef enum {
        KX_BOUNDCONE,
        KX_BOUNDMESH,
        KX_BOUNDPOLYTOPE,
-       KX_BOUND_DYN_MESH,
-       KX_BOUNDCAPSULE
+       KX_BOUND_DYN_MESH
 } KX_BoundBoxClass;
 
 struct KX_BoxBounds
index e793f9d5966cacd52b757814aabef6243b918005..44ae032179befea19588c6a91499d0b7152f6d52 100644 (file)
@@ -184,14 +184,6 @@ void       KX_ConvertBulletObject( class   KX_GameObject* gameobj,
                        bm = shapeInfo->CreateBulletShape(ci.m_margin);
                        break;
                }
-       case KX_BOUNDCAPSULE:
-               {
-                       shapeInfo->m_radius = objprop->m_boundobject.c.m_radius;
-                       shapeInfo->m_height = objprop->m_boundobject.c.m_height;
-                       shapeInfo->m_shapeType = PHY_SHAPE_CAPSULE;
-                       bm = shapeInfo->CreateBulletShape(ci.m_margin);
-                       break;
-               }
        case KX_BOUNDMESH:
                {
                        // mesh shapes can be shared, check first if we already have a shape on that mesh
index 7b0283a2efd31c414d284bf2974f12165fdee383..0198555753ecfd48dcc192179e4e30fbbab011cf 100644 (file)
@@ -628,13 +628,12 @@ static PyObject *gLibLoad(PyObject*, PyObject* args)
        KX_Scene *kx_scene= gp_KetsjiScene;
        char *path;
        char *group;
-       char *filter= "";
        char *err_str= NULL;
        
-       if (!PyArg_ParseTuple(args,"ss|s:LibLoad",&path, &group, &filter))
+       if (!PyArg_ParseTuple(args,"ss:LibLoad",&path, &group))
                return NULL;
 
-       if(kx_scene->GetSceneConverter()->LinkBlendFile(path, group, filter, kx_scene, &err_str)) {
+       if(kx_scene->GetSceneConverter()->LinkBlendFile(path, group, kx_scene, &err_str)) {
                Py_RETURN_TRUE;
        }
        
index 505d3fa10a07c00a9c0f67bed92538799cec82d6..58dc8a314bf010c57e90583bbca5992a727f9785 100644 (file)
@@ -23,9 +23,6 @@ incs += ' #source/blender/misc #source/blender/blenloader #extern/glew/include #
 incs += ' ' + env['BF_BULLET_INC']
 incs += ' ' + env['BF_OPENGL_INC']
 
-if env['WITH_BF_DDS']:
-       defs.append('WITH_DDS')
-
 if  env['WITH_BF_SDL']:
     incs += ' ' + env['BF_SDL_INC']
 else:
index ac0f61857f5a9a127796fbe6ed72d1971acff26e..fe429200dd43fb13ccf86102c8cf4a3263bf514e 100644 (file)
@@ -2027,11 +2027,6 @@ btCollisionShape* CcdShapeConstructionInfo::CreateBulletShape(btScalar margin, b
                collisionShape->setMargin(margin);
                break;
 
-       case PHY_SHAPE_CAPSULE:
-               collisionShape = new btCapsuleShapeZ(m_radius, m_height);
-               collisionShape->setMargin(margin);
-               break;
-
        case PHY_SHAPE_MESH:
                // Let's use the latest btScaledBvhTriangleMeshShape: it allows true sharing of 
                // triangle mesh information between duplicates => drastic performance increase when 
index 4b5cdd41b9a08f57c83114e461b867ac72b0b820..08d94a2850a1766ee3ad9a0ed73c68fa8ddbc854 100644 (file)
@@ -138,7 +138,6 @@ typedef enum PHY_ShapeType {
        PHY_SHAPE_SPHERE,
        PHY_SHAPE_CYLINDER,
        PHY_SHAPE_CONE,
-       PHY_SHAPE_CAPSULE,
        PHY_SHAPE_MESH,
        PHY_SHAPE_POLYTOPE,
        PHY_SHAPE_COMPOUND,
index c0e08dba9925cb387b22da5086f54c82b3668717..4527850a8e96a17426e1aaa8fdd50cab271b9413 100644 (file)
@@ -194,15 +194,6 @@ void RAS_2DFilterManager::AnalyseShader(int passindex, vector<STR_String>& propN
        {
                texflag[passindex] |= 0x2;
        }
-       if(glGetUniformLocationARB(m_filters[passindex], "bgl_QuarteredRenderTexture") != -1)
-       {
-               texflag[passindex] |= 0x4;
-       }
-       if(glGetUniformLocationARB(m_filters[passindex], "bgl_QuartedDepthTexture") != -1)
-       {
-               if(GLEW_ARB_depth_texture)
-                       texflag[passindex] |= 0x8;
-       }
 
        if(m_gameObjects[passindex])
        {
@@ -250,29 +241,6 @@ void RAS_2DFilterManager::StartShaderProgram(int passindex)
                        glUniform1iARB(uniformLoc, 2);
                }
        }
-
-       /* Send the quartered render texture to glsl program if it needs */
-       if(texflag[passindex] & 0x4){
-               uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_QuarteredRenderTexture");
-               glActiveTextureARB(GL_TEXTURE3);
-               glBindTexture(GL_TEXTURE_2D, texname[3]);
-
-               if (uniformLoc != -1)
-               {
-                       glUniform1iARB(uniformLoc, 3);
-               }
-       }
-
-       if(texflag[passindex] & 0x5){
-               uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_QuarteredDepthTexture");
-               glActiveTextureARB(GL_TEXTURE4);
-               glBindTexture(GL_TEXTURE_2D, texname[4]);
-
-               if (uniformLoc != -1)
-               {
-                       glUniform1iARB(uniformLoc, 4);
-               }
-       }
        
        uniformLoc = glGetUniformLocationARB(m_filters[passindex], "bgl_TextureCoordinateOffset");
        if (uniformLoc != -1)
@@ -309,24 +277,15 @@ void RAS_2DFilterManager::EndShaderProgram()
 
 void RAS_2DFilterManager::FreeTextures()
 {
-       // Update this when adding new textures!
-       for (int i=0; i<5; i++)
-       {
-               if(texname[i]!=(unsigned int)-1)
-                       glDeleteTextures(1, (GLuint*)&texname[i]);
-       }
-       
-       if(fbo != (unsigned int)-1)
-               glDeleteFramebuffersEXT(1, &fbo);
-       /*if(texname[0]!=(unsigned int)-1)
+       if(texname[0]!=(unsigned int)-1)
                glDeleteTextures(1, (GLuint*)&texname[0]);
        if(texname[1]!=(unsigned int)-1)
                glDeleteTextures(1, (GLuint*)&texname[1]);
        if(texname[2]!=(unsigned int)-1)
-               glDeleteTextures(1, (GLuint*)&texname[2]);*/
+               glDeleteTextures(1, (GLuint*)&texname[2]);
 }
 
-void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance, bool qrender, bool qdepth)
+void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance)
 {
        FreeTextures();
        
@@ -362,25 +321,6 @@ void RAS_2DFilterManager::SetupTextures(bool depth, bool luminance, bool qrender
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
        }
-
-       if(qrender){
-               glGenTextures(1, (GLuint*)&texname[3]);
-               glBindTexture(GL_TEXTURE_2D, texname[3]);
-               glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, texturewidth/2, textureheight/2, 0, GL_RGBA8, 
-                       GL_UNSIGNED_BYTE, 0);
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP);
-               glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP);
-
-               glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
-
-               glGenFramebuffersEXT(1, &fbo);
-               glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
-               glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_2D, texname[3], 0);
-               glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-       }
-
 }
 
 void RAS_2DFilterManager::UpdateOffsetMatrix(RAS_ICanvas* canvas)
@@ -437,8 +377,6 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
 {
        bool need_depth=false;
        bool need_luminance=false;
-       bool need_qrender=false;
-       bool need_qdepth=false;
        int num_filters = 0;
 
        int passindex;
@@ -454,11 +392,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
                                need_depth = true;
                        if(texflag[passindex] & 0x2)
                                need_luminance = true;
-                       if(texflag[passindex] & 0x4)
-                               need_qrender = true;
-                       if(texflag[passindex] & 0x8)
-                               need_qdepth = true;
-                       if(need_depth && need_luminance && need_qrender && need_qdepth)
+                       if(need_depth && need_luminance)
                                break;
                }
        }
@@ -478,7 +412,7 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
        
        if(need_tex_update)
        {
-               SetupTextures(need_depth, need_luminance, need_qrender, need_qdepth);
+               SetupTextures(need_depth, need_luminance);
                need_tex_update = false;
        }
 
@@ -494,12 +428,6 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
                glCopyTexImage2D(GL_TEXTURE_2D,0,GL_LUMINANCE16, 0, 0, texturewidth,textureheight, 0);
        }
 
-       if(need_qdepth){
-               glActiveTextureARB(GL_TEXTURE4);
-               glBindTexture(GL_TEXTURE_2D, texname[4]);
-               glCopyTexImage2D(GL_TEXTURE_2D, 1, GL_DEPTH_COMPONENT, 0, 0, texturewidth, textureheight, 0);
-       }
-
        glViewport(0,0, texturewidth, textureheight);
 
        glDisable(GL_DEPTH_TEST);
@@ -520,53 +448,6 @@ void RAS_2DFilterManager::RenderFilters(RAS_ICanvas* canvas)
                        glActiveTextureARB(GL_TEXTURE0);
                        glBindTexture(GL_TEXTURE_2D, texname[0]);
                        glCopyTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, 0, 0, texturewidth, textureheight, 0);
-                       //glGetTexImage(GL_TEXTURE_2D, 0, GL_RGBA, GL_UNSIGNED_BYTE, im_buff);
-
-                       if(need_qrender){
-                               //glActiveTextureARB(GL_TEXTURE3);
-                               //glBindTexture(GL_TEXTURE_2D, texname[3]);
-                               //glReadPixels(0, 0, texturewidth, textureheight, GL_RGB, GL_UNSIGNED_BYTE, im_buff);
-                               //gluScaleImage(GL_RGB, texturewidth, textureheight, GL_UNSIGNED_BYTE, im_buff, 
-                               //              texturewidth/2, textureheight/2, GL_UNSIGNED_BYTE, scaled_buff);
-                               //glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, texturewidth, textureheight, GL_RGBA, GL_UNSIGNED_BYTE, im_buff);
-                               glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, fbo);
-                               if(glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) == GL_FRAMEBUFFER_COMPLETE_EXT) {
-                                       glPushAttrib(GL_VIEWPORT_BIT | GL_COLOR_BUFFER_BIT);
-                                       glViewport(0, 0, texturewidth/2, textureheight/2);
-
-               /*                      glMatrixMode(GL_PROJECTION);
-                                       glPushMatrix();
-                                       glLoadIdentity();
-                                       gluOrtho2D(0, texturewidth/2, 0, textureheight/2);
-                                       glMatrixMode(GL_MODELVIEW);
-                                       glPushMatrix();
-                                       glLoadIdentity();*/
-                                       glClearColor(0, 0, 0, 1);
-
-                                       glClear(GL_COLOR_BUFFER_BIT);
-                                       /*glBindTexture(GL_TEXTURE_2D, texname[0]);
-                                       glBegin(GL_QUADS);
-                                               glColor4f(0.f, 1.f, 1.f, 1.f);
-                                               glTexCoord2f(1.f, 1.f); glVertex2f(1,1);
-                                               glTexCoord2f(0.f, 1.f); glVertex2f(-1,1);
-                                               glTexCoord2f(0.f, 0.f); glVertex2f(-1,-1);
-                                               glTexCoord2f(1.f, 0.f); glVertex2f(1,-1);
-                                       glEnd();*/
-
-                                       glFlush();      
-                                       //glPopMatrix();
-                                       //glMatrixMode(GL_PROJECTION);
-                                       //glPopMatrix();
-
-                                       glPopAttrib();
-                               } else {
-                                       printf("Could not use the framebuffer\n");
-                               }
-                               glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0);
-                               
-                       }
-
-                       glClearColor(1, 0, 1, 1);
                        glClear(GL_COLOR_BUFFER_BIT);
 
                        glBegin(GL_QUADS);
index 2519473520a4a1d4c0d907cd54d1bd44164d5920..7ff7cde788269e952de5832d189fd23a047d2494 100644 (file)
@@ -45,7 +45,7 @@ private:
        void                    EndShaderProgram();
        void                    PrintShaderErrors(unsigned int shader, const char *task, const char *code);
 
-       void SetupTextures(bool depth, bool luminance, bool qrender, bool qdepth);
+       void SetupTextures(bool depth, bool luminance);
        void FreeTextures();
 
        void UpdateOffsetMatrix(RAS_ICanvas* canvas);
@@ -54,15 +54,13 @@ private:
        float                   canvascoord[4];
        float                   textureoffsets[18];
        float                   view[4];
-       /* texname[0] contains render to texture, texname[1] contains depth texture,  texname[2] contains luminance texture
-        * texname[3] contains quartered render to texture, texname[4] contains quartered depth texture*/
-       unsigned int    texname[5]; 
+       /* texname[0] contains render to texture, texname[1] contains depth texture,  texname[2] contains luminance texture*/
+       unsigned int    texname[3]; 
        int                             texturewidth;
        int                             textureheight;
        int                             canvaswidth;
        int                             canvasheight;
        int                             numberoffilters;
-       unsigned int    fbo;
        /* bit 0: enable/disable depth texture
         * bit 1: enable/disable luminance texture*/
        short                   texflag[MAX_RENDER_PASS];
index ec5f4c4ac6de678df6476b97a0c71ee2aeab7e2d..122a738e4f3d459106e413347038af536d2e7c6e 100644 (file)
@@ -297,7 +297,6 @@ bool RAS_OpenGLRasterizer::BeginFrame(int drawingmode, double time)
        m_last_frontface = true;
 
        glShadeModel(GL_SMOOTH);
-       glEnable(GL_MULTISAMPLE_ARB);
 
        m_2DCanvas->BeginFrame();
        
@@ -383,7 +382,6 @@ void RAS_OpenGLRasterizer::EndFrame()
        FlushDebugLines();
 
        glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE);
-       glDisable(GL_MULTISAMPLE_ARB);
        m_2DCanvas->EndFrame();
 }