[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [14556] branches/apricot: changes from trunk
Campbell Barton
ideasman42 at gmail.com
Sat Apr 26 16:02:48 CEST 2008
Revision: 14556
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=14556
Author: campbellbarton
Date: 2008-04-26 16:02:41 +0200 (Sat, 26 Apr 2008)
Log Message:
-----------
changes from trunk
Modified Paths:
--------------
branches/apricot/extern/ffmpeg/SConscript
branches/apricot/extern/ffmpeg/configure
branches/apricot/extern/ffmpeg/patches/README
branches/apricot/source/blender/blenkernel/BKE_font.h
branches/apricot/source/blender/blenkernel/intern/font.c
branches/apricot/source/blender/blenkernel/intern/pointcache.c
branches/apricot/source/blender/blenkernel/intern/text.c
branches/apricot/source/blender/blenlib/BLI_blenlib.h
branches/apricot/source/blender/blenlib/BLI_bpath.h
branches/apricot/source/blender/blenlib/intern/bpath.c
branches/apricot/source/blender/blenlib/intern/util.c
branches/apricot/source/blender/ftfont/intern/FTF_TTFont.cpp
branches/apricot/source/blender/include/BSE_sequence.h
branches/apricot/source/blender/python/BPY_interface.c
branches/apricot/source/blender/python/api2_2x/Blender.c
branches/apricot/source/blender/src/buttons_object.c
branches/apricot/source/blender/src/buttons_scene.c
branches/apricot/source/blender/src/editfont.c
branches/apricot/source/blender/src/editscreen.c
branches/apricot/source/blender/src/previewrender.c
branches/apricot/source/blender/src/toets.c
branches/apricot/source/blender/src/transform_generics.c
branches/apricot/source/blender/src/usiblender.c
branches/apricot/source/blender/yafray/SConscript
branches/apricot/source/creator/CMakeLists.txt
branches/apricot/source/gameengine/GameLogic/SCA_LogicManager.cpp
branches/apricot/source/gameengine/Ketsji/KX_GameObject.cpp
branches/apricot/source/gameengine/Ketsji/KX_Scene.cpp
branches/apricot/source/gameengine/Physics/Bullet/CcdPhysicsController.cpp
Modified: branches/apricot/extern/ffmpeg/SConscript
===================================================================
--- branches/apricot/extern/ffmpeg/SConscript 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/extern/ffmpeg/SConscript 2008-04-26 14:02:41 UTC (rev 14556)
@@ -6,12 +6,12 @@
root = "extern/ffmpeg"
if env['OURPLATFORM'] == 'win32-mingw':
- ffmpeg_switches = "--disable-shared --enable-liba52bin --enable-gpl --disable-network --disable-zlib --disable-vhook --disable-ffserver --disable-ffplay --enable-swscaler --enable-pthreads --enable-libx264 --enable-libxvid"
+ ffmpeg_switches = "--disable-shared --enable-liba52bin --enable-gpl --disable-network --disable-zlib --disable-vhook --disable-ffserver --disable-ffplay --enable-swscaler --enable-pthreads --enable-libx264 --enable-libxvid --enable-libmp3lame"
else:
- ffmpeg_switches = "--disable-shared --enable-liba52bin --enable-gpl --disable-network --disable-zlib --disable-vhook --disable-ffserver --disable-ffplay --enable-swscaler --enable-memalign-hack --enable-libx264 --enable-libxvid"
+ ffmpeg_switches = "--disable-shared --enable-liba52bin --enable-gpl --disable-network --disable-zlib --disable-vhook --disable-ffserver --disable-ffplay --enable-swscaler --enable-memalign-hack --enable-libx264 --enable-libxvid --enable-libmp3lame"
extra_variables = { }
-extra_includes = [ "../x264", "../xvidcore/src" ]
+extra_includes = [ "../x264", "../xvidcore/src", "../libmp3lame" ]
import sys
import os
Modified: branches/apricot/extern/ffmpeg/configure
===================================================================
--- branches/apricot/extern/ffmpeg/configure 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/extern/ffmpeg/configure 2008-04-26 14:02:41 UTC (rev 14556)
@@ -1567,7 +1567,7 @@
enabled libfaac && require2 libfaac "stdint.h faac.h" faacEncGetVersion -lfaac
enabled libfaad && require2 libfaad faad.h faacDecOpen -lfaad
enabled libgsm && require libgsm gsm.h gsm_create -lgsm
-enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
+# enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
enabled libnut && require libnut libnut.h nut_demuxer_init -lnut
enabled libogg && require libogg ogg/ogg.h ogg_sync_init -logg
enabled libtheora && require libtheora theora/theora.h theora_info_init -ltheora -logg
Modified: branches/apricot/extern/ffmpeg/patches/README
===================================================================
--- branches/apricot/extern/ffmpeg/patches/README 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/extern/ffmpeg/patches/README 2008-04-26 14:02:41 UTC (rev 14556)
@@ -8,19 +8,21 @@
Additionally:
- To make ffmpeg work with scons, you have to disable the libx264 library
test! (or you have to install libx264 seperately, your choice)
- same goes for XVid
+ same goes for XVid and libmp3lame
change
enabled libx264 && require x264 x264.h x264_encoder_open -lx264
enabled libxvid && require Xvid xvid.h xvid_global -lxvidcore
+ enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
into
# enabled libx264 && require x264 x264.h x264_encoder_open -lx264
# enabled libxvid && require Xvid xvid.h xvid_global -lxvidcore
+ # enabled libmp3lame && require LAME lame/lame.h lame_init -lmp3lame -lm
within configure
--- Peter
\ No newline at end of file
+-- Peter
Modified: branches/apricot/source/blender/blenkernel/BKE_font.h
===================================================================
--- branches/apricot/source/blender/blenkernel/BKE_font.h 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenkernel/BKE_font.h 2008-04-26 14:02:41 UTC (rev 14556)
@@ -31,6 +31,10 @@
#ifndef BKE_VFONT_H
#define BKE_VFONT_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#include <wchar.h>
struct VFont;
@@ -65,7 +69,11 @@
void chtoutf8(unsigned long c, char *o);
void wcs2utf8s(char *dst, wchar_t *src);
int wcsleninu8(wchar_t *src);
-int utf8towchar_(wchar_t *w, char *c);
+int utf8towchar(wchar_t *w, char *c);
+#ifdef __cplusplus
+}
#endif
+#endif
+
Modified: branches/apricot/source/blender/blenkernel/intern/font.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/font.c 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenkernel/intern/font.c 2008-04-26 14:02:41 UTC (rev 14556)
@@ -159,41 +159,61 @@
return size;
}
-int utf8towchar_(wchar_t *w, char *c)
+
+/* Converts Unicode to wchar
+
+According to RFC 3629 "UTF-8, a transformation format of ISO 10646"
+(http://tools.ietf.org/html/rfc3629), the valid UTF-8 encoding are:
+
+ Char. number range | UTF-8 octet sequence
+ (hexadecimal) | (binary)
+ --------------------+---------------------------------------------
+ 0000 0000-0000 007F | 0xxxxxxx
+ 0000 0080-0000 07FF | 110xxxxx 10xxxxxx
+ 0000 0800-0000 FFFF | 1110xxxx 10xxxxxx 10xxxxxx
+ 0001 0000-0010 FFFF | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx
+
+If the encoding incidated by the first character is incorrect (because the
+1 to 3 following characters do not match 10xxxxxx), the output is a '?' and
+only a single input character is consumed.
+
+*/
+
+int utf8towchar(wchar_t *w, char *c)
{
int len=0;
+
if(w==NULL || c==NULL) return(0);
- //printf("%s\n",c);
- while(*c)
- {
- if(*c & 0x80)
- {
- if(*c & 0x40)
- {
- if(*c & 0x20)
- {
- if(*c & 0x10)
- {
- *w=(c[0] & 0x0f)<<18 | (c[1]&0x1f)<<12 | (c[2]&0x3f)<<6 | (c[3]&0x7f);
- c++;
- }
- else
- *w=(c[0] & 0x1f)<<12 | (c[1]&0x3f)<<6 | (c[2]&0x7f);
- c++;
- }
- else
- *w=(((c[0] &0x3f)<<6) | (c[1]&0x7f));
+
+ while(*c) {
+ if ((*c & 0xe0) == 0xc0) {
+ if((c[1] & 0x80) && (c[1] & 0x40) == 0x00) {
+ *w=((c[0] &0x1f)<<6) | (c[1]&0x3f);
c++;
+ } else {
+ *w = '?';
}
- else
- *w=(c[0] & 0x7f);
+ } else if ((*c & 0xf0) == 0xe0) {
+ if((c[1] & c[2] & 0x80) && ((c[1] | c[2]) & 0x40) == 0x00) {
+ *w=((c[0] & 0x0f)<<12) | ((c[1]&0x3f)<<6) | (c[2]&0x3f);
+ c += 2;
+ } else {
+ *w = '?';
}
- else
- *w=(c[0] & 0x7f);
- c++;
- w++;
- len++;
- }
+ } else if ((*c & 0xf8) == 0xf0) {
+ if((c[1] & c[2] & c[3] & 0x80) && ((c[1] | c[2] | c[3]) & 0x40) == 0x00) {
+ *w=((c[0] & 0x07)<<18) | ((c[1]&0x1f)<<12) | ((c[2]&0x3f)<<6) | (c[3]&0x3f);
+ c += 3;
+ } else {
+ *w = '?';
+ }
+ } else
+ *w=(c[0] & 0x7f);
+
+ c++;
+ w++;
+ len++;
+ }
return len;
}
@@ -641,7 +661,7 @@
utf8len = utf8slen(cu->str);
tmp = mem = MEM_callocN(((utf8len + 1) * sizeof(wchar_t)), "convertedmem");
- utf8towchar_(mem, cu->str);
+ utf8towchar(mem, cu->str);
// Count the wchar_t string length
slen = wcslen(mem);
Modified: branches/apricot/source/blender/blenkernel/intern/pointcache.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/pointcache.c 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenkernel/intern/pointcache.c 2008-04-26 14:02:41 UTC (rev 14556)
@@ -177,7 +177,7 @@
blendfilename= (lib)? lib->filename: G.sce;
- BLI_split_dirfile(blendfilename, dir, file);
+ BLI_split_dirfile_basic(blendfilename, NULL, file);
i = strlen(file);
/* remove .blend */
Modified: branches/apricot/source/blender/blenkernel/intern/text.c
===================================================================
--- branches/apricot/source/blender/blenkernel/intern/text.c 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenkernel/intern/text.c 2008-04-26 14:02:41 UTC (rev 14556)
@@ -212,7 +212,6 @@
int i, llen, len;
unsigned char *buffer;
TextLine *tmp;
- char sdir[FILE_MAXDIR];
char sfile[FILE_MAXFILE];
char str[FILE_MAXDIR+FILE_MAXFILE];
@@ -220,7 +219,7 @@
BLI_strncpy(str, text->name, FILE_MAXDIR+FILE_MAXFILE);
BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
- BLI_split_dirfile(str, sdir, sfile);
+ BLI_split_dirfile_basic(str, NULL, sfile);
fp= fopen(str, "r");
if(fp==NULL) return 0;
@@ -312,14 +311,13 @@
unsigned char *buffer;
TextLine *tmp;
Text *ta;
- char sdir[FILE_MAXDIR];
char sfile[FILE_MAXFILE];
char str[FILE_MAXDIR+FILE_MAXFILE];
BLI_strncpy(str, file, FILE_MAXDIR+FILE_MAXFILE);
if (G.scene) /* can be NULL (bg mode) */
BLI_convertstringcode(str, G.sce, G.scene->r.cfra);
- BLI_split_dirfile(str, sdir, sfile);
+ BLI_split_dirfile_basic(str, NULL, sfile);
fp= fopen(str, "r");
if(fp==NULL) return NULL;
Modified: branches/apricot/source/blender/blenlib/BLI_blenlib.h
===================================================================
--- branches/apricot/source/blender/blenlib/BLI_blenlib.h 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenlib/BLI_blenlib.h 2008-04-26 14:02:41 UTC (rev 14556)
@@ -96,6 +96,7 @@
void BLI_make_exist(char *dir);
void BLI_make_existing_file(char *name);
void BLI_split_dirfile(char *string, char *dir, char *file);
+void BLI_split_dirfile_basic(const char *string, char *dir, char *file);
void BLI_join_dirfile(char *string, const char *dir, const char *file);
int BLI_testextensie(const char *str, const char *ext);
void addlisttolist(ListBase *list1, ListBase *list2);
Modified: branches/apricot/source/blender/blenlib/BLI_bpath.h
===================================================================
--- branches/apricot/source/blender/blenlib/BLI_bpath.h 2008-04-26 13:08:57 UTC (rev 14555)
+++ branches/apricot/source/blender/blenlib/BLI_bpath.h 2008-04-26 14:02:41 UTC (rev 14556)
@@ -29,6 +29,12 @@
/* Based on ghash, difference is ghash is not a fixed size,
* so for BPath we dont need to malloc */
+struct BPathIteratorSeqData {
+ int totseq;
+ int seq;
+ struct Sequence **seqar; /* Sequence */
+};
+
struct BPathIterator {
char* path;
char* lib;
@@ -36,17 +42,25 @@
void* data;
int len;
int type;
+
+ void (*setpath_callback)(struct BPathIterator *, char *);
+ void (*getpath_callback)(struct BPathIterator *, char *);
+
+ /* only for seq data */
+ struct BPathIteratorSeqData seqdata;
};
-void BLI_bpathIterator_init (struct BPathIterator *bpi);
-char* BLI_bpathIterator_getPath (struct BPathIterator *bpi);
-char* BLI_bpathIterator_getLib (struct BPathIterator *bpi);
-char* BLI_bpathIterator_getName (struct BPathIterator *bpi);
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list