Revision: 41193
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41193
Author:   nazgul
Date:     2011-10-22 15:15:42 +0000 (Sat, 22 Oct 2011)
Log Message:
-----------
Merging r41176 through r41192 from trunk into soc-2011-tomato

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

Modified Paths:
--------------
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/soc-2011-tomato/intern/ghost/test/multitest/MultiTest.c
    branches/soc-2011-tomato/intern/memutil/MEM_SmartPtr.h
    branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c
    branches/soc-2011-tomato/source/blender/blenfont/intern/blf_lang.c
    branches/soc-2011-tomato/source/blender/blenkernel/BKE_bvhutils.h
    branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/bvhutils.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/cloth.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/constraint.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/customdata.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/effect.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/modifier.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/particle_system.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/pointcache.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/sequencer.c
    branches/soc-2011-tomato/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/soc-2011-tomato/source/blender/blenlib/BLI_blenlib.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_fileops.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_path_util.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_storage.h
    branches/soc-2011-tomato/source/blender/blenlib/BLI_utildefines.h
    branches/soc-2011-tomato/source/blender/blenlib/intern/fileops.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/path_util.c
    branches/soc-2011-tomato/source/blender/blenlib/intern/storage.c
    branches/soc-2011-tomato/source/blender/blenloader/intern/readfile.c
    branches/soc-2011-tomato/source/blender/collada/collada.cpp
    branches/soc-2011-tomato/source/blender/editors/animation/anim_ipo_utils.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_handlers.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_layout.c
    branches/soc-2011-tomato/source/blender/editors/interface/interface_panel.c
    
branches/soc-2011-tomato/source/blender/editors/interface/interface_templates.c
    branches/soc-2011-tomato/source/blender/editors/interface/resources.c
    branches/soc-2011-tomato/source/blender/editors/mesh/mesh_navmesh.c
    branches/soc-2011-tomato/source/blender/editors/physics/particle_edit.c
    branches/soc-2011-tomato/source/blender/editors/physics/physics_fluid.c
    branches/soc-2011-tomato/source/blender/editors/render/render_shading.c
    
branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_context.c
    branches/soc-2011-tomato/source/blender/editors/space_buttons/buttons_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_file/file_ops.c
    branches/soc-2011-tomato/source/blender/editors/space_file/filesel.c
    branches/soc-2011-tomato/source/blender/editors/space_file/fsmenu.c
    branches/soc-2011-tomato/source/blender/editors/space_node/node_edit.c
    
branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_edit.c
    
branches/soc-2011-tomato/source/blender/editors/space_outliner/outliner_tree.c
    
branches/soc-2011-tomato/source/blender/editors/space_sequencer/space_sequencer.c
    branches/soc-2011-tomato/source/blender/editors/transform/transform.c
    branches/soc-2011-tomato/source/blender/imbuf/intern/IMB_anim.h
    branches/soc-2011-tomato/source/blender/makesrna/RNA_access.h
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_access.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_armature_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_fcurve_api.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_fluidsim.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_gpencil.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_object_force.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_particle.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_scene.c
    branches/soc-2011-tomato/source/blender/makesrna/intern/rna_userdef.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_edgesplit.c
    branches/soc-2011-tomato/source/blender/modifiers/intern/MOD_fluidsim_util.c
    
branches/soc-2011-tomato/source/blender/nodes/composite/node_composite_util.c
    
branches/soc-2011-tomato/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
    branches/soc-2011-tomato/source/blender/python/BPY_extern.h
    branches/soc-2011-tomato/source/blender/python/generic/IDProp.c
    branches/soc-2011-tomato/source/blender/python/generic/py_capi_utils.c
    branches/soc-2011-tomato/source/blender/python/generic/py_capi_utils.h
    branches/soc-2011-tomato/source/blender/python/intern/bpy_app.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_interface.c
    branches/soc-2011-tomato/source/blender/python/intern/bpy_rna.c
    branches/soc-2011-tomato/source/blender/render/intern/source/pipeline.c
    branches/soc-2011-tomato/source/blender/windowmanager/WM_types.h
    
branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_event_system.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_files.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_keymap.c
    branches/soc-2011-tomato/source/blender/windowmanager/intern/wm_operators.c
    branches/soc-2011-tomato/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/soc-2011-tomato/source/creator/creator.c
    branches/soc-2011-tomato/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    
branches/soc-2011-tomato/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
    
branches/soc-2011-tomato/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
    
branches/soc-2011-tomato/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
    branches/soc-2011-tomato/source/gameengine/VideoTexture/VideoFFmpeg.cpp

Property Changed:
----------------
    branches/soc-2011-tomato/
    branches/soc-2011-tomato/source/blender/editors/space_outliner/


Property changes on: branches/soc-2011-tomato
___________________________________________________________________
Modified: svn:mergeinfo
   - /branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-41175
   + /branches/vgroup_modifiers:38694-39989
/trunk/blender:36831-41192

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemCocoa.mm   
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemCocoa.mm   
2011-10-22 15:15:42 UTC (rev 41193)
@@ -1655,15 +1655,8 @@
                return GHOST_kFailure;
        }
 
-       /* unicode input - not entirely supported yet
-        * but we are getting the right byte, Blender is not drawing it though 
-        * also some languages may need special treatment:
-                 - Japanese: romanji is used as input, and every 2 letters OSX 
converts the text
-                             to Hiragana/Katakana.
-                 - Korean: one add one letter at a time, and then the OSX join 
them in the equivalent
-                           combined letter.
-        */
        char utf8_buf[6]= {'\0'};
