Merging r49815 through r49833 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Aug 2012 10:07:55 +0000 (10:07 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sun, 12 Aug 2012 10:07:55 +0000 (10:07 +0000)
87 files changed:
build_files/cmake/macros.cmake
build_files/scons/config/linux-config.py
build_files/scons/config/win32-vc-config.py
build_files/scons/config/win64-vc-config.py
build_files/scons/tools/Blender.py
build_files/scons/tools/btools.py
intern/container/CTR_HashedPtr.h
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/intern/GHOST_SystemCocoa.mm
intern/ghost/intern/GHOST_WindowCocoa.mm
intern/ghost/intern/GHOST_WindowWin32.h
intern/ghost/intern/GHOST_WindowX11.cpp
intern/guardedalloc/test/simpletest/memtest.c
intern/string/STR_String.h
release/datafiles/bfont.pfb
release/datafiles/startup.blend
source/blender/blenkernel/intern/key.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/seqcache.c
source/blender/blenkernel/intern/tracking.c
source/blender/blenkernel/intern/unit.c
source/blender/blenlib/BLI_array.h
source/blender/blenlib/BLI_kdopbvh.h
source/blender/blenlib/BLI_rect.h
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/rct.c
source/blender/blenlib/intern/scanfill.c
source/blender/blenlib/intern/string_utf8.c
source/blender/blenloader/intern/readfile.c
source/blender/bmesh/operators/bmo_create.c
source/blender/collada/ArmatureExporter.cpp
source/blender/collada/MeshImporter.cpp
source/blender/compositor/intern/COM_WorkScheduler.cpp
source/blender/compositor/operations/COM_BokehBlurOperation.cpp
source/blender/compositor/operations/COM_OpenCLKernels.cl
source/blender/datatoc/datatoc.c
source/blender/editors/include/ED_object.h
source/blender/editors/include/UI_view2d.h
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/view2d_ops.c
source/blender/editors/mesh/editface.c
source/blender/editors/object/object_bake.c
source/blender/editors/object/object_modifier.c
source/blender/editors/physics/dynamicpaint_ops.c
source/blender/editors/physics/physics_fluid.c
source/blender/editors/physics/physics_pointcache.c
source/blender/editors/render/render_internal.c
source/blender/editors/render/render_preview.c
source/blender/editors/screen/screendump.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_clip/tracking_ops.c
source/blender/editors/space_file/filelist.c
source/blender/editors/space_graph/graph_edit.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_select.c
source/blender/editors/space_node/node_view.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/drawobject.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_intern.h
source/blender/editors/space_view3d/view3d_view.c
source/blender/gpu/shaders/gpu_shader_sep_gaussian_blur_frag.glsl
source/blender/makesdna/DNA_action_types.h
source/blender/makesdna/DNA_constraint_types.h
source/blender/makesdna/DNA_view2d_types.h
source/blender/makesdna/DNA_view3d_types.h
source/blender/python/bmesh/bmesh_py_ops.c
source/blender/windowmanager/WM_api.h
source/blender/windowmanager/WM_types.h
source/blender/windowmanager/intern/wm_apple.c
source/blender/windowmanager/intern/wm_cursors.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_files.c
source/blender/windowmanager/intern/wm_init_exit.c
source/blender/windowmanager/intern/wm_jobs.c
source/blender/windowmanager/intern/wm_operators.c
source/blender/windowmanager/intern/wm_subwindow.c
source/blender/windowmanager/intern/wm_window.c
source/creator/creator.c
source/gameengine/BlenderRoutines/KX_BlenderRenderTools.cpp
source/gameengine/Expressions/PyObjectPlus.h
source/gameengine/Expressions/StringValue.h
source/gameengine/GameLogic/SCA_KeyboardSensor.cpp
source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
source/gameengine/Ketsji/KX_PythonInit.cpp

index 88dd64640b6346c35beab5ebe3e22488f54e24f5..f14e92047329d7c8a3ab7f59d86f4ef5e9b1fb24 100644 (file)
@@ -733,7 +733,6 @@ macro(set_lib_path
 endmacro()
 
 
-# TODO, create a C binary and call it instead!, doing this in cmake its slow
 macro(data_to_c
       file_from file_to
       list_to_add)
@@ -745,34 +744,32 @@ macro(data_to_c
        add_custom_command(
                OUTPUT ${file_to}
                COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
-               COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc
-                       ${file_from}
-                       ${file_to}
-               DEPENDS ${file_from})
+               COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${file_from} ${file_to}
+               DEPENDS ${file_from} datatoc)
        unset(_file_to_path)
 endmacro()
 
+
 # same as above but generates the var name and output automatic.
 macro(data_to_c_simple
       file_from
       list_to_add)
 
-       # only to avoid confusion
-       set(_file_to ${file_from}.c)
+       # remove ../'s
+       get_filename_component(_file_from ${CMAKE_CURRENT_SOURCE_DIR}/${file_from}   REALPATH)
+       get_filename_component(_file_to   ${CMAKE_CURRENT_BINARY_DIR}/${file_from}.c REALPATH)
 
-       list(APPEND ${list_to_add} ${CMAKE_CURRENT_BINARY_DIR}/${_file_to})
+       list(APPEND ${list_to_add} ${_file_to})
 
        get_filename_component(_file_to_path ${_file_to} PATH)
 
        add_custom_command(
-               OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${_file_to}
+               OUTPUT  ${_file_to}
                COMMAND ${CMAKE_COMMAND} -E make_directory ${_file_to_path}
-               COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc
-                       ${CMAKE_CURRENT_SOURCE_DIR}/${file_from}
-                       ${CMAKE_CURRENT_BINARY_DIR}/${_file_to}
-               DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${file_from})
+               COMMAND ${CMAKE_BINARY_DIR}/bin/${CMAKE_CFG_INTDIR}/datatoc ${_file_from} ${_file_to}
+               DEPENDS ${_file_from} datatoc)
 
-       unset(_var_name)
+       unset(_file_from)
        unset(_file_to)
        unset(_file_to_path)
 endmacro()
index a63000d7d7d3f041c33ea6cdb99243b2a8f92672..5c16baa2ee8d87f6abb54682e5e653fd7eef4c2d 100644 (file)
@@ -105,6 +105,11 @@ BF_BULLET = '#extern/bullet2/src'
 BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
+WITH_BF_ELTOPO = False
+BF_LAPACK = '/usr'
+BF_LAPACK_LIB = 'lapack3gf blas clapack'
+BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
+
 BF_FREETYPE = '/usr'
 BF_FREETYPE_INC = '${BF_FREETYPE}/include ${BF_FREETYPE}/include/freetype2'
 BF_FREETYPE_LIB = 'freetype'
index 1e1084a9d40d4170592740e775dfa34567d18dd7..b77ff8e70e075def7a55cb746cebce91d182d5bb 100644 (file)
@@ -101,6 +101,11 @@ BF_BULLET = '#extern/bullet2/src'
 BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
+WITH_BF_ELTOPO = False
+BF_LAPACK = LIBDIR + '/lapack'
+BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
+BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
+
 BF_WINTAB = LIBDIR + '/wintab'
 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
 
index 64c741e4bdf22f6b6c45ad4f12f718e69f330b29..4b719469c392a8e0e718807d38a4770df9bc65ed 100644 (file)
@@ -97,6 +97,11 @@ BF_BULLET = '#extern/bullet2/src'
 BF_BULLET_INC = '${BF_BULLET}'
 BF_BULLET_LIB = 'extern_bullet'
 
+WITH_BF_ELTOPO = False
+BF_LAPACK = LIBDIR + '/lapack'
+BF_LAPACK_LIB = 'libf2c clapack_nowrap BLAS_nowrap'
+BF_LAPACK_LIBPATH = '${BF_LAPACK}/lib'
+
 BF_WINTAB = LIBDIR + '/wintab'
 BF_WINTAB_INC = '${BF_WINTAB}/INCLUDE'
 
index 7b59466c4045ff332e61f95156f24c1612345ebd..40e9179f12b7cd669aa0926d32a17846a65471e5 100644 (file)
@@ -159,6 +159,10 @@ def setup_staticlibs(lenv):
         libincs += Split(lenv['BF_FFTW3_LIBPATH'])
         if lenv['WITH_BF_STATICFFTW3']:
             statlibs += Split(lenv['BF_FFTW3_LIB_STATIC'])
+    if lenv['WITH_BF_ELTOPO']:
+        libincs += Split(lenv['BF_LAPACK_LIBPATH'])
+        if lenv['WITH_BF_STATICLAPACK']:
+                   statlibs += Split(lenv['BF_LAPACK_LIB_STATIC'])        
     if lenv['WITH_BF_FFMPEG'] and lenv['WITH_BF_STATICFFMPEG']:
         statlibs += Split(lenv['BF_FFMPEG_LIB_STATIC'])
     if lenv['WITH_BF_INTERNATIONAL']:
@@ -273,6 +277,8 @@ def setup_syslibs(lenv):
         syslibs += Split(lenv['BF_SNDFILE_LIB'])
     if lenv['WITH_BF_FFTW3'] and not lenv['WITH_BF_STATICFFTW3']:
         syslibs += Split(lenv['BF_FFTW3_LIB'])
+    if lenv['WITH_BF_ELTOPO']:
+        syslibs += Split(lenv['BF_LAPACK_LIB'])
     if lenv['WITH_BF_SDL']:
         syslibs += Split(lenv['BF_SDL_LIB'])
     if not lenv['WITH_BF_STATICOPENGL']:
index 570048495a64d3d518e30e10954c77494d40e157..dbec5b3ba6c5c039dc3c1357d610bab41ebc0e01 100644 (file)
@@ -120,7 +120,7 @@ def validate_arguments(args, bc):
             'WITH_BF_ICONV', 'BF_ICONV', 'BF_ICONV_INC', 'BF_ICONV_LIB', 'BF_ICONV_LIBPATH',
             'WITH_BF_GAMEENGINE',
             'WITH_BF_BULLET', 'BF_BULLET', 'BF_BULLET_INC', 'BF_BULLET_LIB',
-            'WITH_BF_ELTOPO',
+            'WITH_BF_ELTOPO', 'BF_LAPACK', 'BF_LAPACK_LIB', 'BF_LAPACK_LIBPATH', 'BF_LAPACK_LIB_STATIC',
             'BF_WINTAB', 'BF_WINTAB_INC',
             'BF_FREETYPE', 'BF_FREETYPE_INC', 'BF_FREETYPE_LIB', 'BF_FREETYPE_LIBPATH', 'BF_FREETYPE_LIB_STATIC', 'WITH_BF_FREETYPE_STATIC',
             'WITH_BF_QUICKTIME', 'BF_QUICKTIME', 'BF_QUICKTIME_INC', 'BF_QUICKTIME_LIB', 'BF_QUICKTIME_LIBPATH',
@@ -394,7 +394,13 @@ def read_opts(env, cfg, args):
         (BoolVariable('WITH_BF_GAMEENGINE', 'Build with gameengine' , False)),
 
         (BoolVariable('WITH_BF_BULLET', 'Use Bullet if true', True)),
+        
         (BoolVariable('WITH_BF_ELTOPO', 'Use Eltopo collision library if true', False)),
+        ('BF_LAPACK', 'LAPACK base path', ''),
+        ('BF_LAPACK_LIB', 'LAPACK library', ''),
+        ('BF_LAPACK_LIB_STATIC', 'LAPACK library', ''),
+        ('BF_LAPACK_LIBPATH', 'LAPACK library path', ''),
+        (BoolVariable('WITH_BF_STATICLAPACK', 'Staticly link to LAPACK', False)),
         
         ('BF_BULLET', 'Bullet base dir', ''),
         ('BF_BULLET_INC', 'Bullet include path', ''),
index caf63f756068ed5bba8eabbe13ed077e9e121ca8..11dc37b362559c81a0b364d933529c9f14eedd7e 100644 (file)
@@ -38,7 +38,7 @@
 inline unsigned int CTR_Hash(void *inDWord)
 {
        size_t key = (size_t)inDWord;
-       return (unsigned int)(key ^ (key>>4));
+       return (unsigned int)(key ^ (key >> 4));
 }
 
 class CTR_HashedPtr
index 4cdd9384eeef73dea3de75ba75a1ada2c3851a10..bb6c90cd4314e96febbfa8726e864df0e6c0ab78 100644 (file)
@@ -860,7 +860,8 @@ int GHOST_toggleConsole(int action)
 }
 
 
