[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [41240] branches/bmesh/blender: svn merge ^/trunk/blender -r41175:41200 --- will need to apply fix after

Campbell Barton ideasman42 at gmail.com
Mon Oct 24 09:56:43 CEST 2011


Revision: 41240
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=41240
Author:   campbellbarton
Date:     2011-10-24 07:56:42 +0000 (Mon, 24 Oct 2011)
Log Message:
-----------
svn merge ^/trunk/blender -r41175:41200   --- will need to apply fix after

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

Modified Paths:
--------------
    branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
    branches/bmesh/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
    branches/bmesh/blender/intern/ghost/test/multitest/MultiTest.c
    branches/bmesh/blender/intern/memutil/MEM_SmartPtr.h
    branches/bmesh/blender/release/datafiles/splash.png
    branches/bmesh/blender/source/blender/blenfont/intern/blf_dir.c
    branches/bmesh/blender/source/blender/blenfont/intern/blf_lang.c
    branches/bmesh/blender/source/blender/blenfont/intern/blf_translation.c
    branches/bmesh/blender/source/blender/blenkernel/BKE_bvhutils.h
    branches/bmesh/blender/source/blender/blenkernel/intern/DerivedMesh.c
    branches/bmesh/blender/source/blender/blenkernel/intern/blender.c
    branches/bmesh/blender/source/blender/blenkernel/intern/bvhutils.c
    branches/bmesh/blender/source/blender/blenkernel/intern/cloth.c
    branches/bmesh/blender/source/blender/blenkernel/intern/constraint.c
    branches/bmesh/blender/source/blender/blenkernel/intern/customdata.c
    branches/bmesh/blender/source/blender/blenkernel/intern/effect.c
    branches/bmesh/blender/source/blender/blenkernel/intern/fluidsim.c
    branches/bmesh/blender/source/blender/blenkernel/intern/modifier.c
    branches/bmesh/blender/source/blender/blenkernel/intern/packedFile.c
    branches/bmesh/blender/source/blender/blenkernel/intern/particle.c
    branches/bmesh/blender/source/blender/blenkernel/intern/particle_system.c
    branches/bmesh/blender/source/blender/blenkernel/intern/pointcache.c
    branches/bmesh/blender/source/blender/blenkernel/intern/sequencer.c
    branches/bmesh/blender/source/blender/blenkernel/intern/subsurf_ccg.c
    branches/bmesh/blender/source/blender/blenlib/BLI_blenlib.h
    branches/bmesh/blender/source/blender/blenlib/BLI_edgehash.h
    branches/bmesh/blender/source/blender/blenlib/BLI_fileops.h
    branches/bmesh/blender/source/blender/blenlib/BLI_path_util.h
    branches/bmesh/blender/source/blender/blenlib/BLI_scanfill.h
    branches/bmesh/blender/source/blender/blenlib/BLI_utildefines.h
    branches/bmesh/blender/source/blender/blenlib/CMakeLists.txt
    branches/bmesh/blender/source/blender/blenlib/intern/fileops.c
    branches/bmesh/blender/source/blender/blenlib/intern/path_util.c
    branches/bmesh/blender/source/blender/blenloader/intern/readblenentry.c
    branches/bmesh/blender/source/blender/blenloader/intern/readfile.c
    branches/bmesh/blender/source/blender/blenloader/intern/runtime.c
    branches/bmesh/blender/source/blender/blenloader/intern/writefile.c
    branches/bmesh/blender/source/blender/collada/ImageExporter.cpp
    branches/bmesh/blender/source/blender/collada/collada.cpp
    branches/bmesh/blender/source/blender/editors/animation/anim_ipo_utils.c
    branches/bmesh/blender/source/blender/editors/datafiles/splash.png.c
    branches/bmesh/blender/source/blender/editors/interface/interface.c
    branches/bmesh/blender/source/blender/editors/interface/interface_handlers.c
    branches/bmesh/blender/source/blender/editors/interface/interface_icons.c
    branches/bmesh/blender/source/blender/editors/interface/interface_layout.c
    branches/bmesh/blender/source/blender/editors/interface/interface_panel.c
    branches/bmesh/blender/source/blender/editors/interface/interface_templates.c
    branches/bmesh/blender/source/blender/editors/interface/resources.c
    branches/bmesh/blender/source/blender/editors/mesh/mesh_navmesh.c
    branches/bmesh/blender/source/blender/editors/physics/particle_edit.c
    branches/bmesh/blender/source/blender/editors/physics/physics_fluid.c
    branches/bmesh/blender/source/blender/editors/render/render_shading.c
    branches/bmesh/blender/source/blender/editors/space_buttons/buttons_context.c
    branches/bmesh/blender/source/blender/editors/space_buttons/buttons_ops.c
    branches/bmesh/blender/source/blender/editors/space_file/file_draw.c
    branches/bmesh/blender/source/blender/editors/space_file/file_ops.c
    branches/bmesh/blender/source/blender/editors/space_file/filelist.c
    branches/bmesh/blender/source/blender/editors/space_file/filesel.c
    branches/bmesh/blender/source/blender/editors/space_file/fsmenu.c
    branches/bmesh/blender/source/blender/editors/space_file/space_file.c
    branches/bmesh/blender/source/blender/editors/space_image/image_ops.c
    branches/bmesh/blender/source/blender/editors/space_node/node_edit.c
    branches/bmesh/blender/source/blender/editors/space_outliner/outliner_edit.c
    branches/bmesh/blender/source/blender/editors/space_outliner/outliner_tree.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_add.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/sequencer_edit.c
    branches/bmesh/blender/source/blender/editors/space_sequencer/space_sequencer.c
    branches/bmesh/blender/source/blender/editors/transform/transform.c
    branches/bmesh/blender/source/blender/imbuf/intern/IMB_anim.h
    branches/bmesh/blender/source/blender/imbuf/intern/openexr/openexr_api.cpp
    branches/bmesh/blender/source/blender/imbuf/intern/readimage.c
    branches/bmesh/blender/source/blender/imbuf/intern/thumbs.c
    branches/bmesh/blender/source/blender/makesrna/RNA_access.h
    branches/bmesh/blender/source/blender/makesrna/intern/rna_access.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_armature_api.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_fcurve_api.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_fluidsim.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_gpencil.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_object_force.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_particle.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_render.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_scene.c
    branches/bmesh/blender/source/blender/makesrna/intern/rna_userdef.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_edgesplit.c
    branches/bmesh/blender/source/blender/modifiers/intern/MOD_fluidsim_util.c
    branches/bmesh/blender/source/blender/nodes/composite/node_composite_util.c
    branches/bmesh/blender/source/blender/nodes/composite/nodes/node_composite_directionalblur.c
    branches/bmesh/blender/source/blender/python/BPY_extern.h
    branches/bmesh/blender/source/blender/python/generic/IDProp.c
    branches/bmesh/blender/source/blender/python/generic/py_capi_utils.c
    branches/bmesh/blender/source/blender/python/generic/py_capi_utils.h
    branches/bmesh/blender/source/blender/python/intern/bpy_app.c
    branches/bmesh/blender/source/blender/python/intern/bpy_interface.c
    branches/bmesh/blender/source/blender/python/intern/bpy_rna.c
    branches/bmesh/blender/source/blender/render/CMakeLists.txt
    branches/bmesh/blender/source/blender/render/extern/include/RE_pipeline.h
    branches/bmesh/blender/source/blender/render/intern/include/renderpipeline.h
    branches/bmesh/blender/source/blender/render/intern/source/pipeline.c
    branches/bmesh/blender/source/blender/windowmanager/WM_types.h
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_event_system.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_files.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_init_exit.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_keymap.c
    branches/bmesh/blender/source/blender/windowmanager/intern/wm_operators.c
    branches/bmesh/blender/source/blenderplayer/bad_level_call_stubs/stubs.c
    branches/bmesh/blender/source/creator/creator.c
    branches/bmesh/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
    branches/bmesh/blender/source/gameengine/Ketsji/KX_BulletPhysicsController.cpp
    branches/bmesh/blender/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
    branches/bmesh/blender/source/gameengine/Physics/common/PHY_IPhysicsEnvironment.h
    branches/bmesh/blender/source/gameengine/VideoTexture/VideoFFmpeg.cpp

Added Paths:
-----------
    branches/bmesh/blender/source/blender/blenlib/BLI_fileops_types.h
    branches/bmesh/blender/source/blender/blenlib/intern/storage.c
    branches/bmesh/blender/source/blender/render/extern/include/RE_engine.h
    branches/bmesh/blender/source/blender/render/intern/source/external_engine.c

Removed Paths:
-------------
    branches/bmesh/blender/source/blender/blenlib/BLI_storage.h
    branches/bmesh/blender/source/blender/blenlib/BLI_storage_types.h
    branches/bmesh/blender/source/blender/blenlib/intern/storage.c

Property Changed:
----------------
    branches/bmesh/blender/
    branches/bmesh/blender/release/
    branches/bmesh/blender/source/blender/editors/space_outliner/


Property changes on: branches/bmesh/blender
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender:39992-41175
   + /trunk/blender:39992-41200

Modified: branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.mm
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.mm	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_SystemCocoa.mm	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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/bmesh/blender/intern/ghost/intern/GHOST_SystemWin32.cpp
===================================================================
--- branches/bmesh/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/intern/ghost/intern/GHOST_SystemWin32.cpp	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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/bmesh/blender/intern/ghost/test/multitest/MultiTest.c
===================================================================
--- branches/bmesh/blender/intern/ghost/test/multitest/MultiTest.c	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/intern/ghost/test/multitest/MultiTest.c	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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/bmesh/blender/intern/memutil/MEM_SmartPtr.h
===================================================================
--- branches/bmesh/blender/intern/memutil/MEM_SmartPtr.h	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/intern/memutil/MEM_SmartPtr.h	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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


Property changes on: branches/bmesh/blender/release
___________________________________________________________________
Modified: svn:mergeinfo
   - /trunk/blender/release:31524-41175
   + /trunk/blender/release:31524-41200

Modified: branches/bmesh/blender/release/datafiles/splash.png
===================================================================
(Binary files differ)

Modified: branches/bmesh/blender/source/blender/blenfont/intern/blf_dir.c
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_dir.c	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_dir.c	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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/bmesh/blender/source/blender/blenfont/intern/blf_lang.c
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_lang.c	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_lang.c	2011-10-24 07:56:42 UTC (rev 41240)
@@ -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/bmesh/blender/source/blender/blenfont/intern/blf_translation.c
===================================================================
--- branches/bmesh/blender/source/blender/blenfont/intern/blf_translation.c	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/source/blender/blenfont/intern/blf_translation.c	2011-10-24 07:56:42 UTC (rev 41240)
@@ -60,7 +60,7 @@
 
 			BLI_snprintf(unifont_path, sizeof(unifont_path), "%s/%s", fontpath, unifont_filename);
 
-			unifont_ttf= (unsigned char*)BLI_ungzip_to_mem(unifont_path, &unifont_size);
+			unifont_ttf= (unsigned char*)BLI_file_ungzip_to_mem(unifont_path, &unifont_size);
 		}
 		else {
 			printf("%s: 'fonts' data path not found for international font, continuing\n", __func__);

Modified: branches/bmesh/blender/source/blender/blenkernel/BKE_bvhutils.h
===================================================================
--- branches/bmesh/blender/source/blender/blenkernel/BKE_bvhutils.h	2011-10-24 07:25:34 UTC (rev 41239)
+++ branches/bmesh/blender/source/blender/blenkernel/BKE_bvhutils.h	2011-10-24 07:56:42 UTC (rev 41240)
@@ -34,7 +34,6 @@
  */

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list