+       ascii = 0;
        
        switch ([event type]) {
 
@@ -1678,39 +1671,21 @@
                                keyCode = convertKey([event keyCode],0,
                                                                         [event 
type] == NSKeyDown?kUCKeyActionDown:kUCKeyActionUp);
 
-                       /* ascii */
+                       /* handling both unicode or ascii */
                        characters = [event characters];
-                       if ([characters length]>0) { //Check for dead keys
-                               //Convert characters to iso latin 1 encoding
-                               convertedCharacters = [characters 
dataUsingEncoding:NSISOLatin1StringEncoding];
-                               if ([convertedCharacters length]>0)
-                                       ascii =((char*)[convertedCharacters 
bytes])[0];
-                               else
-                                       ascii = 0; //Character not available in 
iso latin 1 encoding
-                       }
-                       else
-                               ascii= 0;
-
-                       /* unicode */
                        if ([characters length]>0) {
                                convertedCharacters = [characters 
dataUsingEncoding:NSUTF8StringEncoding];
-                               if ([convertedCharacters length]>0) {
-                                       utf8_buf[0] = 
((char*)[convertedCharacters bytes])[0];
-                                       utf8_buf[1] = 
((char*)[convertedCharacters bytes])[1];
-                                       utf8_buf[2] = 
((char*)[convertedCharacters bytes])[2];
-                                       utf8_buf[3] = 
((char*)[convertedCharacters bytes])[3];
-                                       utf8_buf[4] = 
((char*)[convertedCharacters bytes])[4];
-                                       utf8_buf[5] = 
((char*)[convertedCharacters bytes])[5];
+                               
+                               for (int x = 0; x < [convertedCharacters 
length]; x++) {
+                                       utf8_buf[x] = 
((char*)[convertedCharacters bytes])[x];
                                }
-                               else {
-                                       utf8_buf[0] = '\0';
+
+                               /* ascii is a subset of unicode */
+                               if ([convertedCharacters length] == 1) {
+                                       ascii = utf8_buf[0];
                                }
                        }
 
-                       /* XXX the above code gives us the right utf8, however 
if we pass it along Font Object doesn't work.
-                          let's leave utf8 disabled for OSX before we fix that 
*/
-                       utf8_buf[0] = '\0';//to be removed once things are 
working
-                       
                        if ((keyCode == GHOST_kKeyQ) && (m_modifierMask & 
NSCommandKeyMask))
                                break; //Cmd-Q is directly handled by Cocoa
 
@@ -1718,8 +1693,8 @@
                                pushEvent( new GHOST_EventKey([event 
timestamp]*1000, GHOST_kEventKeyDown, window, keyCode, ascii, utf8_buf) );
                                //printf("Key down rawCode=0x%x 
charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event 
keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers 
characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
                        } else {
-                               pushEvent( new GHOST_EventKey([event 
timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, ascii, utf8_buf) );
-                               //printf("Key down rawCode=0x%x 
charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event 
keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers 
characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
+                               pushEvent( new GHOST_EventKey([event 
timestamp]*1000, GHOST_kEventKeyUp, window, keyCode, 0, '\0') );
+                               //printf("Key up rawCode=0x%x 
charsIgnoringModifiers=%c keyCode=%u ascii=%i %c utf8=%s\n",[event 
keyCode],[charsIgnoringModifiers length]>0?[charsIgnoringModifiers 
characterAtIndex:0]:' ',keyCode,ascii,ascii, utf8_buf);
                        }
                        break;
        

Modified: branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp  
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/intern/ghost/intern/GHOST_SystemWin32.cpp  
2011-10-22 15:15:42 UTC (rev 41193)
@@ -712,22 +712,24 @@
        GHOST_SystemWin32 * system = (GHOST_SystemWin32 *)getSystem();
        GHOST_TKey key = system->hardKey(window, raw, &keyDown, &vk);
        GHOST_EventKey* event;
+
        if (key != GHOST_kKeyUnknown) {
-               char ascii = '\0';
+               char utf8_char[6] = {0} ;
 
-               unsigned short utf16[2]={0};
+               wchar_t utf16[2]={0};
                BYTE state[256];
-               GetKeyboardState((PBYTE)state);
+               GetKeyboardState((PBYTE)state);  
 
-               if(ToAsciiEx(vk, 0, state, utf16, 0, system->m_keylayout))
-                               WideCharToMultiByte(CP_ACP, 0x00000400, 
+               if(ToUnicodeEx(vk, 0, state, utf16, 2, 0, system->m_keylayout))
+                       WideCharToMultiByte(CP_UTF8, 0, 
                                                                        
(wchar_t*)utf16, 1,
-                                                                       (LPSTR) 
&ascii, 1,
-                                                                       
NULL,NULL);
+                                                                       (LPSTR) 
utf8_char, 5,
+                                                                       
NULL,NULL); else *utf8_char = 0;
 
-               /* TODO, last arg is utf8, need to pass utf8 arg */
-               event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? 
GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, ascii, NULL);
+               if(!keyDown) utf8_char[0] = '\0';
                
+               event = new GHOST_EventKey(system->getMilliSeconds(), keyDown ? 
GHOST_kEventKeyDown: GHOST_kEventKeyUp, window, key, (*utf8_char & 
0x80)?'?':*utf8_char, utf8_char);
+               
 #ifdef GHOST_DEBUG
                std::cout << ascii << std::endl;
 #endif

Modified: branches/soc-2011-tomato/intern/ghost/test/multitest/MultiTest.c
===================================================================
--- branches/soc-2011-tomato/intern/ghost/test/multitest/MultiTest.c    
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/intern/ghost/test/multitest/MultiTest.c    
2011-10-22 15:15:42 UTC (rev 41193)
@@ -50,9 +50,8 @@
    extern int datatoc_bfont_ttf_size;
    extern char datatoc_bfont_ttf[];
 
-   // XXX, bad, but BLI uses these
-   char bprogname[160]= "";
-char U[1024]= {0};
+   /* cheat */
+   char U[1024]= {0};
 #endif
 
 #include "Util.h"

Modified: branches/soc-2011-tomato/intern/memutil/MEM_SmartPtr.h
===================================================================
--- branches/soc-2011-tomato/intern/memutil/MEM_SmartPtr.h      2011-10-22 
11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/intern/memutil/MEM_SmartPtr.h      2011-10-22 
15:15:42 UTC (rev 41193)
@@ -49,14 +49,14 @@
  * the Standard Template Library but without the painful get()
  * semantics to access the internal c style pointer.
  *
- * It is often useful to explicitely decalre ownership of memory
+ * It is often useful to explicitly declare ownership of memory
  * allocated on the heap within class or function scope. This
  * class helps you to encapsulate this ownership within a value
  * type. When an instance of this class goes out of scope it
  * makes sure that any memory associated with it's internal pointer
  * is deleted. It can help to inform users of an aggregate class
  * that it owns instances of it's members and these instances 
- * should not be shared. This is not reliably enforcable in C++
+ * should not be shared. This is not reliably enforceable in C++
  * but this class attempts to make the 1-1 relationship clear.
  * 
  * @section Example usage

Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c   
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf_dir.c   
2011-10-22 15:15:42 UTC (rev 41193)
@@ -136,7 +136,7 @@
 
        for(dir=global_font_dir.first; dir; dir= dir->next) {
                BLI_join_dirfile(full_path, sizeof(full_path), dir->path, file);
-               if (BLI_exist(full_path)) {
+               if (BLI_exists(full_path)) {
                        s= BLI_strdup(full_path);
                        break;
                }
@@ -144,7 +144,7 @@
 
        if (!s) {
                /* check the current directory, why not ? */
-               if (BLI_exist(file))
+               if (BLI_exists(file))
                        s= BLI_strdup(file);
        }
 
@@ -198,13 +198,13 @@
                s[2]= 'm';
 
                /* first check .afm */
-               if (BLI_exist(s))
+               if (BLI_exists(s))
                        return s;
 
                /* and now check .pfm */
                s[0]= 'p';
 
-               if (BLI_exist(s))
+               if (BLI_exists(s))
                        return s;
        }
        MEM_freeN(mfile);

Modified: branches/soc-2011-tomato/source/blender/blenfont/intern/blf_lang.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenfont/intern/blf_lang.c  
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/source/blender/blenfont/intern/blf_lang.c  
2011-10-22 15:15:42 UTC (rev 41193)
@@ -55,6 +55,7 @@
 
 #include "BLI_linklist.h"      /* linknode */
 #include "BLI_string.h"
+#include "BLI_utildefines.h"
 #include "BLI_path_util.h"
 
 #define DOMAIN_NAME "blender"

Modified: branches/soc-2011-tomato/source/blender/blenkernel/BKE_bvhutils.h
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/BKE_bvhutils.h   
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/source/blender/blenkernel/BKE_bvhutils.h   
2011-10-22 15:15:42 UTC (rev 41193)
@@ -34,7 +34,6 @@
  */
 
 #include "BLI_kdopbvh.h"
-#include "BLI_linklist.h"
 
 /*
  * This header encapsulates necessary code to buld a BVH
@@ -118,7 +117,7 @@
 #define BVHTREE_FROM_VERTICES  1
 #define BVHTREE_FROM_EDGES             2
 
-typedef LinkNode* BVHCache;
+typedef struct LinkNode* BVHCache;
 
 
 /*

Modified: 
branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c
===================================================================
--- branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c     
2011-10-22 11:34:01 UTC (rev 41192)
+++ branches/soc-2011-tomato/source/blender/blenkernel/intern/DerivedMesh.c     
2011-10-22 15:15:42 UTC (rev 41193)
@@ -50,6 +50,7 @@
 #include "BLI_memarena.h"
 #include "BLI_pbvh.h"
 #include "BLI_utildefines.h"
+#include "BLI_linklist.h"
 
 #include "BKE_cdderivedmesh.h"
 #include "BKE_displist.h"

Modified: branches/soc-2011-tomato/source/blender/blenkernel/intern/blender.c
===================================================================

@@ Diff output truncated at 10240 characters. @@
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to