-int GHOST_confirmQuit(GHOST_WindowHandle windowhandle){
+int GHOST_confirmQuit(GHOST_WindowHandle windowhandle)
+{
        GHOST_ISystem *system = GHOST_ISystem::getSystem();
        return system->confirmQuit((GHOST_IWindow *) windowhandle);
 }
index 9f08f4cff802bf29cf7a633b3874c08ade7b86de..1bffbc8eb85c6a4beb0a2793d4721cdef4f6787f 100644 (file)
@@ -1662,17 +1662,19 @@ GHOST_TSuccess GHOST_SystemCocoa::handleKeyEvent(void *eventPtr)
                case NSKeyDown:
                case NSKeyUp:
                        charsIgnoringModifiers = [event charactersIgnoringModifiers];
-                       if ([charsIgnoringModifiers length]>0)
+                       if ([charsIgnoringModifiers length] > 0) {
                                keyCode = convertKey([event keyCode],
                                                                         [charsIgnoringModifiers characterAtIndex:0],
                                                                         [event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
-                       else
+                       }
+                       else {
                                keyCode = convertKey([event keyCode],0,
                                                                         [event type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
+                       }
 
                        /* handling both unicode or ascii */
                        characters = [event characters];
-                       if ([characters length]>0) {
+                       if ([characters length] > 0) {
                                convertedCharacters = [characters dataUsingEncoding:NSUTF8StringEncoding];
                                
                                for (int x = 0; x < [convertedCharacters length]; x++) {
index ac6cc548f329f1b67454d3776b40f6bf78585563..31f91802e381e57d1dd940cdb76d08fb26b5d2b2 100644 (file)
@@ -502,7 +502,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
        
        if (stereoVisual) pixelFormatAttrsWindow[i++] = NSOpenGLPFAStereo;
        
-       if (numOfAASamples>0) {
+       if (numOfAASamples > 0) {
                // Multisample anti-aliasing
                pixelFormatAttrsWindow[i++] = NSOpenGLPFAMultisample;
                
@@ -550,7 +550,7 @@ GHOST_WindowCocoa::GHOST_WindowCocoa(
                
        }
        
-       if (numOfAASamples>0) { //Set m_numOfAASamples to the actual value
+       if (numOfAASamples > 0) { //Set m_numOfAASamples to the actual value
                GLint gli;
                [pixelFormat getValues:&gli forAttribute:NSOpenGLPFASamples forVirtualScreen:0];
                if (m_numOfAASamples != (GHOST_TUns16)gli) {
@@ -653,7 +653,7 @@ void GHOST_WindowCocoa::setTitle(const STR_String& title)
                fileStrRange.location = [windowTitle rangeOfString:@"["].location+1;
                len = [windowTitle rangeOfString:@"]"].location - fileStrRange.location;
        
-               if (len >0)
+               if (len > 0)
                {
                        fileStrRange.length = len;
                        associatedFileName = [windowTitle substringWithRange:fileStrRange];
@@ -1424,9 +1424,9 @@ GHOST_TSuccess GHOST_WindowCocoa::setWindowCursorShape(GHOST_TStandardCursor sha
 /** Reverse the bits in a GHOST_TUns8
 static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
 {
-       ch= ((ch>>1)&0x55) | ((ch<<1)&0xAA);
-       ch= ((ch>>2)&0x33) | ((ch<<2)&0xCC);
-       ch= ((ch>>4)&0x0F) | ((ch<<4)&0xF0);
+       ch= ((ch >> 1) & 0x55) | ((ch << 1) & 0xAA);
+       ch= ((ch >> 2) & 0x33) | ((ch << 2) & 0xCC);
+       ch= ((ch >> 4) & 0x0F) | ((ch << 4) & 0xF0);
        return ch;
 }
 */
@@ -1435,10 +1435,10 @@ static GHOST_TUns8 uns8ReverseBits(GHOST_TUns8 ch)
 /** Reverse the bits in a GHOST_TUns16 */
 static GHOST_TUns16 uns16ReverseBits(GHOST_TUns16 shrt)
 {
-       shrt= ((shrt>>1)&0x5555) | ((shrt<<1)&0xAAAA);
-       shrt= ((shrt>>2)&0x3333) | ((shrt<<2)&0xCCCC);
-       shrt= ((shrt>>4)&0x0F0F) | ((shrt<<4)&0xF0F0);
-       shrt= ((shrt>>8)&0x00FF) | ((shrt<<8)&0xFF00);
+       shrt = ((shrt >> 1) & 0x5555) | ((shrt << 1) & 0xAAAA);
+       shrt = ((shrt >> 2) & 0x3333) | ((shrt << 2) & 0xCCCC);
+       shrt = ((shrt >> 4) & 0x0F0F) | ((shrt << 4) & 0xF0F0);
+       shrt = ((shrt >> 8) & 0x00FF) | ((shrt << 8) & 0xFF00);
        return shrt;
 }
 
index 28ba470f75a30f5f8c31812546e81f48b10634ae..cf5a7fe808d4742f87adbb52534cd00950d3acbd 100644 (file)
@@ -344,7 +344,7 @@ protected:
        static HDC s_firstHDC;
        /** Flag for if window has captured the mouse */
        bool m_hasMouseCaptured;
-       /** Flag if an operator grabs the mouse with WM_cursor_grab/ungrab() 
+       /** Flag if an operator grabs the mouse with WM_cursor_grab_enable/ungrab() 
         * Multiple grabs must be realesed with a single ungrab*/
        bool m_hasGrabMouse;
        /** Count of number of pressed buttons */
index 3dc10d1716991a551a2c562c799450bf88b48662..17efecb4a82c31c219ef819d80aaf7800a97c91f 100644 (file)
@@ -1314,8 +1314,8 @@ validate()
  */
 
 GHOST_WindowX11::
-~GHOST_WindowX11(
-    ){
+~GHOST_WindowX11()
+{
        static Atom Primary_atom, Clipboard_atom;
        Window p_owner, c_owner;
        /*Change the owner of the Atoms to None if we are the owner*/
index fdc91730d6f316c94c2afc0a3643ec98e4e1b865..7c6a0a2d54674c09759cb2e683fb49372519749f 100644 (file)
@@ -80,7 +80,7 @@ int main (int argc, char *argv[])
        for (i = 0; i < NUM_BLOCKS; i++) {
                int blocksize = 10000;
                char tagstring[1000];
-               if (verbose >1) printf("|--* Allocating block %d\n", i);
+               if (verbose > 1) printf("|--* Allocating block %d\n", i);
                sprintf(tagstring,"Memblock no. %d : ", i);
                p[i]= MEM_callocN(blocksize, strdup(tagstring));
        }
@@ -112,7 +112,7 @@ int main (int argc, char *argv[])
        for (i = 0; i < NUM_BLOCKS; i++) {
                int blocksize = 10000;
                char tagstring[1000];
-               if (verbose >1) printf("|--* Allocating block %d\n", i);
+               if (verbose > 1) printf("|--* Allocating block %d\n", i);
                sprintf(tagstring,"Memblock no. %d : ", i);
                p[i]= MEM_callocN(blocksize, strdup(tagstring));
        }
index 1705d7855e09d9108b660aeffcdc70d2ccad45bf..98de5be9647c7981aeefe543527bc3f0f6d46607 100644 (file)
@@ -102,7 +102,7 @@ public:
        // Properties
        bool                            IsUpper() const;
        bool                            IsLower() const;
-       inline bool                     IsEmpty() const                                                         { return Len==0; }
+       inline bool                     IsEmpty() const                                                         { return Len == 0; }
        inline int                      Length() const                                                          { return Len; }
 
        // Data access
@@ -122,8 +122,8 @@ public:
        // Comparison
        int                                     Compare(rcSTR_String rhs) const;
        int                                     CompareNoCase(rcSTR_String rhs) const;
-       inline bool                     IsEqual(rcSTR_String rhs) const                                 { return (Compare(rhs)==0); }
-       inline bool                     IsEqualNoCase(rcSTR_String rhs) const                   { return (CompareNoCase(rhs)==0); }
+       inline bool                     IsEqual(rcSTR_String rhs) const                                 { return (Compare(rhs) == 0); }
+       inline bool                     IsEqualNoCase(rcSTR_String rhs) const                   { return (CompareNoCase(rhs) == 0); }
 
        // Search/replace
        int                                     Find(char c, int pos = 0) const;
@@ -178,12 +178,12 @@ public:
        inline friend bool operator>=(rcSTR_String     lhs, rcSTR_String     rhs)       { return (strcmp(lhs, rhs)>=0); }
        inline friend bool operator>=(rcSTR_String     lhs, const char      *rhs)       { return (strcmp(lhs, rhs)>=0); }
        inline friend bool operator>=(const char      *lhs, rcSTR_String     rhs)       { return (strcmp(lhs, rhs)>=0); }
-       inline friend bool operator==(rcSTR_String     lhs, rcSTR_String     rhs)       { return ((lhs.Length() == rhs.Length()) && (memcmp(lhs, rhs, lhs.Length())==0)); }
-       inline friend bool operator==(rcSTR_String     lhs, const char      *rhs)       { return (memcmp(lhs, rhs, lhs.Length()+1)==0); }
-       inline friend bool operator==(const char      *lhs, rcSTR_String     rhs)       { return (memcmp(lhs, rhs, rhs.Length()+1)==0); }
+       inline friend bool operator==(rcSTR_String     lhs, rcSTR_String     rhs)       { return ((lhs.Length() == rhs.Length()) && (memcmp(lhs, rhs, lhs.Length()) == 0)); }
+       inline friend bool operator==(rcSTR_String     lhs, const char      *rhs)       { return (memcmp(lhs, rhs, lhs.Length() + 1) == 0); }
+       inline friend bool operator==(const char      *lhs, rcSTR_String     rhs)       { return (memcmp(lhs, rhs, rhs.Length() + 1) == 0); }
        inline friend bool operator!=(rcSTR_String     lhs, rcSTR_String     rhs)       { return ((lhs.Length() != rhs.Length()) || (memcmp(lhs, rhs, lhs.Length())!=0)); }
-       inline friend bool operator!=(rcSTR_String     lhs, const char      *rhs)       { return (memcmp(lhs, rhs, lhs.Length()+1)!=0); }
-       inline friend bool operator!=(const char       *lhs, rcSTR_String    rhs)       { return (memcmp(lhs, rhs, rhs.Length()+1)!=0); }
+       inline friend bool operator!=(rcSTR_String     lhs, const char      *rhs)       { return (memcmp(lhs, rhs, lhs.Length() + 1) != 0); }
+       inline friend bool operator!=(const char       *lhs, rcSTR_String    rhs)       { return (memcmp(lhs, rhs, rhs.Length() + 1) != 0); }
 
        // serializing
        //int                   Serialize(pCStream stream);
index 364194d9ff11683177366930e51cbad6b9914311..8faffc3902d7f7b0086367a53f3a64fb16853a20 100644 (file)
Binary files a/release/datafiles/bfont.pfb and b/release/datafiles/bfont.pfb differ
index f8231c2da9bb377f2128cb4e9379a10c213fd4a1..6f6c6646e3193e10273a2763ff5f9a9edc5d9a82 100644 (file)
Binary files a/release/datafiles/startup.blend and b/release/datafiles/startup.blend differ
index bed70bbd7808595485263474b4aff0b8aa1b0be8..60be0a60dcb9d1bb64558809b1e3589d0549fe15 100644 (file)
@@ -377,7 +377,7 @@ static int setkeys(float fac, ListBase *lb, KeyBlock *k[], float t[4], int cycl)
        k1 = k[0] = k[1] = k[2] = k[3] = firstkey;
        t[0] = t[1] = t[2] = t[3] = k1->pos;
 
-       /* if (fac<0.0 || fac>1.0) return 1; */
+       /* if (fac < 0.0 || fac > 1.0) return 1; */
 
        if (k1->next == NULL) return 1;
 
index b5bb6b76c614fa03cc362021374a236de35be9cd..c440d21f56d364adfa3472927415055cb1be8e8d 100644 (file)
@@ -717,7 +717,7 @@ void sca_move_sensor(bSensor *sens_to_move, Object *ob, int move_up)
        if (!sens) return;
 
        /* move up */
-       if ( val==1 && sens->prev) {
+       if (val == 1 && sens->prev) {
                for (tmp=sens->prev; tmp; tmp=tmp->prev) {
                        if (tmp->flag & SENS_VISIBLE)
                                break;
@@ -728,7 +728,7 @@ void sca_move_sensor(bSensor *sens_to_move, Object *ob, int move_up)
                }
        }
        /* move down */
-       else if ( val==2 && sens->next) {
+       else if (val == 2 && sens->next) {
                for (tmp=sens->next; tmp; tmp=tmp->next) {
                        if (tmp->flag & SENS_VISIBLE)
                                break;
@@ -756,7 +756,7 @@ void sca_move_controller(bController *cont_to_move, Object *ob, int move_up)
        if (!cont) return;
 
        /* move up */
-       if ( val==1 && cont->prev) {
+       if (val == 1 && cont->prev) {
                /* locate the controller that has the same state mask but is earlier in the list */
                tmp = cont->prev;
                while (tmp) {
@@ -771,7 +771,7 @@ void sca_move_controller(bController *cont_to_move, Object *ob, int move_up)
        }
 
        /* move down */
-       else if ( val==2 && cont->next) {
+       else if (val == 2 && cont->next) {
                tmp = cont->next;
                while (tmp) {
                        if (tmp->state_mask & cont->state_mask) 
@@ -799,7 +799,7 @@ void sca_move_actuator(bActuator *act_to_move, Object *ob, int move_up)
        if (!act) return;
 
        /* move up */
-       if ( val==1 && act->prev) {
+       if (val == 1 && act->prev) {
                /* locate the first visible actuators before this one */
                for (tmp = act->prev; tmp; tmp=tmp->prev) {
                        if (tmp->flag & ACT_VISIBLE)
@@ -811,7 +811,7 @@ void sca_move_actuator(bActuator *act_to_move, Object *ob, int move_up)
                }
        }
        /* move down */
-       else if ( val==2 && act->next) {
+       else if (val == 2 && act->next) {
                /* locate the first visible actuators after this one */
                for (tmp=act->next; tmp; tmp=tmp->next) {
                        if (tmp->flag & ACT_VISIBLE)
index a4ea5d1fb2634548e723a904d51d10f78ce9b1f0..387ec67eb1cccd50465a945e7b9e37360c15867f 100644 (file)
@@ -180,7 +180,8 @@ static int seqcache_key_check_seq(void *userkey, void *userdata)
 
 void BKE_sequencer_cache_cleanup_sequence(Sequence *seq)
 {
-       IMB_moviecache_cleanup(moviecache, seqcache_key_check_seq, seq);
+       if (moviecache)
+               IMB_moviecache_cleanup(moviecache, seqcache_key_check_seq, seq);
 }
 
 struct ImBuf *BKE_sequencer_cache_get(SeqRenderData context, Sequence *seq, float cfra, seq_stripelem_ibuf_t type)
index 693f6fc1057ed9ad10ebe3c422a30c60a1155cd2..78e7dab045f5b65b51f8e444b7015427770c188d 100644 (file)
@@ -2449,7 +2449,7 @@ int BKE_tracking_context_step(MovieTrackingContext *context)
        frame_width = destination_ibuf->x;
        frame_height = destination_ibuf->y;
 
-       #pragma omp parallel for private(a) shared(destination_ibuf, ok) if (map_size>1)
+       #pragma omp parallel for private(a) shared(destination_ibuf, ok) if (map_size > 1)
        for (a = 0; a < map_size; a++) {
                TrackContext *track_context = NULL;
                MovieTrackingTrack *track;
index df4d2d8cc385d99a1e3df817620877a09329e934..da5e7ff3db708dd9f8371ecc61428b101e0aeb50 100644 (file)
@@ -180,13 +180,13 @@ static struct bUnitDef buMetricVolDef[] = {
 static struct bUnitCollection buMetricVolCollecton = {buMetricVolDef, 3, 0, sizeof(buMetricVolDef) / sizeof(bUnitDef)};
 
 static struct bUnitDef buImperialVolDef[] = {
-       {"cubic mile", "cubic miles",       "cu mi", "cu m", "Cubic Miles", UN_SC_MI * UN_SC_MI * UN_SC_MI, 0.0,     B_UNIT_DEF_NONE},
-       {"cubic furlong", "cubic furlongs", "cu fur", NULL,  "Cubic Furlongs", UN_SC_FUR * UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
-       {"cubic chain", "cubic chains",     "cu ch", NULL,   "Cubic Chains", UN_SC_CH * UN_SC_CH * UN_SC_CH, 0.0,    B_UNIT_DEF_SUPPRESS},
-       {"cubic yard", "cubic yards",       "cu yd", NULL,   "Cubic Yards", UN_SC_YD * UN_SC_YD * UN_SC_YD, 0.0,     B_UNIT_DEF_NONE},
-       {"cubic foot", "cubic feet",        "cu ft", NULL,   "Cubic Feet", UN_SC_FT * UN_SC_FT * UN_SC_FT, 0.0,      B_UNIT_DEF_NONE}, /* base unit */
-       {"cubic inch", "cubic inches",      "cu in", NULL ,  "Cubic Inches", UN_SC_IN * UN_SC_IN * UN_SC_IN, 0.0,    B_UNIT_DEF_NONE},
-       {"cubic thou", "cubic thous",       "cu mil", NULL,  "Cubic Thous", UN_SC_MIL * UN_SC_MIL * UN_SC_MIL, 0.0,  B_UNIT_DEF_NONE},
+       {"cubic mile", "cubic miles",       "cu mi",  "cu m", "Cubic Miles", UN_SC_MI * UN_SC_MI * UN_SC_MI, 0.0,     B_UNIT_DEF_NONE},
+       {"cubic furlong", "cubic furlongs", "cu fur", NULL,   "Cubic Furlongs", UN_SC_FUR * UN_SC_FUR * UN_SC_FUR, 0.0, B_UNIT_DEF_SUPPRESS},
+       {"cubic chain", "cubic chains",     "cu ch",  NULL,   "Cubic Chains", UN_SC_CH * UN_SC_CH * UN_SC_CH, 0.0,    B_UNIT_DEF_SUPPRESS},
+       {"cubic yard", "cubic yards",       "cu yd",  NULL,   "Cubic Yards", UN_SC_YD * UN_SC_YD * UN_SC_YD, 0.0,     B_UNIT_DEF_NONE},
+       {"cubic foot", "cubic feet",        "cu ft",  NULL,   "Cubic Feet", UN_SC_FT * UN_SC_FT * UN_SC_FT, 0.0,      B_UNIT_DEF_NONE}, /* base unit */
+       {"cubic inch", "cubic inches",      "cu in",  NULL,   "Cubic Inches", UN_SC_IN * UN_SC_IN * UN_SC_IN, 0.0,    B_UNIT_DEF_NONE},
+       {"cubic thou", "cubic thous",       "cu mil", NULL,   "Cubic Thous", UN_SC_MIL * UN_SC_MIL * UN_SC_MIL, 0.0,  B_UNIT_DEF_NONE},
        {NULL, NULL, NULL, NULL, NULL, 0.0, 0.0}
 };
 static struct bUnitCollection buImperialVolCollecton = {buImperialVolDef, 4, 0, sizeof(buImperialVolDef) / sizeof(bUnitDef)};
index 32c2d5b9dc7b8a268f78fea959869e54a1535565..84cfe89f1b8fd21553599800d4ccaf89fde13214 100644 (file)
@@ -46,7 +46,7 @@
  * BLI_array_declare(arr);
  * int i;
  *
- * for (i=0; i<10; i++) {
+ * for (i = 0; i < 10; i++) {
  *     BLI_array_grow_one(arr);
  *     arr[i] = something;
  * }
index a2957b328242f3165cfc311b89349057d3828e68..985b5af3b9487011a41171dbc4d99f6738a0e10e 100644 (file)
@@ -50,7 +50,7 @@ typedef struct BVHTreeOverlap {
 } BVHTreeOverlap;
 
 /* flags */
-#define BVH_ONQUAD (1<<0)
+#define BVH_ONQUAD (1 << 0)
 
 typedef struct BVHTreeNearest {
        int index;          /* the index of the nearest found (untouched if none is found within a dist radius from the given coordinates) */
index 1c06e107c1fd2716f132123d0408053c25602998..55ab961cc534e19b9cc4679ca882e2ce040b4cd5 100644 (file)
@@ -53,6 +53,10 @@ void BLI_rctf_translate(struct rctf *rect, float x, float y);
 void BLI_rcti_translate(struct rcti *rect, int x, int y);
 void BLI_rcti_resize(struct rcti *rect, int x, int y);
 void BLI_rctf_resize(struct rctf *rect, float x, float y);
+void BLI_rctf_interp(struct rctf *rect, const struct rctf *rect_a, const struct rctf *rect_b, const float fac);
+//void BLI_rcti_interp(struct rctf *rect, struct rctf *rect_a, struct rctf *rect_b, float fac);
+int  BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, const float limit);
+int  BLI_rcti_compare(const struct rcti *rect_a, const struct rcti *rect_b);
 int  BLI_in_rcti(const struct rcti *rect, const int x, const int y);
 int  BLI_in_rcti_v(const struct rcti *rect, const int xy[2]);
 int  BLI_in_rctf(const struct rctf *rect, const float x, const float y);
index 5d3a658b206089d2b11ea24be62c3fc2033d5456..7d405ecda9cb78b18bd45443da3b976acf1882c2 100644 (file)
@@ -733,7 +733,7 @@ int isect_ray_tri_v3(const float p1[3], const float d[3],
        cross_v3_v3v3(p, d, e2);
        a = dot_v3v3(e1, p);
        /* note: these values were 0.000001 in 2.4x but for projection snapping on
-        * a human head (1BU==1m), subsurf level 2, this gave many errors - campbell */
+        * a human head (1BU == 1m), subsurf level 2, this gave many errors - campbell */
        if ((a > -0.00000001f) && (a < 0.00000001f)) return 0;
        f = 1.0f / a;
 
@@ -772,7 +772,7 @@ int isect_ray_plane_v3(const float p1[3], const float d[3],
        cross_v3_v3v3(p, d, e2);
        a = dot_v3v3(e1, p);
        /* note: these values were 0.000001 in 2.4x but for projection snapping on
-        * a human head (1BU==1m), subsurf level 2, this gave many errors - campbell */
+        * a human head (1BU == 1m), subsurf level 2, this gave many errors - campbell */
        if ((a > -0.00000001f) && (a < 0.00000001f)) return 0;
        f = 1.0f / a;
 
index 68a00d814441a85249776fd765e66a0d7943ccf4..e22becddfd6683395bbf6054c7b6430a55477e3b 100644 (file)
@@ -270,6 +270,39 @@ void BLI_rctf_resize(rctf *rect, float x, float y)
        rect->ymax = rect->ymin + y;
 }
 
+void BLI_rctf_interp(rctf *rect, const rctf *rect_a, const rctf *rect_b, const float fac)
+{
+       const float ifac = 1.0f - fac;
+       rect->xmin = (rect_a->xmin * ifac) + (rect_b->xmin * fac);
+       rect->xmax = (rect_a->xmax * ifac) + (rect_b->xmax * fac);
+       rect->ymin = (rect_a->ymin * ifac) + (rect_b->ymin * fac);
+       rect->ymax = (rect_a->ymax * ifac) + (rect_b->ymax * fac);
+}
+
+/* BLI_rcti_interp() not needed yet */
+
+int BLI_rctf_compare(const struct rctf *rect_a, const struct rctf *rect_b, const float limit)
+{
+       if (fabsf(rect_a->xmin - rect_b->xmin) < limit)
+               if (fabsf(rect_a->xmax - rect_b->xmax) < limit)
+                       if (fabsf(rect_a->ymin - rect_b->ymin) < limit)
+                               if (fabsf(rect_a->ymax - rect_b->ymax) < limit)
+                                       return 1;
+
+       return 0;
+}
+
+int BLI_rcti_compare(const struct rcti *rect_a, const struct rcti *rect_b)
+{
+       if (rect_a->xmin == rect_b->xmin)
+               if (rect_a->xmax == rect_b->xmax)
+                       if (rect_a->ymin == rect_b->ymin)
+                               if (rect_a->ymax == rect_b->ymax)
+                                       return 1;
+
+       return 0;
+}
+
 int BLI_rctf_isect(const rctf *src1, const rctf *src2, rctf *dest)
 {
        float xmin, xmax;
index 2519137013092a1f8c4271d9ba227652007d0e0f..4ce718aeb1645a842efc5218ec4cedaee107283b 100644 (file)
@@ -415,7 +415,7 @@ static short boundinsideEV(ScanFillEdge *eed, ScanFillVert *eve)
 
 static void testvertexnearedge(ScanFillContext *sf_ctx)
 {
-       /* only vertices with ->h==1 are being tested for
+       /* only vertices with (->h == 1) are being tested for
         * being close to an edge, if true insert */
 
        ScanFillVert *eve;
@@ -947,7 +947,7 @@ int BLI_scanfill_calc_ex(ScanFillContext *sf_ctx, const short do_quad_tri_speedu
                return 0;
        }
        
-       /* does it only for vertices with ->h==1 */
+       /* does it only for vertices with (->h == 1) */
        testvertexnearedge(sf_ctx);
 
        ok = 1;
index 8047de2eecaa9481389066eb9e2f1f937daeb4ac..f5c09791a68b9ccd652d149836857d95a059d655 100644 (file)
@@ -234,7 +234,7 @@ size_t BLI_wstrlen_utf8(const wchar_t *src)
 // utf8slen
 size_t BLI_strlen_utf8(const char *strc)
 {
-       int len=0;
+       int len = 0;
 
        while (*strc) {
                if ((*strc & 0xe0) == 0xc0) {
@@ -259,7 +259,7 @@ size_t BLI_strlen_utf8(const char *strc)
 
 size_t BLI_strncpy_wchar_from_utf8(wchar_t *dst_w, const char *src_c, const size_t maxcpy)
 {
-       int len=0;
+       int len = 0;
 
        if (dst_w == NULL || src_c == NULL) {
                return 0;
index c235034bccbe6dd45e48e39ea449f365396c89fd..74decee6c259bb6a01cfc6158835d115f3b3fcf7 100644 (file)
@@ -5725,6 +5725,7 @@ static void direct_link_region(FileData *fd, ARegion *ar, int spacetype)
        ar->v2d.tab_offset = NULL;
        ar->v2d.tab_num = 0;
        ar->v2d.tab_cur = 0;
+       ar->v2d.sms = NULL;
        ar->handlers.first = ar->handlers.last = NULL;
        ar->uiblocks.first = ar->uiblocks.last = NULL;
        ar->headerstr = NULL;
index 5fec9f259eeb39df51d549b59c431a32e380c8c7..db09c5f3d274ce150bf139d6798f9cae8428a508 100644 (file)
@@ -364,7 +364,7 @@ static void init_rotsys(BMesh *bm, EdgeData *edata, VertData *vdata)
        /* BLI_array_staticdeclare(verts, BM_NGON_STACK_SIZE); */ /* UNUSE */
        int i;
        
-#define SIGN(n) ((n)<0.0f)
+#define SIGN(n) ((n) < 0.0f)
        
        BM_ITER_MESH (v, &iter, bm, BM_VERTS_OF_MESH) {
                BMIter eiter;
index c5feb62fd8035a4349c3523963db659cedaf67a3..30e9baccbf1418ae29e24f590c6d8ca54f52bc30 100644 (file)
@@ -189,7 +189,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
 
 #if 0
                if (bone->childbase.first == NULL || BLI_countlist(&(bone->childbase)) >= 2) {
-                       add_blender_leaf_bone( bone, ob_arm , node );
+                       add_blender_leaf_bone( bone, ob_arm, node);
                }
                else {
 #endif
index ded937bf8f318f414afd066c5248eaed19aeae42..8ee30f691eedf4a9eb2376a4b149fd26eff395db 100644 (file)
@@ -467,12 +467,13 @@ bool MeshImporter::primitive_has_faces(COLLADAFW::MeshPrimitive *mp) {
 }
 
 // =================================================================
-// Return the number of faces by summing up 
+// Return the number of faces by summing up
 // the facecounts of the parts.
 // hint: This is done because mesh->getFacesCount() does
 // count loose edges as extra faces, which is not what we want here.
 // =================================================================
-void MeshImporter::allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris) {
+void MeshImporter::allocate_face_data(COLLADAFW::Mesh *mesh, Mesh *me, int new_tris)
+{
        COLLADAFW::MeshPrimitiveArray& prim_arr = mesh->getMeshPrimitives();
        int total_facecount = 0;
 
index 6b32645c48b52217b1fc817761000fe5ec25bcaa..61b18a6daf4f1688f0af0a884072d886890113c7 100644 (file)
@@ -72,8 +72,8 @@ static bool g_openclActive = false;
 #define MAX_HIGHLIGHT 8
 extern "C" {
 int g_highlightIndex;
-void ** g_highlightedNodes;
-void ** g_highlightedNodesRead;
+void **g_highlightedNodes;
+void **g_highlightedNodesRead;
 
 #define HIGHLIGHT(wp) \
 { \
@@ -282,7 +282,7 @@ void WorkScheduler::initialize()
                        cl_platform_id platform = platforms[indexPlatform];
                        cl_uint numberOfDevices = 0;
                        clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, 0, 0, &numberOfDevices);
-                       if (numberOfDevices>0) {
+                       if (numberOfDevices > 0) {
                                cl_device_id *cldevices = new cl_device_id[numberOfDevices];
                                clGetDeviceIDs(platform, CL_DEVICE_TYPE_GPU, numberOfDevices, cldevices, 0);
 
index b31974487edf9c55d0797dcdcaa80248c754aa80..1c91af2a7a354737e5944e35bc3ffc549575c93e 100644 (file)
@@ -92,7 +92,7 @@ void BokehBlurOperation::executePixel(float output[4], int x, int y, void *data)
                int pixelSize = this->m_size * max_dim / 100.0f;
                zero_v4(color_accum);
 
-               if (pixelSize<2) {
+               if (pixelSize < 2) {
                        this->m_inputProgram->read(color_accum, x, y, COM_PS_NEAREST);
                        multiplier_accum[0] = 1.0f;
                        multiplier_accum[1] = 1.0f;
index 7366db19444e2f4f728dde985945a9b5e5804055..4d366a864c46b2b7f1b2874b11fef6cc17272306 100644 (file)
@@ -78,7 +78,7 @@ __kernel void bokehBlurKernel(__read_only image2d_t boundingBox, __read_only ima
 __kernel void defocusKernel(__read_only image2d_t inputImage, __read_only image2d_t bokehImage, 
                                        __read_only image2d_t inputSize,
                                        __write_only image2d_t output, int2 offsetInput, int2 offsetOutput, 
-                                       int step, int maxBlurScalar, float threshold, int2 dimension, int2 offset, float scalar
+                                       int step, int maxBlurScalar, float threshold, float scalar, int2 dimension, int2 offset
 {
        float4 color = {1.0f, 0.0f, 0.0f, 1.0f};
        int2 coords = {get_global_id(0), get_global_id(1)};
index 7a4e51932a2fc67a731c39bda73ed875b7d17d0b..d074917a545dcce0b6dbbac164e7f30d0385a5c4 100644 (file)
@@ -104,9 +104,11 @@ int main(int argc, char **argv)
        fprintf(fpout, "int datatoc_%s_size = %s;\n", argv[1], sizest);
        fprintf(fpout, "char datatoc_%s[] = {\n", argv[1]);
        while (size--) {
+#ifdef VERBOSE
                if (size % 32 == 31) {
                        fprintf(fpout, "\n");
                }
+#endif
 
                /* fprintf (fpout, "\\x%02x", getc(fpin)); */
                fprintf(fpout, "%3d,", getc(fpin));
index d876d311d3023bef9480f5610df98b7c8fcb6c92..a08db8072f25bb25f0ea5592fbed3605cab5ed6f 100644 (file)
@@ -103,7 +103,7 @@ void ED_base_object_activate(struct bContext *C, struct Base *base);
 
 void ED_base_object_free_and_unlink(struct Main *bmain, struct Scene *scene, struct Base *base);
 
-/* single object duplicate, if dupflag==0, fully linked, else it uses the flags given */
+/* single object duplicate, if (dupflag == 0), fully linked, else it uses the flags given */
 struct Base *ED_object_add_duplicate(struct Main *bmain, struct Scene *scene, struct Base *base, int dupflag);
 
 void ED_object_parent(struct Object *ob, struct Object *parent, int type, const char *substr);
index f0bdb2fc2ea6becac1ebaaa3d53842588b66c9b8..9ab024a8b76b5458c6c3ac5377b8a45cbdb15ad0 100644 (file)
@@ -202,5 +202,8 @@ void UI_view2d_text_cache_draw(struct ARegion *ar);
 void UI_view2d_operatortypes(void);
 void UI_view2d_keymap(struct wmKeyConfig *keyconf);
 
+void UI_view2d_smooth_view(struct bContext *C, struct ARegion *ar,
+                                                  const struct rctf *cur);
+
 #endif /* __UI_VIEW2D_H__ */
 
index ce9e63076fb0d69ea1b153b5fc7e264c056db014..90f8bb5282672ddc3ac4e50a48e868303ee01db6 100644 (file)
@@ -2094,7 +2094,7 @@ static void ui_blockopen_begin(bContext *C, uiBut *but, uiHandleButtonData *data
        }
 
        /* this makes adjacent blocks auto open from now on */
-       //if (but->block->auto_open==0) but->block->auto_open= 1;
+       //if (but->block->auto_open ==0 ) but->block->auto_open = 1;
 }
 
 static void ui_blockopen_end(bContext *C, uiBut *but, uiHandleButtonData *data)
@@ -3395,7 +3395,7 @@ static void ui_ndofedit_but_HSVCIRCLE(uiBut *but, uiHandleButtonData *data, wmND
        /* Convert current color on hue/sat disc to circular coordinates phi, r */
        phi = fmodf(hsv[0] + 0.25f, 1.0f) * -2.0f * (float)M_PI;
        r = hsv[1];
-       /* sqr= r>0.f?sqrtf(r):1; */ /* UNUSED */
+       /* sqr = r > 0.0f ? sqrtf(r) : 1; */ /* UNUSED */
        
        /* Convert to 2d vectors */
        v[0] = r * cosf(phi);
@@ -5222,13 +5222,13 @@ static void button_activate_state(bContext *C, uiBut *but, uiHandleButtonState s
        /* number editing */
        if (state == BUTTON_STATE_NUM_EDITING) {
                if (ui_is_a_warp_but(but))
-                       WM_cursor_grab(CTX_wm_window(C), TRUE, TRUE, NULL);
+                       WM_cursor_grab_enable(CTX_wm_window(C), TRUE, TRUE, NULL);
                ui_numedit_begin(but, data);
        }
        else if (data->state == BUTTON_STATE_NUM_EDITING) {
                ui_numedit_end(but, data);
                if (ui_is_a_warp_but(but))
-                       WM_cursor_ungrab(CTX_wm_window(C));
+                       WM_cursor_grab_disable(CTX_wm_window(C));
        }
        /* menu open */
        if (state == BUTTON_STATE_MENU_OPEN)
index c70f661cb14b6b60c8c0283c6e3012ad4ce7482a..5b5ccc0582c22caabbfd98acc79b1911069f5a2c 100644 (file)
@@ -1100,6 +1100,7 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
        ARegion *ar = CTX_wm_region(C);
        View2D *v2d = &ar->v2d;
        rctf rect;
+       rctf cur_new = v2d->cur;
        int gesture_mode;
        
        /* convert coordinates of rect to 'tot' rect coordinates */
@@ -1116,12 +1117,12 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
                 *        if zoom is allowed to be changed
                 */
                if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) {
-                       v2d->cur.xmin = rect.xmin;
-                       v2d->cur.xmax = rect.xmax;
+                       cur_new.xmin = rect.xmin;
+                       cur_new.xmax = rect.xmax;
                }
                if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) {
-                       v2d->cur.ymin = rect.ymin;
-                       v2d->cur.ymax = rect.ymax;
+                       cur_new.ymin = rect.ymin;
+                       cur_new.ymax = rect.ymax;
                }
        }
        else { /* if (gesture_mode == GESTURE_MODAL_OUT) */
@@ -1135,29 +1136,24 @@ static int view_borderzoom_exec(bContext *C, wmOperator *op)
                
                /* TODO: is this zoom factor calculation valid? It seems to produce same results everytime... */
                if ((v2d->keepzoom & V2D_LOCKZOOM_X) == 0) {
-                       size = (v2d->cur.xmax - v2d->cur.xmin);
+                       size = (cur_new.xmax - cur_new.xmin);
                        zoom = size / (rect.xmax - rect.xmin);
-                       center = (v2d->cur.xmax + v2d->cur.xmin) * 0.5f;
+                       center = (cur_new.xmax + cur_new.xmin) * 0.5f;
                        
-                       v2d->cur.xmin = center - (size * zoom);
-                       v2d->cur.xmax = center + (size * zoom);
+                       cur_new.xmin = center - (size * zoom);
+                       cur_new.xmax = center + (size * zoom);
                }
                if ((v2d->keepzoom & V2D_LOCKZOOM_Y) == 0) {
-                       size = (v2d->cur.ymax - v2d->cur.ymin);
+                       size = (cur_new.ymax - cur_new.ymin);
                        zoom = size / (rect.ymax - rect.ymin);
-                       center = (v2d->cur.ymax + v2d->cur.ymin) * 0.5f;
+                       center = (cur_new.ymax + cur_new.ymin) * 0.5f;
                        
-                       v2d->cur.ymin = center - (size * zoom);
-                       v2d->cur.ymax = center + (size * zoom);
+                       cur_new.ymin = center - (size * zoom);
+                       cur_new.ymax = center + (size * zoom);
                }
        }
        
-       /* validate that view is in valid configuration after this operation */
-       UI_view2d_curRect_validate(v2d);
-       
-       /* request updates to be done... */
-       ED_region_tag_redraw(ar);
-       UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
+       UI_view2d_smooth_view(C, ar, &cur_new);
        
        return OPERATOR_FINISHED;
 } 
@@ -1181,6 +1177,127 @@ static void VIEW2D_OT_zoom_border(wmOperatorType *ot)
        WM_operator_properties_gesture_border(ot, FALSE);
 }
 
+/* ********************************************************* */
+/* SMOOTH VIEW */
+
+struct SmoothView2DStore {
+       rctf orig_cur, new_cur;
+
+       double time_allowed;
+};
+
+/* will start timer if appropriate */
+/* the arguments are the desired situation */
+void UI_view2d_smooth_view(bContext *C, ARegion *ar,
+                                                  const rctf *cur)
+{
+       wmWindowManager *wm = CTX_wm_manager(C);
+       wmWindow *win = CTX_wm_window(C);
+
+       View2D *v2d = &ar->v2d;
+       struct SmoothView2DStore sms = {{0}};
+       short ok = FALSE;
+
+       /* initialize sms */
+       sms.new_cur = v2d->cur;
+
+       /* store the options we want to end with */
+       if (cur) sms.new_cur = *cur;
+
+       if (C && U.smooth_viewtx) {
+               int changed = 0; /* zero means no difference */
+
+               if (BLI_rctf_compare(&sms.new_cur, &v2d->cur, FLT_EPSILON) == FALSE)
+                       changed = 1;
+               changed=1;
+
+               /* The new view is different from the old one
+                * so animate the view */
+               if (changed) {
+                       sms.orig_cur = v2d->cur;
+
+                       sms.time_allowed = (double)U.smooth_viewtx / 1000.0;
+
+                       /* keep track of running timer! */
+                       if (v2d->sms == NULL)
+                               v2d->sms = MEM_mallocN(sizeof(struct SmoothView2DStore), "smoothview v2d");
+                       *v2d->sms = sms;
+                       if (v2d->smooth_timer)
+                               WM_event_remove_timer(wm, win, v2d->smooth_timer);
+                       /* TIMER1 is hardcoded in keymap */
+                       v2d->smooth_timer = WM_event_add_timer(wm, win, TIMER1, 1.0 / 100.0); /* max 30 frs/sec */
+
+                       ok = TRUE;
+               }
+       }
+
+       /* if we get here nothing happens */
+       if (ok == FALSE) {
+               v2d->cur = sms.new_cur;
+
+               UI_view2d_curRect_validate(v2d);
+               ED_region_tag_redraw(ar);
+               UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
+       }
+}
+
+/* only meant for timer usage */
+static int view2d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent *event)
+{
+       ARegion *ar = CTX_wm_region(C);
+       View2D *v2d = &ar->v2d;
+       struct SmoothView2DStore *sms = v2d->sms;
+       float step;
+
+       /* escape if not our timer */
+       if (v2d->smooth_timer == NULL || v2d->smooth_timer != event->customdata)
+               return OPERATOR_PASS_THROUGH;
+
+       if (sms->time_allowed != 0.0)
+               step = (float)((v2d->smooth_timer->duration) / sms->time_allowed);
+       else
+               step = 1.0f;
+
+       /* end timer */
+       if (step >= 1.0f) {
+               v2d->cur = sms->new_cur;
+
+               MEM_freeN(v2d->sms);
+               v2d->sms = NULL;
+
+               WM_event_remove_timer(CTX_wm_manager(C), CTX_wm_window(C), v2d->smooth_timer);
+               v2d->smooth_timer = NULL;
+       }
+       else {
+               /* ease in/out */
+               step = (3.0f * step * step - 2.0f * step * step * step);
+
+               BLI_rctf_interp(&v2d->cur, &sms->orig_cur, &sms->new_cur, step);
+       }
+
+       UI_view2d_curRect_validate(v2d);
+       UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
+       ED_region_tag_redraw(ar);
+
+       return OPERATOR_FINISHED;
+}
+
+static void VIEW2D_OT_smoothview(wmOperatorType *ot)
+{
+       /* identifiers */
+       ot->name = "Smooth View 2D";
+       ot->description = "Zoom in the view to the nearest item contained in the border";
+       ot->idname = "VIEW2D_OT_smoothview";
+
+       /* api callbacks */
+       ot->invoke = view2d_smoothview_invoke;
+
+       ot->poll = view2d_poll;
+
+       /* rna */
+       WM_operator_properties_gesture_border(ot, FALSE);
+}
+
 /* ********************************************************* */
 /* SCROLLERS */
 
@@ -1678,6 +1795,8 @@ void UI_view2d_operatortypes(void)
        
        WM_operatortype_append(VIEW2D_OT_zoom);
        WM_operatortype_append(VIEW2D_OT_zoom_border);
+
+       WM_operatortype_append(VIEW2D_OT_smoothview);
        
        WM_operatortype_append(VIEW2D_OT_scroller_activate);
 
@@ -1711,6 +1830,8 @@ void UI_view2d_keymap(wmKeyConfig *keyconf)
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_out", PADMINUS, KM_PRESS, 0, 0);
        WM_keymap_add_item(keymap, "VIEW2D_OT_zoom_in", PADPLUSKEY, KM_PRESS, 0, 0);
        
+       WM_keymap_verify_item(keymap, "VIEW2D_OT_smoothview", TIMER1, KM_ANY, KM_ANY, 0);
+
        /* scroll up/down - no modifiers, only when zoom fails */
        /* these may fail if zoom is disallowed, in which case they should pass on event */
        WM_keymap_add_item(keymap, "VIEW2D_OT_scroll_down", WHEELDOWNMOUSE, KM_PRESS, 0, 0);
index bce69cb7d1d4a824d8469915799b48d7a84c82b1..62600c7fe6b15344eda6ecde8fe1f59fee118b14 100644 (file)
@@ -521,7 +521,7 @@ int paintface_mouse_select(struct bContext *C, Object *ob, const int mval[2], in
        if (!facesel_face_pick(C, me, ob, mval, &index, 1))
                return 0;
        
-       if (index >= me->totpoly || index < 0)
+       if (index >= me->totpoly)
                return 0;
 
        mpoly_sel = me->mpoly + index;
index 2e28db8ad8eed4227261291b9727d917d472127d..c3093259fd84b885187210c9d04ad433d4f1e214 100644 (file)
@@ -1256,7 +1256,7 @@ static int multiresbake_image_exec(bContext *C, wmOperator *op)
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Multires Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, bkr, multiresbake_freejob);
+       WM_jobs_customdata_set(steve, bkr, multiresbake_freejob);
        WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
        WM_jobs_callbacks(steve, multiresbake_startjob, NULL, NULL, NULL);
 
@@ -1483,7 +1483,7 @@ static int objects_bake_render_invoke(bContext *C, wmOperator *op, wmEvent *UNUS
 
                        /* setup job */
                        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Texture Bake", WM_JOB_EXCL_RENDER | WM_JOB_PRIORITY | WM_JOB_PROGRESS);
-                       WM_jobs_customdata(steve, bkr, bake_freejob);
+                       WM_jobs_customdata_set(steve, bkr, bake_freejob);
                        WM_jobs_timer(steve, 0.2, NC_IMAGE, 0); /* TODO - only draw bake image, can we enforce this */
                        WM_jobs_callbacks(steve, bake_startjob, NULL, bake_update, NULL);
 
index b47269097fbde5a1062dd90f95669387b6d6b5d8..2bace9c30d49ad52fea2ac8265777c5f85f929cd 100644 (file)
@@ -2187,7 +2187,7 @@ static int ocean_bake_exec(bContext *C, wmOperator *op)
        oj->och = och;
        oj->omd = omd;
        
-       WM_jobs_customdata(steve, oj, oceanbake_free);
+       WM_jobs_customdata_set(steve, oj, oceanbake_free);
        WM_jobs_timer(steve, 0.1, NC_OBJECT | ND_MODIFIER, NC_OBJECT | ND_MODIFIER);
        WM_jobs_callbacks(steve, oceanbake_startjob, NULL, NULL, oceanbake_endjob);
        
index bc09df734a61e2427f6bc04b814e40cbc7264f9b..70fe87e5c01e366158dfd9340306a26a7006219e 100644 (file)
@@ -299,7 +299,7 @@ static int dynamicPaint_bakeImageSequence(bContext *C, DynamicPaintSurface *surf
                if (blender_test_break()) return 0;
 
                /* Update progress bar cursor */
-               WM_timecursor(win, (int)progress);
+               WM_cursor_time(win, (int)progress);
 
                /* calculate a frame */
                scene->r.cfra = (int)frame;
index 1c4a4314d45cf669c9263b50da3e8933d55a4380..621d06a7bd86444be0ab7a84ae9980910b75765a 100644 (file)
@@ -706,7 +706,7 @@ static int fluid_init_filepaths(Object *fsDomain, char *targetDir, char *targetF
                
                // ask user if thats what he/she wants...
                selection = pupmenu(dispmsg);
-               if (selection<1) return 0; // 0 from menu, or -1 aborted
+               if (selection < 1) return 0; // 0 from menu, or -1 aborted
                BLI_strncpy(targetDir, newSurfdataPath, sizeof(targetDir));
                strncpy(domainSettings->surfdataPath, newSurfdataPath, FILE_MAXDIR);
                BLI_path_abs(targetDir, G.main->name); // fixed #frame-no 
@@ -1071,7 +1071,7 @@ static int fluidsimBake(bContext *C, ReportList *reports, Object *fsDomain, shor
                wmJob *steve= WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, "Fluid Simulation", WM_JOB_PROGRESS);
 
                /* setup job */
-               WM_jobs_customdata(steve, fb, fluidbake_free);
+               WM_jobs_customdata_set(steve, fb, fluidbake_free);
                WM_jobs_timer(steve, 0.1, NC_SCENE|ND_FRAME, NC_SCENE|ND_FRAME);
                WM_jobs_callbacks(steve, fluidbake_startjob, NULL, NULL, fluidbake_endjob);
 
index 6e772f66a6a9e19fde644c9d20fd7d87956ffa8a..218ae628d3ff061db5cf29742116c2946fcabbca 100644 (file)
@@ -111,7 +111,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op)
         * and pointcache baking will be reimplemented with
         * the job system soon anyways. */
        if (win) {
-               baker.progressbar = (void (*)(void *, int))WM_timecursor;
+               baker.progressbar = (void (*)(void *, int))WM_cursor_time;
                baker.progressend = (void (*)(void *))WM_cursor_restore;
                baker.progresscontext = win;
        }
@@ -215,7 +215,7 @@ static int ptcache_bake_exec(bContext *C, wmOperator *op)
         * and pointcache baking will be reimplemented with
         * the job system soon anyways. */
        if (win) {
-               baker.progressbar = (void (*)(void *, int))WM_timecursor;
+               baker.progressbar = (void (*)(void *, int))WM_cursor_time;
                baker.progressend = (void (*)(void *))WM_cursor_restore;
                baker.progresscontext = win;
        }
index bc43dcbc1eed6985b56148b336f37f84c1a6f67a..031ad017c79764fe79c0e05c387801c2c953064d 100644 (file)
@@ -569,7 +569,7 @@ static int screen_render_invoke(bContext *C, wmOperator *op, wmEvent *event)
        else name = "Render";
 
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), scene, name, jobflag);
-       WM_jobs_customdata(steve, rj, render_freejob);
+       WM_jobs_customdata_set(steve, rj, render_freejob);
        WM_jobs_timer(steve, 0.2, NC_SCENE | ND_RENDER_RESULT, 0);
        WM_jobs_callbacks(steve, render_startjob, NULL, NULL, render_endjob);
 
index c7f48154970aec2a3d9a15bc3b40f6b181e3856c..03906c99c7463055920b3efa03a4dfab71ffc4f1 100644 (file)
@@ -1031,7 +1031,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
        ip = MEM_callocN(sizeof(IconPreview), "icon preview");
 
        /* render all resolutions from suspended job too */
-       old_ip = WM_jobs_get_customdata(steve);
+       old_ip = WM_jobs_customdata_get(steve);
        if (old_ip)
                BLI_movelisttolist(&ip->sizes, &old_ip->sizes);
 
@@ -1043,7 +1043,7 @@ void ED_preview_icon_job(const bContext *C, void *owner, ID *id, unsigned int *r
        icon_preview_add_size(ip, rect, sizex, sizey);
 
        /* setup job */
-       WM_jobs_customdata(steve, ip, icon_preview_free);
+       WM_jobs_customdata_set(steve, ip, icon_preview_free);
        WM_jobs_timer(steve, 0.25, NC_MATERIAL, NC_MATERIAL);
        WM_jobs_callbacks(steve, icon_preview_startjob_all_sizes, NULL, NULL, icon_preview_endjob);
 
@@ -1072,7 +1072,7 @@ void ED_preview_shader_job(const bContext *C, void *owner, ID *id, ID *parent, M
        else sp->col[0] = sp->col[1] = sp->col[2] = sp->col[3] = 1.0f;
        
        /* setup job */
-       WM_jobs_customdata(steve, sp, shader_preview_free);
+       WM_jobs_customdata_set(steve, sp, shader_preview_free);
        WM_jobs_timer(steve, 0.1, NC_MATERIAL, NC_MATERIAL);
        WM_jobs_callbacks(steve, common_preview_startjob, NULL, shader_preview_updatejob, NULL);
        
index 79ff516b3626a11374264b1a1cefd30dbf0358d3..166a4943db0281e11800b9e427a22cb5b25939da 100644 (file)
@@ -420,7 +420,7 @@ static int screencast_exec(bContext *C, wmOperator *op)
        BKE_reports_init(&sj->reports, RPT_PRINT);
 
        /* setup job */
-       WM_jobs_customdata(steve, sj, screenshot_freejob);
+       WM_jobs_customdata_set(steve, sj, screenshot_freejob);
        WM_jobs_timer(steve, 0.1, 0, NC_SCREEN | ND_SCREENCAST);
        WM_jobs_callbacks(steve, screenshot_startjob, NULL, screenshot_updatejob, NULL);
        
index 2313b1760730875eb66e150baf22da0bddabad3b..b8657f9e688bc88c4591be183587027654095ed8 100644 (file)
@@ -1054,7 +1054,7 @@ static int clip_rebuild_proxy_exec(bContext *C, wmOperator *UNUSED(op))
                                        clip->proxy.build_size_flag, clip->proxy.quality);
        }
 
-       WM_jobs_customdata(steve, pj, proxy_freejob);
+       WM_jobs_customdata_set(steve, pj, proxy_freejob);
        WM_jobs_timer(steve, 0.2, NC_MOVIECLIP | ND_DISPLAY, 0);
        WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
 
index 4283c6f77c792d77f5fbf98d157e3a64d8c39f38..bf0a6617e2b1c5b3ea2a3163f784d96db1c65e0a 100644 (file)
@@ -1262,7 +1262,7 @@ static int track_markers_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(eve
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Track Markers", WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, tmj, track_markers_freejob);
+       WM_jobs_customdata_set(steve, tmj, track_markers_freejob);
 
        /* if there's delay set in tracking job, tracking should happen
         * with fixed FPS. To deal with editor refresh we have to synchronize
@@ -1493,7 +1493,7 @@ static int solve_camera_invoke(bContext *C, wmOperator *op, wmEvent *UNUSED(even
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Solve Camera", WM_JOB_PROGRESS);
-       WM_jobs_customdata(steve, scj, solve_camera_freejob);
+       WM_jobs_customdata_set(steve, scj, solve_camera_freejob);
        WM_jobs_timer(steve, 0.1, NC_MOVIECLIP | NA_EVALUATED, 0);
        WM_jobs_callbacks(steve, solve_camera_startjob, NULL, solve_camera_updatejob, NULL);
 
index 2a99e479a46e2113f16add1ecab5e16a2cd1ed7f..27db7907e30834e5063cea7c3fa5ed7e45822bf3 100644 (file)
@@ -1369,7 +1369,7 @@ void thumbnails_start(struct FileList *filelist, const struct bContext *C)
 
        /* setup job */
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), filelist, "Thumbnails", 0);
-       WM_jobs_customdata(steve, tj, thumbnails_free);
+       WM_jobs_customdata_set(steve, tj, thumbnails_free);
        WM_jobs_timer(steve, 0.5, NC_WINDOW, NC_WINDOW);
        WM_jobs_callbacks(steve, thumbnails_startjob, NULL, thumbnails_update, NULL);
 
index 55dca7251311d536765e696b80ac5883cbdfee05..8a0538eddb05fc425dabca17b00e8a051e0b03ee 100644 (file)
@@ -202,33 +202,28 @@ void GRAPH_OT_previewrange_set(wmOperatorType *ot)
 static int graphkeys_viewall(bContext *C, const short do_sel_only, const short include_handles)
 {
        bAnimContext ac;
-       View2D *v2d;
        float extra;
+       rctf cur_new;
 
        /* get editor data */
        if (ANIM_animdata_get_context(C, &ac) == 0)
                return OPERATOR_CANCELLED;
-       v2d = &ac.ar->v2d;
 
        /* set the horizontal range, with an extra offset so that the extreme keys will be in view */
        get_graph_keyframe_extents(&ac, 
-                                  &v2d->cur.xmin, &v2d->cur.xmax, 
-                                                          &v2d->cur.ymin, &v2d->cur.ymax, 
+                                                          &cur_new.xmin, &cur_new.xmax,
+                                                          &cur_new.ymin, &cur_new.ymax,
                                                           do_sel_only, include_handles);
 
-       extra = 0.1f * (v2d->cur.xmax - v2d->cur.xmin);
-       v2d->cur.xmin -= extra;
-       v2d->cur.xmax += extra;
-
-       extra = 0.1f * (v2d->cur.ymax - v2d->cur.ymin);
-       v2d->cur.ymin -= extra;
-       v2d->cur.ymax += extra;
+       extra = 0.1f * (cur_new.xmax - cur_new.xmin);
+       cur_new.xmin -= extra;
+       cur_new.xmax += extra;
 
-       /* do View2D syncing */
-       UI_view2d_sync(CTX_wm_screen(C), CTX_wm_area(C), v2d, V2D_LOCK_COPY);
+       extra = 0.1f * (cur_new.ymax - cur_new.ymin);
+       cur_new.ymin -= extra;
+       cur_new.ymax += extra;
 
-       /* set notifier that things have changed */
-       ED_area_tag_redraw(CTX_wm_area(C));
+       UI_view2d_smooth_view(C, ac.ar, &cur_new);
 
        return OPERATOR_FINISHED;
 }
index d85cc307c3ebf937765fc8a98bc75c3eba0e2afc..1d8f63ce385248cf2d223a14f39dcc4dd28dd385 100644 (file)
@@ -581,7 +581,7 @@ static int image_view_all_exec(bContext *C, wmOperator *UNUSED(op))
        w = width * aspx;
        h = height * aspy;
        
-       /* check if the image will fit in the image with zoom==1 */
+       /* check if the image will fit in the image with (zoom == 1) */
        width = ar->winrct.xmax - ar->winrct.xmin + 1;
        height = ar->winrct.ymax - ar->winrct.ymin + 1;
 
@@ -2304,7 +2304,7 @@ static int image_record_composite_apply(bContext *C, wmOperator *op)
        Scene *scene = CTX_data_scene(C);
        ImBuf *ibuf;
        
-       WM_timecursor(CTX_wm_window(C), scene->r.cfra);
+       WM_cursor_time(CTX_wm_window(C), scene->r.cfra);
 
        // XXX scene->nodetree->test_break= blender_test_break;
        // XXX scene->nodetree->test_break= NULL;
index 11f070b483dd82bd022b9e5443814ebb806231f0..60375e9ab029001ce6e99f06240b50e97e2b50b4 100644 (file)
@@ -189,7 +189,7 @@ void ED_node_composite_job(const bContext *C, struct bNodeTree *nodetree, Scene
        cj->ntree = nodetree;
 
        /* setup job */
-       WM_jobs_customdata(steve, cj, compo_freejob);
+       WM_jobs_customdata_set(steve, cj, compo_freejob);
        WM_jobs_timer(steve, 0.1, NC_SCENE, NC_SCENE | ND_COMPO_RESULT);
        WM_jobs_callbacks(steve, compo_startjob, compo_initjob, compo_updatejob, NULL);
 
index 7b90d66c11c252ef649eea5231b0de4907d81658..2f4e7648a5f730315c13becd6161f9aeb23bbf4a 100644 (file)
@@ -377,7 +377,7 @@ static int node_mouse_select(Main *bmain, SpaceNode *snode, ARegion *ar, const i
                        }
                }
        }
-       else {  /* extend==0 */
+       else {  /* extend == 0 */
                
                /* find the closest visible node */
                node = node_under_mouse_select(snode->edittree, mx, my);
index 7ad283b986995715394d523ebd656312fcbc2c79..0566611dc0e52eee614a9a6675eb5cc07d1a1d72 100644 (file)
@@ -43,6 +43,8 @@
 #include "ED_space_api.h"
 #include "ED_image.h"
 
+#include "UI_view2d.h"
+
 #include "RNA_access.h"
 #include "RNA_define.h"
 
@@ -61,7 +63,7 @@
 
 /* **************** View All Operator ************** */
 
-static int space_node_view_flag(SpaceNode *snode, ARegion *ar, const int node_flag)
+static int space_node_view_flag(bContext *C, SpaceNode *snode, ARegion *ar, const int node_flag)
 {
        bNode *node;
        rctf cur_new;
@@ -118,8 +120,7 @@ static int space_node_view_flag(SpaceNode *snode, ARegion *ar, const int node_fl
                        }
                }
 
-               ar->v2d.tot = ar->v2d.cur = cur_new;
-               UI_view2d_curRect_validate(&ar->v2d);
+               UI_view2d_smooth_view(C, ar, &cur_new);
        }
 
        return (tot != 0);
@@ -134,7 +135,7 @@ static int node_view_all_exec(bContext *C, wmOperator *UNUSED(op))
        snode->xof = 0;
        snode->yof = 0;
 
-       if (space_node_view_flag(snode, ar, 0)) {
+       if (space_node_view_flag(C, snode, ar, 0)) {
                ED_region_tag_redraw(ar);
 
                return OPERATOR_FINISHED;
@@ -164,7 +165,7 @@ static int node_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
        ARegion *ar = CTX_wm_region(C);
        SpaceNode *snode = CTX_wm_space_node(C);
 
-       if (space_node_view_flag(snode, ar, NODE_SELECT)) {
+       if (space_node_view_flag(C, snode, ar, NODE_SELECT)) {
                ED_region_tag_redraw(ar);
 
                return OPERATOR_FINISHED;
index 7cc6e279ff2c6f37bb0be454ef6b7ca9bdfc83e1..9e730fff940f725dc3934f550b023e6bf2432207 100644 (file)
@@ -188,7 +188,7 @@ static void seq_proxy_build_job(const bContext *C)
 
        steve = WM_jobs_get(CTX_wm_manager(C), CTX_wm_window(C), sa, "Building Proxies", WM_JOB_PROGRESS);
 
-       pj = WM_jobs_get_customdata(steve);
+       pj = WM_jobs_customdata_get(steve);
 
        if (!pj) {
                pj = MEM_callocN(sizeof(ProxyJob), "proxy rebuild job");
@@ -196,7 +196,7 @@ static void seq_proxy_build_job(const bContext *C)
                pj->scene = scene;
                pj->main = CTX_data_main(C);
 
-               WM_jobs_customdata(steve, pj, proxy_freejob);
+               WM_jobs_customdata_set(steve, pj, proxy_freejob);
                WM_jobs_timer(steve, 0.1, NC_SCENE | ND_SEQUENCER, NC_SCENE | ND_SEQUENCER);
                WM_jobs_callbacks(steve, proxy_startjob, NULL, NULL, proxy_endjob);
        }
@@ -2042,17 +2042,10 @@ void SEQUENCER_OT_meta_separate(wmOperatorType *ot)
 /* view_all operator */
 static int sequencer_view_all_exec(bContext *C, wmOperator *UNUSED(op))
 {
-       //Scene *scene= CTX_data_scene(C);
-       bScreen *sc = CTX_wm_screen(C);
-       ScrArea *area = CTX_wm_area(C);
-       //ARegion *ar= CTX_wm_region(C);
+       ARegion *ar = CTX_wm_region(C);
        View2D *v2d = UI_view2d_fromcontext(C);
 
-       v2d->cur = v2d->tot;
-       UI_view2d_curRect_validate(v2d);
-       UI_view2d_sync(sc, area, v2d, V2D_LOCK_COPY);
-       
-       ED_area_tag_redraw(CTX_wm_area(C));
+       UI_view2d_smooth_view(C, ar, &v2d->tot);
        return OPERATOR_FINISHED;
 }
 
@@ -2218,10 +2211,10 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
 {
        Scene *scene = CTX_data_scene(C);
        View2D *v2d = UI_view2d_fromcontext(C);
-       ScrArea *area = CTX_wm_area(C);
-       bScreen *sc = CTX_wm_screen(C);
+       ARegion *ar = CTX_wm_region(C);
        Editing *ed = BKE_sequencer_editing_get(scene, FALSE);
        Sequence *seq;
+       rctf cur_new = v2d->cur;
 
        int xmin =  MAXFRAME * 2;
        int xmax = -MAXFRAME * 2;
@@ -2252,29 +2245,30 @@ static int sequencer_view_selected_exec(bContext *C, wmOperator *UNUSED(op))
                ymax += ymargin;
                ymin -= ymargin;
 
-               orig_height = v2d->cur.ymax - v2d->cur.ymin;
+               orig_height = cur_new.ymax - cur_new.ymin;
 
-               v2d->cur.xmin = xmin;
-               v2d->cur.xmax = xmax;
+               cur_new.xmin = xmin;
+               cur_new.xmax = xmax;
 
-               v2d->cur.ymin = ymin;
-               v2d->cur.ymax = ymax;
+               cur_new.ymin = ymin;
+               cur_new.ymax = ymax;
 
                /* only zoom out vertically */
-               if (orig_height > v2d->cur.ymax - v2d->cur.ymin) {
-                       ymid = (v2d->cur.ymax + v2d->cur.ymin) / 2;
+               if (orig_height > cur_new.ymax - cur_new.ymin) {
+                       ymid = (cur_new.ymax + cur_new.ymin) / 2;
 
-                       v2d->cur.ymin = ymid - (orig_height / 2);
-                       v2d->cur.ymax = ymid + (orig_height / 2);
+                       cur_new.ymin = ymid - (orig_height / 2);
+                       cur_new.ymax = ymid + (orig_height / 2);
                }
 
-               UI_view2d_curRect_validate(v2d);
-               UI_view2d_sync(sc, area, v2d, V2D_LOCK_COPY);
+               UI_view2d_smooth_view(C, ar, &cur_new);
 
-               ED_area_tag_redraw(CTX_wm_area(C));
+               return OPERATOR_FINISHED;
+       }
+       else {
+               return OPERATOR_CANCELLED;
        }
        
-       return OPERATOR_FINISHED;
 }
 
 void SEQUENCER_OT_view_selected(wmOperatorType *ot)
index 3803ac6593af432f02fc2fcfa52258345fdf0aa2..173bff61be67005da658beacfedf0d92669c38f3 100644 (file)
@@ -7277,7 +7277,7 @@ static void bbs_obmode_mesh_verts__mapFunc(void *userData, int index, const floa
        int offset = (intptr_t) data->offset;
 
        if (!(mv->flag & ME_HIDE)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                bglVertex3fv(co);
        }
 }
@@ -7304,7 +7304,7 @@ static void bbs_mesh_verts__mapFunc(void *userData, int index, const float co[3]
        BMVert *eve = EDBM_vert_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eve, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                bglVertex3fv(co);
        }
 }
@@ -7326,7 +7326,7 @@ static DMDrawOption bbs_mesh_wire__setDrawOptions(void *userData, int index)
        BMEdge *eed = EDBM_edge_at_index(ptrs[1], index);
 
        if (!BM_elem_flag_test(eed, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(offset + index);
+               WM_framebuffer_index_set(offset + index);
                return DM_DRAW_OPTION_NORMAL;
        }
        else {
@@ -7345,7 +7345,7 @@ static DMDrawOption bbs_mesh_solid__setSolidDrawOptions(void *userData, int inde
        
        if (efa && !BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
                if (((void **)userData)[1]) {
-                       WM_set_framebuffer_index_color(index + 1);
+                       WM_framebuffer_index_set(index + 1);
                }
                return DM_DRAW_OPTION_NORMAL;
        }
@@ -7359,7 +7359,7 @@ static void bbs_mesh_solid__drawCenter(void *userData, int index, const float ce
        BMFace *efa = EDBM_face_at_index(((void **)userData)[0], index);
 
        if (!BM_elem_flag_test(efa, BM_ELEM_HIDDEN)) {
-               WM_set_framebuffer_index_color(index + 1);
+               WM_framebuffer_index_set(index + 1);
 
                bglVertex3fv(cent);
        }
@@ -7392,7 +7392,7 @@ static void bbs_mesh_solid_EM(BMEditMesh *em, Scene *scene, View3D *v3d,
 
 static DMDrawOption bbs_mesh_solid__setDrawOpts(void *UNUSED(userData), int index)
 {
-       WM_set_framebuffer_index_color(index + 1);
+       WM_framebuffer_index_set(index + 1);
        return DM_DRAW_OPTION_NORMAL;
 }
 
@@ -7401,7 +7401,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
        Mesh *me = userData;
 
        if (!(me->mpoly[index].flag & ME_HIDE)) {
-               WM_set_framebuffer_index_color(index + 1);
+               WM_framebuffer_index_set(index + 1);
                return DM_DRAW_OPTION_NORMAL;
        }
        else {
@@ -7409,7 +7409,7 @@ static DMDrawOption bbs_mesh_solid_hide__setDrawOpts(void *userData, int index)
        }
 }
 
-/* must have called WM_set_framebuffer_index_color beforehand */
+/* must have called WM_framebuffer_index_set beforehand */
 static DMDrawOption bbs_mesh_solid_hide2__setDrawOpts(void *userData, int index)
 {
        Mesh *me = userData;
index 9cda4900c8de3af37618cfdc2fb8b99804e608be..8b8adb193bfea71f1affb3a3fb5c26a94047322c 100644 (file)
@@ -2081,7 +2081,7 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
                 * I think no, because we always move the cursor, with or without
                 * object, but in this case there is no change in the scene,
                 * only the cursor so I choice a ED_region_tag like
-                * smooth_view do for the center_cursor.
+                * view3d_smooth_view do for the center_cursor.
                 * See bug #22640
                 */
                return OPERATOR_FINISHED;
@@ -2109,10 +2109,10 @@ static int view3d_all_exec(bContext *C, wmOperator *op) /* was view3d_home() in
 
                if ((rv3d->persp == RV3D_CAMOB) && !ED_view3d_camera_lock_check(v3d, rv3d)) {
                        rv3d->persp = RV3D_PERSP;
-                       smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL);
+                       view3d_smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, &new_dist, NULL);
                }
                else {
-                       smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
+                       view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
                }
        }
 // XXX BIF_view3d_previewrender_signal(curarea, PR_DBASE|PR_DISPRECT);
@@ -2266,10 +2266,10 @@ static int viewselected_exec(bContext *C, wmOperator *UNUSED(op))
 
        if (rv3d->persp == RV3D_CAMOB && !ED_view3d_camera_lock_check(v3d, rv3d)) {
                rv3d->persp = RV3D_PERSP;
-               smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
+               view3d_smooth_view(C, v3d, ar, v3d->camera, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
        }
        else {
-               smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
+               view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, ok_dist ? &new_dist : NULL, NULL);
        }
 
        /* smooth view does viewlock RV3D_BOXVIEW copy */
@@ -2390,7 +2390,7 @@ static int viewcenter_cursor_exec(bContext *C, wmOperator *UNUSED(op))
                /* non camera center */
                float new_ofs[3];
                negate_v3_v3(new_ofs, give_cursor(scene, v3d));
-               smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, NULL, NULL);
+               view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, NULL, NULL);
                
                /* smooth view does viewlock RV3D_BOXVIEW copy */
        }
@@ -2662,7 +2662,7 @@ static int view3d_zoom_border_exec(bContext *C, wmOperator *op)
                new_dist = dist_range_min;
        }
 
-       smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
+       view3d_smooth_view(C, v3d, ar, NULL, NULL, new_ofs, NULL, &new_dist, NULL);
 
        if (rv3d->viewlock & RV3D_BOXVIEW)
                view3d_boxview_sync(CTX_wm_area(C), ar);
@@ -2828,14 +2828,14 @@ static void axis_set_view(bContext *C, View3D *v3d, ARegion *ar,
                if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
                else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
 
-               smooth_view(C, v3d, ar, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL);
+               view3d_smooth_view(C, v3d, ar, v3d->camera, NULL, rv3d->ofs, new_quat, NULL, NULL);
        }
        else {
 
                if (U.uiflag & USER_AUTOPERSP) rv3d->persp = view ? RV3D_ORTHO : RV3D_PERSP;
                else if (rv3d->persp == RV3D_CAMOB) rv3d->persp = perspo;
 
-               smooth_view(C, v3d, ar, NULL, NULL, NULL, new_quat, NULL, NULL);
+               view3d_smooth_view(C, v3d, ar, NULL, NULL, NULL, new_quat, NULL, NULL);
        }
 
 }
@@ -2953,12 +2953,12 @@ static int viewnumpad_exec(bContext *C, wmOperator *op)
 
                                        /* finally do snazzy view zooming */
                                        rv3d->persp = RV3D_CAMOB;
-                                       smooth_view(C, v3d, ar, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
+                                       view3d_smooth_view(C, v3d, ar, NULL, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
 
                                }
                                else {
                                        /* return to settings of last view */
-                                       /* does smooth_view too */
+                                       /* does view3d_smooth_view too */
                                        axis_set_view(C, v3d, ar,
                                                      rv3d->lviewquat[0], rv3d->lviewquat[1], rv3d->lviewquat[2], rv3d->lviewquat[3],
                                                      rv3d->lview, rv3d->lpersp, 0);
@@ -3048,7 +3048,7 @@ static int vieworbit_exec(bContext *C, wmOperator *op)
                        mul_qt_qtqt(quat_new, rv3d->viewquat, quat_mul);
                        rv3d->view = RV3D_VIEW_USER;
 
-                       smooth_view(C, CTX_wm_view3d(C), ar, NULL, NULL, NULL, quat_new, NULL, NULL);
+                       view3d_smooth_view(C, CTX_wm_view3d(C), ar, NULL, NULL, NULL, quat_new, NULL, NULL);
 
                        return OPERATOR_FINISHED;
                }
index 3c6a0dd4b9f7b51dd2c7d7944c18d8348de1d26b..8b51e6cf226891aee1598b5555ec430d2b1b0984 100644 (file)
@@ -173,8 +173,8 @@ void VIEW3D_OT_game_start(struct wmOperatorType *ot);
 
 int ED_view3d_boundbox_clip(RegionView3D * rv3d, float obmat[][4], struct BoundBox *bb);
 
-void smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *,
-                 float *ofs, float *quat, float *dist, float *lens);
+void view3d_smooth_view(struct bContext *C, struct View3D *v3d, struct ARegion *ar, struct Object *, struct Object *,
+                                               float *ofs, float *quat, float *dist, float *lens);
 
 void setwinmatrixview3d(ARegion *ar, View3D *v3d, rctf *rect);  /* rect: for picking */
 void setviewmatrixview3d(Scene *scene, View3D *v3d, RegionView3D *rv3d);
index f9776855d61d686cb6fa65f8a32c5222a1efa229..604d101abd5090387b8f841904e9c9ac41cbcf5d 100644 (file)
@@ -110,7 +110,7 @@ float *give_cursor(Scene *scene, View3D *v3d)
 /* ****************** smooth view operator ****************** */
 /* This operator is one of the 'timer refresh' ones like animation playback */
 
-struct SmoothViewStore {
+struct SmoothView3DStore {
        float orig_dist, new_dist;
        float orig_lens, new_lens;
        float orig_quat[4], new_quat[4];
@@ -123,15 +123,15 @@ struct SmoothViewStore {
 
 /* will start timer if appropriate */
 /* the arguments are the desired situation */
-void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera,
-                 float *ofs, float *quat, float *dist, float *lens)
+void view3d_smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Object *camera,
+                                               float *ofs, float *quat, float *dist, float *lens)
 {
        wmWindowManager *wm = CTX_wm_manager(C);
        wmWindow *win = CTX_wm_window(C);
        ScrArea *sa = CTX_wm_area(C);
 
        RegionView3D *rv3d = ar->regiondata;
-       struct SmoothViewStore sms = {0};
+       struct SmoothView3DStore sms = {0};
        short ok = FALSE;
        
        /* initialize sms */
@@ -227,7 +227,7 @@ void smooth_view(bContext *C, View3D *v3d, ARegion *ar, Object *oldcamera, Objec
                        
                        /* keep track of running timer! */
                        if (rv3d->sms == NULL)
-                               rv3d->sms = MEM_mallocN(sizeof(struct SmoothViewStore), "smoothview v3d");
+                               rv3d->sms = MEM_mallocN(sizeof(struct SmoothView3DStore), "smoothview v3d");
                        *rv3d->sms = sms;
                        if (rv3d->smooth_timer)
                                WM_event_remove_timer(wm, win, rv3d->smooth_timer);
@@ -259,7 +259,7 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
 {
        View3D *v3d = CTX_wm_view3d(C);
        RegionView3D *rv3d = CTX_wm_region_view3d(C);
-       struct SmoothViewStore *sms = rv3d->sms;
+       struct SmoothView3DStore *sms = rv3d->sms;
        float step, step_inv;
        
        /* escape if not our timer */
@@ -303,17 +303,12 @@ static int view3d_smoothview_invoke(bContext *C, wmOperator *UNUSED(op), wmEvent
                rv3d->rflag &= ~RV3D_NAVIGATING;
        }
        else {
-               int i;
-               
                /* ease in/out */
-               if (step < 0.5f) step = (float)pow(step * 2.0f, 2.0) / 2.0f;
-               else step = (float)1.0f - (powf(2.0f * (1.0f - step), 2.0f) / 2.0f);
+               step = (3.0f * step * step - 2.0f * step * step * step);
 
                step_inv = 1.0f - step;
 
-               for (i = 0; i < 3; i++)
-                       rv3d->ofs[i] = sms->new_ofs[i] * step + sms->orig_ofs[i] * step_inv;
-
+               interp_v3_v3v3(rv3d->ofs,      sms->new_ofs,   sms->orig_ofs, step);
                interp_qt_qtqt(rv3d->viewquat, sms->orig_quat, sms->new_quat, step);
                
                rv3d->dist = sms->new_dist * step + sms->orig_dist * step_inv;
@@ -490,7 +485,7 @@ static int view3d_setobjectascamera_exec(bContext *C, wmOperator *UNUSED(op))
                        scene->camera = ob;
 
                if (camera_old != ob) /* unlikely but looks like a glitch when set to the same */
-                       smooth_view(C, v3d, ar, camera_old, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
+                       view3d_smooth_view(C, v3d, ar, camera_old, v3d->camera, rv3d->ofs, rv3d->viewquat, &rv3d->dist, &v3d->lens);
 
                WM_event_add_notifier(C, NC_SCENE | ND_RENDER_OPTIONS | NC_OBJECT | ND_DRAW, CTX_data_scene(C));
        }
@@ -1100,14 +1095,14 @@ static void obmat_to_viewmat(View3D *v3d, RegionView3D *rv3d, Object *ob, short
                        rv3d->dist = 0.0;
                        
                        ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens);
-                       smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */
+                       view3d_smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */
 
                        rv3d->persp = RV3D_CAMOB; /* just to be polite, not needed */
                        
                }
                else {
                        mat3_to_quat(new_quat, tmat);
-                       smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */
+                       view3d_smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */
                }
        }
        else {
@@ -1872,11 +1867,11 @@ static void UNUSED_FUNCTION(view3d_align_axis_to_vector)(View3D *v3d, RegionView
                rv3d->persp = RV3D_PERSP;
                rv3d->dist = 0.0;
                ED_view3d_from_object(v3d->camera, rv3d->ofs, NULL, NULL, &v3d->lens);
-               smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */
+               view3d_smooth_view(NULL, NULL, NULL, NULL, NULL, orig_ofs, new_quat, &orig_dist, &orig_lens); /* XXX */
        }
        else {
                if (rv3d->persp == RV3D_CAMOB) rv3d->persp = RV3D_PERSP;  /* switch out of camera mode */
-               smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */
+               view3d_smooth_view(NULL, NULL, NULL, NULL, NULL, NULL, new_quat, NULL, NULL); /* XXX */
        }
 }
 
index 5f0de8ae0fd290a558843650f2a8f2ff0a154a3a..978b6db1b9a34fde4019ad7aec7dd53dd93cd9b6 100644 (file)
@@ -4,13 +4,13 @@ uniform sampler2D textureSource;
 void main()
 {
        vec4 color = vec4(0.0);
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -2.0*ScaleU.x, -2.0*ScaleU.y ) )*0.09375;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( -1.0*ScaleU.x, -1.0*ScaleU.y ) )*0.234375;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 0.0 , 0.0) )*0.3125;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 1.0*ScaleU.x,  1.0*ScaleU.y ) )*0.234375;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 2.0*ScaleU.x,  2.0*ScaleU.y ) )*0.09375;
-       color += texture2D( textureSource, gl_TexCoord[0].st + vec2( 3.0*ScaleU.x, -3.0*ScaleU.y ) ) * 0.015625;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(-3.0 * ScaleU.x, -3.0 * ScaleU.y ) ) * 0.015625;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(-2.0 * ScaleU.x, -2.0 * ScaleU.y ) ) * 0.09375;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(-1.0 * ScaleU.x, -1.0 * ScaleU.y ) ) * 0.234375;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(0.0, 0.0)) * 0.3125;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(1.0 * ScaleU.x,  1.0 * ScaleU.y ) ) * 0.234375;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(2.0 * ScaleU.x,  2.0 * ScaleU.y ) ) * 0.09375;
+       color += texture2D( textureSource, gl_TexCoord[0].st + vec2(3.0 * ScaleU.x, -3.0 * ScaleU.y ) ) * 0.015625;
 
        gl_FragColor = color;
 }
index a8292d0246361b515475e9c955981bf085de2416..ffe25a7b1ec93e6d34b75e97790c1ccfa36fe009 100644 (file)
@@ -218,7 +218,7 @@ typedef struct bPoseChannel {
        short rotmode;                      /* eRotationModes - rotation representation to use */
        short pad;
        
-       float chan_mat[4][4];           /* matrix result of loc/quat/size , and where we put deform in, see next line */
+       float chan_mat[4][4];           /* matrix result of loc/quat/size, and where we put deform in, see next line */
        float pose_mat[4][4];           /* constraints accumulate here. in the end, pose_mat = bone->arm_mat * chan_mat
                                         * this matrix is object space */
        float constinv[4][4];           /* inverse result of constraints.
index 8d953079bdb69a95f8eac96949611b44788e2dee..ad3284d430d13f1d5c03b80d5a6a839ace994e80 100644 (file)
@@ -332,7 +332,7 @@ typedef struct bTransformConstraint {
        struct Object           *tar;                   /* target (i.e. 'driver' object/bone) */
        char            subtarget[64];          /* MAX_ID_NAME-2 */
        
-       short           from, to;               /* can be loc(0) , rot(1),  or size(2) */
+       short           from, to;               /* can be loc(0), rot(1) or size(2) */
        char            map[3];                 /* defines which target-axis deform is copied by each owner-axis */
        char            expo;                   /* extrapolate motion? if 0, confine to ranges */
        
index 9c4abfbfdefd6ddd752e06f5c8642541e78f19cb..ab533b2859b560c1b3e5d521db8321c61ca106b2 100644 (file)
@@ -63,6 +63,11 @@ typedef struct View2D {
        float *tab_offset;                              /* different offset per tab, for buttons */
        int tab_num;                                    /* number of tabs stored */
        int tab_cur;                                    /* current tab */
+
+       /* animated smooth view */
+       struct SmoothView2DStore *sms;
+       struct wmTimer *smooth_timer;
+
 } View2D;
 
 /* ---------------------------------- */
index 487c0d97e5ed00e45eaf2a49b30a20ca6fc8321e..d730c7d90196e418068d46bf9d47e315535586bc 100644 (file)
@@ -44,7 +44,7 @@ struct MovieClipUser;
 struct RenderInfo;
 struct RenderEngine;
 struct bGPdata;
-struct SmoothViewStore;
+struct SmoothView3DStore;
 struct wmTimer;
 
 /* This is needed to not let VC choke on near and far... old
@@ -108,7 +108,7 @@ typedef struct RegionView3D {
        struct ViewDepths *depths;
 
        /* animated smooth view */
-       struct SmoothViewStore *sms;
+       struct SmoothView3DStore *sms;
        struct wmTimer *smooth_timer;
 
 
index 9c871f14a683230b30ee70b77dddb7343e0d4977..8e7c4810b0882f0ac6e4cdd00053e517dc6c8167 100644 (file)
@@ -420,7 +420,7 @@ static PyObject *bpy_bmesh_fmod_getattro(PyObject *UNUSED(self), PyObject *pynam
        }
 
        PyErr_Format(PyExc_AttributeError,
-                    "BMeshOpsModule: , operator \"%.200s\" doesn't exist",
+                                "BMeshOpsModule: operator \"%.200s\" doesn't exist",
                     name);
        return NULL;
 }
index ee7b44fb1e92fa5d96f37c9c2051fa7b0fdd08c4..55783c3b9809e8ce399f332bbabee615b46a2f77 100644 (file)
@@ -37,6 +37,7 @@
  *  \todo document
  */
 
+
 /* dna-savable wmStructs here */
 #include "DNA_windowmanager_types.h"
 #include "WM_keymap.h"
@@ -65,9 +66,9 @@ struct ImBuf;
 typedef struct wmJob wmJob;
 
 /* general API */
-void           WM_setprefsize          (int stax, int stay, int sizx, int sizy);
-void           WM_setinitialstate_fullscreen(void);
-void           WM_setinitialstate_normal(void);
+void           WM_init_state_size_set          (int stax, int stay, int sizx, int sizy);
+void           WM_init_state_fullscreen_set(void);
+void           WM_init_state_normal_set(void);
 
 void           WM_init                         (struct bContext *C, int argc, const char **argv);
 void           WM_exit_ext                     (struct bContext *C, const short do_python);
@@ -92,21 +93,21 @@ void                WM_window_open_temp     (struct bContext *C, struct rcti *position, int type);
 
 
                        /* files */
-int                    WM_read_homefile_exec(struct bContext *C, struct wmOperator *op);
-int                    WM_read_homefile        (struct bContext *C, struct ReportList *reports, short from_memory);
-int                    WM_write_homefile       (struct bContext *C, struct wmOperator *op);
-void           WM_read_file            (struct bContext *C, const char *filepath, struct ReportList *reports);
-int                    WM_write_file           (struct bContext *C, const char *target, int fileflags, struct ReportList *reports, int copy);
-void           WM_autosave_init        (struct wmWindowManager *wm);
+int                    WM_homefile_read_exec(struct bContext *C, struct wmOperator *op);
+int                    WM_homefile_read(struct bContext *C, struct ReportList *reports, short from_memory);
+int                    WM_homefile_write_exec(struct bContext *C, struct wmOperator *op);
+void           WM_file_read(struct bContext *C, const char *filepath, struct ReportList *reports);
+int                    WM_file_write(struct bContext *C, const char *target, int fileflags, struct ReportList *reports, int copy);
+void           WM_autosave_init(struct wmWindowManager *wm);
 
                        /* mouse cursors */
 void           WM_cursor_set           (struct wmWindow *win, int curs);
 void           WM_cursor_modal         (struct wmWindow *win, int curs);
 void           WM_cursor_restore       (struct wmWindow *win);
 void           WM_cursor_wait          (int val);
-void           WM_cursor_grab(struct wmWindow *win, int wrap, int hide, int *bounds);
-void           WM_cursor_ungrab(struct wmWindow *win);
-void           WM_timecursor           (struct wmWindow *win, int nr);
+void           WM_cursor_grab_enable(struct wmWindow *win, int wrap, int hide, int *bounds);
+void           WM_cursor_grab_disable(struct wmWindow *win);
+void           WM_cursor_time          (struct wmWindow *win, int nr);
 
 void           *WM_paint_cursor_activate(struct wmWindowManager *wm,
                                       int (*poll)(struct bContext *C),
@@ -243,11 +244,11 @@ void              WM_operator_bl_idname(char *to, const char *from);
 void           WM_operator_py_idname(char *to, const char *from);
 
 /* *************** menu types ******************** */
-void                           WM_menutype_init(void);
-struct MenuType                *WM_menutype_find(const char *idname, int quiet);
-int                                    WM_menutype_add(struct MenuType* mt);
-void                           WM_menutype_freelink(struct MenuType* mt);
-void                           WM_menutype_free(void);
+void                WM_menutype_init(void);
+struct MenuType    *WM_menutype_find(const char *idname, int quiet);
+int                 WM_menutype_add(struct MenuType* mt);
+void                WM_menutype_freelink(struct MenuType* mt);
+void                WM_menutype_free(void);
 
                        /* default operator callbacks for border/circle/lasso */
 int                    WM_border_select_invoke (struct bContext *C, struct wmOperator *op, struct wmEvent *event);
@@ -297,7 +298,7 @@ void                wmOrtho                         (float x1, float x2, float y1, float y2, float n, float f);
 void           wmOrtho2                        (float x1, float x2, float y1, float y2);
 
                        /* utilities */
-void           WM_set_framebuffer_index_color(int index);
+void           WM_framebuffer_index_set(int index);
 int                    WM_framebuffer_to_index(unsigned int col);
 
                        /* threaded Jobs Manager */
@@ -313,8 +314,8 @@ float               WM_jobs_progress(struct wmWindowManager *wm, void *owner);
 char           *WM_jobs_name(struct wmWindowManager *wm, void *owner);
 
 int         WM_jobs_is_running(struct wmJob *);
-void *      WM_jobs_get_customdata(struct wmJob *);
-void        WM_jobs_customdata(struct wmJob *, void *customdata, void (*free)(void *));
+void *      WM_jobs_customdata_get(struct wmJob *);
+void        WM_jobs_customdata_set(struct wmJob *, void *customdata, void (*free)(void *));
 void        WM_jobs_timer(struct wmJob *, double timestep, unsigned int note, unsigned int endnote);
 void        WM_jobs_callbacks(struct wmJob *,
                               void (*startjob)(void *, short *, short *, float *),
index 43435ce67e9c8a4397c7443891ad6dcc1132f7df..8d7dc21d95bd4800590ffa92984d0a752d4c4076 100644 (file)
@@ -28,6 +28,9 @@
  *  \ingroup wm
  */
 
+#ifndef __WM_TYPES_H__
+#define __WM_TYPES_H__
+
 /*
  * Overview of WM structs
  * ======================
@@ -95,9 +98,6 @@
  *
  */
 
-#ifndef __WM_TYPES_H__
-#define __WM_TYPES_H__
-
 #ifdef __cplusplus
 extern "C" {
 #endif
index 71d074e340fc1928e955c4461ee16bf8cea984ea..a7bd43986dd701dd105fa0e68d01f87faa63faa5 100644 (file)
@@ -124,14 +124,14 @@ void wm_set_apple_prefsize(int scr_x, int scr_y)
                short top, left, bottom, right;
                
                getMacAvailableBounds(&top, &left, &bottom, &right);
-               WM_setprefsize(left + 10, scr_y - bottom + 10, right - left - 20, bottom - 64);
+               WM_init_state_size_set(left + 10, scr_y - bottom + 10, right - left - 20, bottom - 64);
                G.windowstate = 0;
                
        }
        else {
                
                /* 40 + 684 + (headers) 22 + 22 = 768, the powerbook screen height */
-               WM_setprefsize(120, 40, 850, 684);
+               WM_init_state_size_set(120, 40, 850, 684);
                G.windowstate = 0;
        }
 }
index bb985802e23ec03c66aafbee614f6209584f8519..6fc6a57ade1526d83817930fedbd012badb37858 100644 (file)
@@ -179,7 +179,7 @@ void WM_cursor_wait(int val)
        }
 }
 
-void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
+void WM_cursor_grab_enable(wmWindow *win, int wrap, int hide, int *bounds)
 {
        /* Only grab cursor when not running debug.
         * It helps not to get a stuck WM when hitting a breakpoint  
@@ -202,7 +202,7 @@ void WM_cursor_grab(wmWindow *win, int wrap, int hide, int *bounds)
        }
 }
 
-void WM_cursor_ungrab(wmWindow *win)
+void WM_cursor_grab_disable(wmWindow *win)
 {
        if ((G.debug & G_DEBUG) == 0) {
                if (win && win->ghostwin) {
@@ -239,7 +239,7 @@ int wm_cursor_arrow_move(wmWindow *win, wmEvent *event)
 
 
 /* afer this you can call restore too */
-void WM_timecursor(wmWindow *win, int nr)
+void WM_cursor_time(wmWindow *win, int nr)
 {
        /* 10 8x8 digits */
        static char number_bitmaps[10][8] = {
index e3ad425d0f8b9af98048ffede82357c02b550698..10a383df5c947c30d6f2499fc3454c093611f0b8 100644 (file)
@@ -938,7 +938,7 @@ static int wm_operator_invoke(bContext *C, wmOperatorType *ot, wmEvent *event,
                                        }
                                }
 
-                               WM_cursor_grab(CTX_wm_window(C), wrap, FALSE, bounds);
+                               WM_cursor_grab_enable(CTX_wm_window(C), wrap, FALSE, bounds);
                        }
 
                        /* cancel UI handlers, typically tooltips that can hang around
@@ -1202,7 +1202,7 @@ void WM_event_remove_handlers(bContext *C, ListBase *handlers)
                                CTX_wm_region_set(C, region);
                        }
 
-                       WM_cursor_ungrab(CTX_wm_window(C));
+                       WM_cursor_grab_disable(CTX_wm_window(C));
                        WM_operator_free(handler->op);
                }
                else if (handler->ui_remove) {
@@ -1432,7 +1432,7 @@ static int wm_handler_operator_call(bContext *C, ListBase *handlers, wmEventHand
 
                                /* remove modal handler, operator itself should have been canceled and freed */
                                if (retval & (OPERATOR_CANCELLED | OPERATOR_FINISHED)) {
-                                       WM_cursor_ungrab(CTX_wm_window(C));
+                                       WM_cursor_grab_disable(CTX_wm_window(C));
 
                                        BLI_remlink(handlers, handler);
                                        wm_event_free_handler(handler);
index d4b55677af1a9cc0c77fef883f22d13e754ec479..660117de9f74af1626246750881daa8782f18e2b 100644 (file)
@@ -356,7 +356,7 @@ static int wm_read_exotic(Scene *UNUSED(scene), const char *name)
        return retval;
 }
 
-void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
+void WM_file_read(bContext *C, const char *filepath, ReportList *reports)
 {
        int retval;
 
@@ -485,7 +485,7 @@ void WM_read_file(bContext *C, const char *filepath, ReportList *reports)
 /* called on startup,  (context entirely filled with NULLs) */
 /* or called for 'New File' */
 /* op can be NULL */
-int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory)
+int WM_homefile_read(bContext *C, ReportList *UNUSED(reports), short from_memory)
 {
        ListBase wmbase;
        char tstr[FILE_MAX];
@@ -580,10 +580,10 @@ int WM_read_homefile(bContext *C, ReportList *UNUSED(reports), short from_memory
        return TRUE;
 }
 
-int WM_read_homefile_exec(bContext *C, wmOperator *op)
+int WM_homefile_read_exec(bContext *C, wmOperator *op)
 {
        int from_memory = strcmp(op->type->idname, "WM_OT_read_factory_settings") == 0;
-       return WM_read_homefile(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
+       return WM_homefile_read(C, op->reports, from_memory) ? OPERATOR_FINISHED : OPERATOR_CANCELLED;
 }
 
 void WM_read_history(void)
@@ -758,7 +758,7 @@ int write_crash_blend(void)
        }
 }
 
-int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *reports, int copy)
+int WM_file_write(bContext *C, const char *target, int fileflags, ReportList *reports, int copy)
 {
        Library *li;
        int len;
@@ -857,7 +857,7 @@ int WM_write_file(bContext *C, const char *target, int fileflags, ReportList *re
 }
 
 /* operator entry */
-int WM_write_homefile(bContext *C, wmOperator *op)
+int WM_homefile_write_exec(bContext *C, wmOperator *op)
 {
        wmWindowManager *wm = CTX_wm_manager(C);
        wmWindow *win = CTX_wm_window(C);
@@ -995,6 +995,6 @@ void wm_autosave_read(bContext *C, ReportList *reports)
        char filename[FILE_MAX];
 
        wm_autosave_location(filename);
-       WM_read_file(C, filename, reports);
+       WM_file_read(C, filename, reports);
 }
 
index dc897820399f89eaa64f6c4e44d4249667e48a6d..0742a52727e9b2db9eef40d4f45bcb06d3cc06af 100644 (file)
@@ -153,7 +153,7 @@ void WM_init(bContext *C, int argc, const char **argv)
        IMB_colormanagement_init();
 
        /* get the default database, plus a wm */
-       WM_read_homefile(C, NULL, G.factory_startup);
+       WM_homefile_read(C, NULL, G.factory_startup);
 
        BLF_lang_set(NULL);
 
@@ -162,7 +162,7 @@ void WM_init(bContext *C, int argc, const char **argv)
         * initializing space types and other internal data.
         *
         * However cant redo this at the moment. Solution is to load python
-        * before WM_read_homefile() or make py-drivers check if python is running.
+        * before WM_homefile_read() or make py-drivers check if python is running.
         * Will try fix when the crash can be repeated. - campbell. */
 
 #ifdef WITH_PYTHON
index bd7b4694471525dfa498bcd58891de5a0aec8748..ce0c7e134544c45666624caa49a31466f3f6a9c3 100644 (file)
@@ -209,7 +209,7 @@ int WM_jobs_is_running(wmJob *steve)
        return steve->running;
 }
 
-void *WM_jobs_get_customdata(wmJob *steve)
+void *WM_jobs_customdata_get(wmJob *steve)
 {
        if (!steve->customdata) {
                return steve->run_customdata;
@@ -219,7 +219,7 @@ void *WM_jobs_get_customdata(wmJob *steve)
        }
 }
 
-void WM_jobs_customdata(wmJob *steve, void *customdata, void (*free)(void *))
+void WM_jobs_customdata_set(wmJob *steve, void *customdata, void (*free)(void *))
 {
        /* pending job? just free */
        if (steve->customdata)
index 52436b6564ceb530e30be3a46da5241625a4a748..59e0614b18aa5cbe3e6c7c2ff18d351e6a4a9b04 100644 (file)
@@ -326,7 +326,7 @@ static int wm_macro_modal(bContext *C, wmOperator *op, wmEvent *event)
                                                }
                                        }
 
-                                       WM_cursor_grab(CTX_wm_window(C), wrap, FALSE, bounds);
+                                       WM_cursor_grab_enable(CTX_wm_window(C), wrap, FALSE, bounds);
                                }
                        }
                }
@@ -1575,7 +1575,7 @@ static void WM_OT_save_homefile(wmOperatorType *ot)
        ot->description = "Make the current file the default .blend file";
                
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_write_homefile;
+       ot->exec = WM_homefile_write_exec;
        ot->poll = WM_operator_winactive;
 }
 
@@ -1586,7 +1586,7 @@ static void WM_OT_read_homefile(wmOperatorType *ot)
        ot->description = "Open the default file (doesn't save the current file)";
        
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_read_homefile_exec;
+       ot->exec = WM_homefile_read_exec;
        /* ommit poll to run in background mode */
 }
 
@@ -1597,7 +1597,7 @@ static void WM_OT_read_factory_settings(wmOperatorType *ot)
        ot->description = "Load default file and user preferences";
        
        ot->invoke = WM_operator_confirm;
-       ot->exec = WM_read_homefile_exec;
+       ot->exec = WM_homefile_read_exec;
        /* ommit poll to run in background mode */
 }
 
@@ -1664,11 +1664,11 @@ static int wm_open_mainfile_exec(bContext *C, wmOperator *op)
        else
                G.f &= ~G_SCRIPT_AUTOEXEC;
        
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
-       WM_read_file(C, path, op->reports);
+       WM_file_read(C, path, op->reports);
        
        return OPERATOR_FINISHED;
 }
@@ -1895,13 +1895,13 @@ static int wm_recover_last_session_exec(bContext *C, wmOperator *op)
 
        G.fileflags |= G_FILE_RECOVER;
 
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
        /* load file */
        BLI_make_file_string("/", filename, BLI_temporary_dir(), "quit.blend");
-       WM_read_file(C, filename, op->reports);
+       WM_file_read(C, filename, op->reports);
 
        G.fileflags &= ~G_FILE_RECOVER;
        return OPERATOR_FINISHED;
@@ -1927,12 +1927,12 @@ static int wm_recover_auto_save_exec(bContext *C, wmOperator *op)
 
        G.fileflags |= G_FILE_RECOVER;
 
-       /* XXX wm in context is not set correctly after WM_read_file -> crash */
+       /* XXX wm in context is not set correctly after WM_file_read -> crash */
        /* do it before for now, but is this correct with multiple windows? */
        WM_event_add_notifier(C, NC_WINDOW, NULL);
 
        /* load file */
-       WM_read_file(C, path, op->reports);
+       WM_file_read(C, path, op->reports);
 
        G.fileflags &= ~G_FILE_RECOVER;
 
@@ -2047,7 +2047,7 @@ static int wm_save_as_mainfile_exec(bContext *C, wmOperator *op)
        }
 #endif
 
-       if (WM_write_file(C, path, fileflags, op->reports, copy) != 0)
+       if (WM_file_write(C, path, fileflags, op->reports, copy) != 0)
                return OPERATOR_CANCELLED;
 
        WM_event_add_notifier(C, NC_WM | ND_FILESAVE, NULL);
index 529910d220ee58e78e6e5165d196f369b9f43a13..c9fb2644cfa947dcaca48092d07f32d78d3a2069 100644 (file)
@@ -376,7 +376,7 @@ unsigned int index_to_framebuffer(int index)
 
 #endif
 
-void WM_set_framebuffer_index_color(int index)
+void WM_framebuffer_index_set(int index)
 {
        const int col = index_to_framebuffer(index);
        cpack(col);
index 1dad92d68932f948cdff663b9276cd3b5962150a..1f1698e8e5aa061554eab158da16691b9e70f960 100644 (file)
@@ -1205,7 +1205,7 @@ void wm_get_cursor_position(wmWindow *win, int *x, int *y)
 
 
 /* called whem no ghost system was initialized */
-void WM_setprefsize(int stax, int stay, int sizx, int sizy)
+void WM_init_state_size_set(int stax, int stay, int sizx, int sizy)
 {
        wm_init_state.start_x = stax; /* left hand pos */
        wm_init_state.start_y = stay; /* bottom pos */
@@ -1215,13 +1215,13 @@ void WM_setprefsize(int stax, int stay, int sizx, int sizy)
 }
 
 /* for borderless and border windows set from command-line */
-void WM_setinitialstate_fullscreen(void)
+void WM_init_state_fullscreen_set(void)
 {
        wm_init_state.windowstate = GHOST_kWindowStateFullScreen;
        wm_init_state.override_flag |= WIN_OVERRIDE_WINSTATE;
 }
 
-void WM_setinitialstate_normal(void)
+void WM_init_state_normal_set(void)
 {
        wm_init_state.windowstate = GHOST_kWindowStateNormal;
        wm_init_state.override_flag |= WIN_OVERRIDE_WINSTATE;
index 26e5e16af48629c02e80b492cee8c2cd787b1a9f..3e884d1aa38f65ccd569b65e57014a2a7953e8cb 100644 (file)
@@ -480,20 +480,20 @@ static int prefsize(int argc, const char **argv, void *UNUSED(data))
        sizx = atoi(argv[3]);
        sizy = atoi(argv[4]);
 
-       WM_setprefsize(stax, stay, sizx, sizy);
+       WM_init_state_size_set(stax, stay, sizx, sizy);
 
        return 4;
 }
 
 static int with_borders(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
 {
-       WM_setinitialstate_normal();
+       WM_init_state_normal_set();
        return 0;
 }
 
 static int without_borders(int UNUSED(argc), const char **UNUSED(argv), void *UNUSED(data))
 {
-       WM_setinitialstate_fullscreen();
+       WM_init_state_fullscreen_set();
        return 0;
 }
 
@@ -1029,7 +1029,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
                        return -1;
                }
 
-               /* WM_read_file() runs normally but since we're in background mode do here */
+               /* WM_file_read() runs normally but since we're in background mode do here */
 #ifdef WITH_PYTHON
                /* run any texts that were loaded in and flagged as modules */
                BPY_driver_reset();
@@ -1046,7 +1046,7 @@ static int load_file(int UNUSED(argc), const char **argv, void *data)
                 * a file - this should do everything a 'load file' does */
                ReportList reports;
                BKE_reports_init(&reports, RPT_PRINT);
-               WM_read_file(C, filename, &reports);
+               WM_file_read(C, filename, &reports);
                BKE_reports_clear(&reports);
        }
 
index 1266250e942248a89ab2d5f204b2861b8a82c4e5..c4daecc9958656515f41cbaf8a4aa0cddf2c2620 100644 (file)
@@ -196,7 +196,7 @@ void KX_BlenderRenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmat
                //page 360/361 3D Game Engine Design, David Eberly for a discussion
                // on screen aligned and axis aligned billboards
                // assumed is that the preprocessor transformed all billboard polygons
-               // so that their normal points into the positive x direction (1.0 , 0.0 , 0.0)
+               // so that their normal points into the positive x direction (1.0, 0.0, 0.0)
                // when new parenting for objects is done, this rotation
                // will be moved into the object
                
index 2fee6aaab92536552ac802f9903c0aa2a4020a45..f74ed7db8f7b6ea640d951a37cb845259fdecdc2 100644 (file)
@@ -299,16 +299,16 @@ public:                                                                       \
  * Method table macro (with doc)
  */
 #define KX_PYMETHODTABLE(class_name, method_name) \
-       {#method_name , (PyCFunction) class_name::sPy##method_name, METH_VARARGS, (const char *)class_name::method_name##_doc}
+       {#method_name, (PyCFunction) class_name::sPy##method_name, METH_VARARGS, (const char *)class_name::method_name##_doc}
 
 #define KX_PYMETHODTABLE_O(class_name, method_name) \
-       {#method_name , (PyCFunction) class_name::sPy##method_name, METH_O, (const char *)class_name::method_name##_doc}
+       {#method_name, (PyCFunction) class_name::sPy##method_name, METH_O, (const char *)class_name::method_name##_doc}
 
 #define KX_PYMETHODTABLE_NOARGS(class_name, method_name) \
-       {#method_name , (PyCFunction) class_name::sPy##method_name, METH_NOARGS, (const char *)class_name::method_name##_doc}
+       {#method_name, (PyCFunction) class_name::sPy##method_name, METH_NOARGS, (const char *)class_name::method_name##_doc}
 
 #define KX_PYMETHODTABLE_KEYWORDS(class_name, method_name) \
-       {#method_name , (PyCFunction) class_name::sPy##method_name, METH_VARARGS|METH_KEYWORDS, (const char *)class_name::method_name##_doc}
+       {#method_name, (PyCFunction) class_name::sPy##method_name, METH_VARARGS|METH_KEYWORDS, (const char *)class_name::method_name##_doc}
 
 /**
  * Function implementation macro
index aa4a1a0bb00f9ed57fba38df0d8fdbb607a19272..e37b4638a1e581048cf4e23fa32887813ebf12b1 100644 (file)
@@ -29,7 +29,7 @@ class CStringValue : public CPropValue
 public:
        /// Construction / destruction
        CStringValue();
-       CStringValue (const char *txt, const char *name , AllocationTYPE alloctype = CValue::HEAPVALUE);
+       CStringValue(const char *txt, const char *name, AllocationTYPE alloctype = CValue::HEAPVALUE);
 
        virtual ~CStringValue() {}
        /// CValue implementation
index 5bdf2e96e93425f9e2c9f2c78cdb3f8cbf1e3b40..5208252ceae10f04ee2b1c8fba00c411f35129c5 100644 (file)
@@ -620,7 +620,7 @@ bool IsPrintable(int keyIndex)
         * - numerals: KX_ZEROKEY to KX_NINEKEY
         * - alphas:   KX_AKEY to KX_ZKEY. 
         * - specials: KX_RETKEY, KX_PADASTERKEY, KX_PADCOMMAKEY to KX_PERIODKEY,
-        *             KX_TABKEY , KX_SEMICOLONKEY to KX_RIGHTBRACKETKEY, 
+        *             KX_TABKEY, KX_SEMICOLONKEY to KX_RIGHTBRACKETKEY,
         *             KX_PAD2 to KX_PADPLUSKEY
         * - delete and backspace: also printable in the sense that they modify 
         *                         the string
index ed2fa8a7dc6e42607ed842f5d75f939d423c5485..749e7748e19ac1d4cc90df8fee4e3c756ac21477 100644 (file)
@@ -205,7 +205,7 @@ void GPC_RenderTools::applyTransform(RAS_IRasterizer* rasty,double* oglmatrix,in
                //page 360/361 3D Game Engine Design, David Eberly for a discussion
                // on screen aligned and axis aligned billboards
                // assumed is that the preprocessor transformed all billboard polygons
-               // so that their normal points into the positive x direction (1.0 , 0.0 , 0.0)
+               // so that their normal points into the positive x direction (1.0, 0.0, 0.0)
                // when new parenting for objects is done, this rotation
                // will be moved into the object
                
index 26cfc560b6d5b088fa90680e72d0fc9064dd8aa8..025611972cef1c4f936ff62e0f575eaa22624884 100644 (file)
@@ -475,7 +475,7 @@ int main(int argc, char** argv)
 
        {
 #if defined(DEBUG)
-               printf("argv[%d] = '%s'   , %i\n", i, argv[i],argc);
+               printf("argv[%d] = '%s', %i\n", i, argv[i],argc);
 #endif
                if (argv[i][0] == '-')
                {
index a7ec1b52bd8222790a73f6d0780e641958901aaa..581b3712f9770d257bdffbd99edceeb3672794f9 100644 (file)
@@ -2282,15 +2282,15 @@ PyObject* initGameKeys()
        KX_MACRO_addTypesToDict(d, PADPLUSKEY, SCA_IInputDevice::KX_PADPLUSKEY);
                
                
-       KX_MACRO_addTypesToDict(d, F1KEY , SCA_IInputDevice::KX_F1KEY);
-       KX_MACRO_addTypesToDict(d, F2KEY , SCA_IInputDevice::KX_F2KEY);
-       KX_MACRO_addTypesToDict(d, F3KEY , SCA_IInputDevice::KX_F3KEY);
-       KX_MACRO_addTypesToDict(d, F4KEY , SCA_IInputDevice::KX_F4KEY);
-       KX_MACRO_addTypesToDict(d, F5KEY , SCA_IInputDevice::KX_F5KEY);
-       KX_MACRO_addTypesToDict(d, F6KEY , SCA_IInputDevice::KX_F6KEY);
-       KX_MACRO_addTypesToDict(d, F7KEY , SCA_IInputDevice::KX_F7KEY);
-       KX_MACRO_addTypesToDict(d, F8KEY , SCA_IInputDevice::KX_F8KEY);
-       KX_MACRO_addTypesToDict(d, F9KEY , SCA_IInputDevice::KX_F9KEY);
+       KX_MACRO_addTypesToDict(d, F1KEY SCA_IInputDevice::KX_F1KEY);
+       KX_MACRO_addTypesToDict(d, F2KEY SCA_IInputDevice::KX_F2KEY);
+       KX_MACRO_addTypesToDict(d, F3KEY SCA_IInputDevice::KX_F3KEY);
+       KX_MACRO_addTypesToDict(d, F4KEY SCA_IInputDevice::KX_F4KEY);
+       KX_MACRO_addTypesToDict(d, F5KEY SCA_IInputDevice::KX_F5KEY);
+       KX_MACRO_addTypesToDict(d, F6KEY SCA_IInputDevice::KX_F6KEY);
+       KX_MACRO_addTypesToDict(d, F7KEY SCA_IInputDevice::KX_F7KEY);
+       KX_MACRO_addTypesToDict(d, F8KEY SCA_IInputDevice::KX_F8KEY);
+       KX_MACRO_addTypesToDict(d, F9KEY SCA_IInputDevice::KX_F9KEY);
        KX_MACRO_addTypesToDict(d, F10KEY, SCA_IInputDevice::KX_F10KEY);
        KX_MACRO_addTypesToDict(d, F11KEY, SCA_IInputDevice::KX_F11KEY);
        KX_MACRO_addTypesToDict(d, F12KEY, SCA_IInputDevice::KX_F12KEY);
@@ -2302,9 +2302,9 @@ PyObject* initGameKeys()
        KX_MACRO_addTypesToDict(d, F18KEY, SCA_IInputDevice::KX_F18KEY);
        KX_MACRO_addTypesToDict(d, F19KEY, SCA_IInputDevice::KX_F19KEY);
                
-       KX_MACRO_addTypesToDict(d, PAUSEKEY, SCA_IInputDevice::KX_PAUSEKEY);
+       KX_MACRO_addTypesToDict(d, PAUSEKEY,  SCA_IInputDevice::KX_PAUSEKEY);
        KX_MACRO_addTypesToDict(d, INSERTKEY, SCA_IInputDevice::KX_INSERTKEY);
-       KX_MACRO_addTypesToDict(d, HOMEKEY , SCA_IInputDevice::KX_HOMEKEY);
+       KX_MACRO_addTypesToDict(d, HOMEKEY,   SCA_IInputDevice::KX_HOMEKEY);
        KX_MACRO_addTypesToDict(d, PAGEUPKEY, SCA_IInputDevice::KX_PAGEUPKEY);
        KX_MACRO_addTypesToDict(d, PAGEDOWNKEY, SCA_IInputDevice::KX_PAGEDOWNKEY);
        KX_MACRO_addTypesToDict(d, ENDKEY, SCA_IInputDevice::KX_ENDKEY);