Merging r50470 through r50477 from trunk into soc-2011-tomato
authorSergey Sharybin <sergey.vfx@gmail.com>
Sat, 8 Sep 2012 10:17:42 +0000 (10:17 +0000)
committerSergey Sharybin <sergey.vfx@gmail.com>
Sat, 8 Sep 2012 10:17:42 +0000 (10:17 +0000)
35 files changed:
intern/ghost/intern/GHOST_C-api.cpp
intern/ghost/test/multitest/EventToBuf.c
intern/ghost/test/multitest/MultiTest.c
intern/utfconv/utf_winfunc.c
release/datafiles/fonts/droidsans.ttf.gz
source/blender/blenfont/intern/blf_lang.c
source/blender/blenkernel/intern/implicit.c
source/blender/blenkernel/intern/text.c
source/blender/blenkernel/intern/writeffmpeg.c
source/blender/blenlib/BLI_math_base.h
source/blender/blenlib/BLI_utildefines.h
source/blender/bmesh/intern/bmesh_core.c
source/blender/bmesh/intern/bmesh_operators.c
source/blender/compositor/intern/COM_OpenCLDevice.cpp
source/blender/editors/interface/interface_handlers.c
source/blender/editors/interface/interface_utils.c
source/blender/editors/mesh/editmesh_rip.c
source/blender/editors/space_info/info_stats.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_node/node_relationships.c
source/blender/editors/transform/transform.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/indexer.c
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/nodes/composite/nodes/node_composite_channelMatte.c
source/blender/python/generic/bgl.c
source/blender/windowmanager/intern/wm_event_system.c
source/blender/windowmanager/intern/wm_window.c
source/darwin/blender.app/Contents/Info.plist
source/darwin/blenderplayer.app/Contents/Info.plist

index bb6c90c..0a43259 100644 (file)
@@ -529,7 +529,10 @@ char *GHOST_GetTitle(GHOST_WindowHandle windowhandle)
 
        char *ctitle = (char *) malloc(title.Length() + 1);
 
 
        char *ctitle = (char *) malloc(title.Length() + 1);
 
-       if (ctitle == NULL) return NULL;
+       if (ctitle == NULL) {
+               return NULL;
+       }
+
        strcpy(ctitle, title.Ptr());
 
        return ctitle;
        strcpy(ctitle, title.Ptr());
 
        return ctitle;
index 034fbe0..0eb37a5 100644 (file)
@@ -203,33 +203,36 @@ void event_to_buf(GHOST_EventHandle evt, char buf[128])
        void *data= GHOST_GetEventData(evt);
        char *pos= buf;
 
        void *data= GHOST_GetEventData(evt);
        char *pos= buf;
 
-       pos+= sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
+       pos += sprintf(pos, "event: %6.2f, %16s", time, eventtype_to_string(type));
        if (win) {
                char *s= GHOST_GetTitle(win);
        if (win) {
                char *s= GHOST_GetTitle(win);
-               pos+= sprintf(pos, " - win: %s", s);
+               pos += sprintf(pos, " - win: %s", s);
                free(s);
        } else {
                pos+= sprintf(pos, " - sys evt");
        }
        switch (type) {
                free(s);
        } else {
                pos+= sprintf(pos, " - sys evt");
        }
        switch (type) {
-       case GHOST_kEventCursorMove: {
-               GHOST_TEventCursorData *cd= data;
-               pos+= sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
-               break;
-       }
-       case GHOST_kEventButtonDown:
-       case GHOST_kEventButtonUp: {
-               GHOST_TEventButtonData *bd= data;
-               pos+= sprintf(pos, " - but: %d", bd->button);
-               break;
-       }
-       
-       case GHOST_kEventKeyDown:
-       case GHOST_kEventKeyUp: {
-               GHOST_TEventKeyData *kd= data;
-               pos+= sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
-               if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
-               break;
-       }
+               case GHOST_kEventCursorMove:
+               {
+                       GHOST_TEventCursorData *cd= data;
+                       pos += sprintf(pos, " - pos: (%d, %d)", cd->x, cd->y);
+                       break;
+               }
+               case GHOST_kEventButtonDown:
+               case GHOST_kEventButtonUp:
+               {
+                       GHOST_TEventButtonData *bd= data;
+                       pos += sprintf(pos, " - but: %d", bd->button);
+                       break;
+               }
+
+               case GHOST_kEventKeyDown:
+               case GHOST_kEventKeyUp:
+               {
+                       GHOST_TEventKeyData *kd= data;
+                       pos += sprintf(pos, " - key: %s (%d)", keytype_to_string(kd->key), kd->key);
+                       if (kd->ascii) pos+= sprintf(pos, " ascii: '%c' (%d)", kd->ascii, kd->ascii);
+                       break;
+               }
        }
 }
        }
 }
index da1c56d..5d207da 100644 (file)
@@ -267,7 +267,8 @@ static void mainwindow_handle(void *priv, GHOST_EventHandle evt)
        mainwindow_log(mw, buf);
        
        switch (type) {
        mainwindow_log(mw, buf);
        
        switch (type) {
-               case GHOST_kEventCursorMove: {
+               case GHOST_kEventCursorMove:
+               {
                        GHOST_TEventCursorData *cd = GHOST_GetEventData(evt);
                        int x, y;
                        GHOST_ScreenToClient(mw->win, cd->x, cd->y, &x, &y);
                        GHOST_TEventCursorData *cd = GHOST_GetEventData(evt);
                        int x, y;
                        GHOST_ScreenToClient(mw->win, cd->x, cd->y, &x, &y);
@@ -275,13 +276,15 @@ static void mainwindow_handle(void *priv, GHOST_EventHandle evt)
                        break;
                }
                case GHOST_kEventButtonDown:
                        break;
                }
                case GHOST_kEventButtonDown:
-               case GHOST_kEventButtonUp: {
+               case GHOST_kEventButtonUp:
+               {
                        GHOST_TEventButtonData *bd = GHOST_GetEventData(evt);
                        mainwindow_do_button(mw, bd->button, (type == GHOST_kEventButtonDown));
                        break;
                }
                case GHOST_kEventKeyDown:
                        GHOST_TEventButtonData *bd = GHOST_GetEventData(evt);
                        mainwindow_do_button(mw, bd->button, (type == GHOST_kEventButtonDown));
                        break;
                }
                case GHOST_kEventKeyDown:
-               case GHOST_kEventKeyUp: {
+               case GHOST_kEventKeyUp:
+               {
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        mainwindow_do_key(mw, kd->key, (type == GHOST_kEventKeyDown));
                        break;
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        mainwindow_do_key(mw, kd->key, (type == GHOST_kEventKeyDown));
                        break;
@@ -541,7 +544,8 @@ static void loggerwindow_handle(void *priv, GHOST_EventHandle evt)
        GHOST_TEventType type = GHOST_GetEventType(evt);
        
        switch (type) {
        GHOST_TEventType type = GHOST_GetEventType(evt);
        
        switch (type) {
-               case GHOST_kEventCursorMove: {
+               case GHOST_kEventCursorMove:
+               {
                        GHOST_TEventCursorData *cd = GHOST_GetEventData(evt);
                        int x, y;
                        GHOST_ScreenToClient(lw->win, cd->x, cd->y, &x, &y);
                        GHOST_TEventCursorData *cd = GHOST_GetEventData(evt);
                        int x, y;
                        GHOST_ScreenToClient(lw->win, cd->x, cd->y, &x, &y);
@@ -549,13 +553,15 @@ static void loggerwindow_handle(void *priv, GHOST_EventHandle evt)
                        break;
                }
                case GHOST_kEventButtonDown:
                        break;
                }
                case GHOST_kEventButtonDown:
-               case GHOST_kEventButtonUp: {
+               case GHOST_kEventButtonUp:
+               {
                        GHOST_TEventButtonData *bd = GHOST_GetEventData(evt);
                        loggerwindow_do_button(lw, bd->button, (type == GHOST_kEventButtonDown));
                        break;
                }
                case GHOST_kEventKeyDown:
                        GHOST_TEventButtonData *bd = GHOST_GetEventData(evt);
                        loggerwindow_do_button(lw, bd->button, (type == GHOST_kEventButtonDown));
                        break;
                }
                case GHOST_kEventKeyDown:
-               case GHOST_kEventKeyUp: {
+               case GHOST_kEventKeyUp:
+               {
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        loggerwindow_do_key(lw, kd->key, (type == GHOST_kEventKeyDown));
                        break;
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        loggerwindow_do_key(lw, kd->key, (type == GHOST_kEventKeyDown));
                        break;
@@ -743,13 +749,15 @@ static void extrawindow_handle(void *priv, GHOST_EventHandle evt)
        
        switch (type) {
                case GHOST_kEventKeyDown:
        
        switch (type) {
                case GHOST_kEventKeyDown:
-               case GHOST_kEventKeyUp: {
+               case GHOST_kEventKeyUp:
+               {
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        extrawindow_do_key(ew, kd->key, (type == GHOST_kEventKeyDown));
                        break;
                }
 
                        GHOST_TEventKeyData *kd = GHOST_GetEventData(evt);
                        extrawindow_do_key(ew, kd->key, (type == GHOST_kEventKeyDown));
                        break;
                }
 
-               case GHOST_kEventCursorMove: {
+               case GHOST_kEventCursorMove:
+               {
                        extrawindow_spin_cursor(ew, GHOST_GetEventTime(evt));
                        break;
                }
                        extrawindow_spin_cursor(ew, GHOST_GetEventTime(evt));
                        break;
                }
index 3840dc2..18f0e80 100644 (file)
@@ -37,7 +37,7 @@ FILE * ufopen(const char * filename, const char * mode)
 {
        FILE *f = NULL;
        UTF16_ENCODE(filename);
 {
        FILE *f = NULL;
        UTF16_ENCODE(filename);
-       UTF16_ENCODE (mode);
+       UTF16_ENCODE(mode);
 
        if (filename_16 && mode_16) {
                f = _wfopen(filename_16, mode_16);
 
        if (filename_16 && mode_16) {
                f = _wfopen(filename_16, mode_16);
@@ -79,9 +79,11 @@ int urename(const char *oldname, const char *newname )
 {
        int r = -1;
        UTF16_ENCODE(oldname);
 {
        int r = -1;
        UTF16_ENCODE(oldname);
-       UTF16_ENCODE (newname);
+       UTF16_ENCODE(newname);
 
 
-       if (oldname_16 && newname_16) r = _wrename(oldname_16, newname_16);
+       if (oldname_16 && newname_16) {
+               r = _wrename(oldname_16, newname_16);
+       }
        
        UTF16_UN_ENCODE(newname);
        UTF16_UN_ENCODE(oldname);
        
        UTF16_UN_ENCODE(newname);
        UTF16_UN_ENCODE(oldname);
@@ -94,7 +96,9 @@ int umkdir(const char *pathname)
        BOOL r = 0;
        UTF16_ENCODE(pathname);
        
        BOOL r = 0;
        UTF16_ENCODE(pathname);
        
-       if (pathname_16) r = CreateDirectoryW(pathname_16, NULL);
+       if (pathname_16) {
+               r = CreateDirectoryW(pathname_16, NULL);
+       }
 
        UTF16_UN_ENCODE(pathname);
 
 
        UTF16_UN_ENCODE(pathname);
 
@@ -123,7 +127,10 @@ int uput_getenv(const char *varname, char * value, size_t buffsize)
 {
        int r = 0;
        wchar_t * str;
 {
        int r = 0;
        wchar_t * str;
-       if (!buffsize) return r;
+
+       if (!buffsize) {
+               return r;
+       }
 
        UTF16_ENCODE(varname);
        if (varname_16) {
 
        UTF16_ENCODE(varname);
        if (varname_16) {
@@ -133,7 +140,9 @@ int uput_getenv(const char *varname, char * value, size_t buffsize)
        }
        UTF16_UN_ENCODE(varname);
 
        }
        UTF16_UN_ENCODE(varname);
 
-       if (!r) value[0] = 0;
+       if (!r) {
+               value[0] = 0;
+       }
 
        return r;
 }
 
        return r;
 }
@@ -143,6 +152,7 @@ int uputenv(const char *name, const char *value)
        int r = -1;
        UTF16_ENCODE(name);
        UTF16_ENCODE(value);
        int r = -1;
        UTF16_ENCODE(name);
        UTF16_ENCODE(value);
+
        if (name_16 && value_16) {
                r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
        }
        if (name_16 && value_16) {
                r = (SetEnvironmentVariableW(name_16,value_16)!= 0) ? 0 : -1;
        }
index b2eb31a..439515e 100644 (file)
Binary files a/release/datafiles/fonts/droidsans.ttf.gz and b/release/datafiles/fonts/droidsans.ttf.gz differ
index 55a65f0..2b7e225 100644 (file)
@@ -108,6 +108,7 @@ static const char *locales[] = {
        "turkish", "tr_TR",
        "hungarian", "hu_HU",
        "brazilian portuguese", "pt_BR",
        "turkish", "tr_TR",
        "hungarian", "hu_HU",
        "brazilian portuguese", "pt_BR",
+       "hebrew", "he_IL",
 };
 
 void BLF_lang_init(void)
 };
 
 void BLF_lang_init(void)
index 616214c..1c6974b 100644 (file)
@@ -193,7 +193,7 @@ DO_INLINE lfVector *create_lfvector(unsigned int verts)
 DO_INLINE void del_lfvector(float (*fLongVector)[3])
 {
        if (fLongVector != NULL) {
 DO_INLINE void del_lfvector(float (*fLongVector)[3])
 {
        if (fLongVector != NULL) {
-               MEM_freeN (fLongVector);
+               MEM_freeN(fLongVector);
                // cloth_aligned_free(&MEMORY_BASE, fLongVector);
        }
 }
                // cloth_aligned_free(&MEMORY_BASE, fLongVector);
        }
 }
@@ -523,7 +523,7 @@ DO_INLINE fmatrix3x3 *create_bfmatrix(unsigned int verts, unsigned int springs)
 DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix)
 {
        if (matrix != NULL) {
 DO_INLINE void del_bfmatrix(fmatrix3x3 *matrix)
 {
        if (matrix != NULL) {
-               MEM_freeN (matrix);
+               MEM_freeN(matrix);
        }
 }
 
        }
 }
 
index 7de5f97..787def5 100644 (file)
@@ -1684,7 +1684,8 @@ void txt_print_undo(Text *text)
                                        printf("%c%c%c", text->undo_buf[i], text->undo_buf[i + 1], text->undo_buf[i + 2]);
                                        i += 3;
                                        break;
                                        printf("%c%c%c", text->undo_buf[i], text->undo_buf[i + 1], text->undo_buf[i + 2]);
                                        i += 3;
                                        break;
-                               case UNDO_INSERT_4: case UNDO_BS_4: case UNDO_DEL_4: {
+                               case UNDO_INSERT_4: case UNDO_BS_4: case UNDO_DEL_4:
+                               {
                                        unsigned int uc;
                                        char c[BLI_UTF8_MAX + 1];
                                        size_t c_len;
                                        unsigned int uc;
                                        char c[BLI_UTF8_MAX + 1];
                                        size_t c_len;
index cd07ac3..bd25ff8 100644 (file)
@@ -177,58 +177,71 @@ static AVFrame *alloc_picture(int pix_fmt, int width, int height)
 static const char **get_file_extensions(int format)
 {
        switch (format) {
 static const char **get_file_extensions(int format)
 {
        switch (format) {
-               case FFMPEG_DV: {
+               case FFMPEG_DV:
+               {
                        static const char *rv[] = { ".dv", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".dv", NULL };
                        return rv;
                }
-               case FFMPEG_MPEG1: {
+               case FFMPEG_MPEG1:
+               {
                        static const char *rv[] = { ".mpg", ".mpeg", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".mpg", ".mpeg", NULL };
                        return rv;
                }
-               case FFMPEG_MPEG2: {
+               case FFMPEG_MPEG2:
+               {
                        static const char *rv[] = { ".dvd", ".vob", ".mpg", ".mpeg", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".dvd", ".vob", ".mpg", ".mpeg", NULL };
                        return rv;
                }
-               case FFMPEG_MPEG4: {
+               case FFMPEG_MPEG4:
+               {
                        static const char *rv[] = { ".mp4", ".mpg", ".mpeg", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".mp4", ".mpg", ".mpeg", NULL };
                        return rv;
                }
-               case FFMPEG_AVI: {
+               case FFMPEG_AVI:
+               {
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
-               case FFMPEG_MOV: {
+               case FFMPEG_MOV:
+               {
                        static const char *rv[] = { ".mov", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".mov", NULL };
                        return rv;
                }
-               case FFMPEG_H264: {
+               case FFMPEG_H264:
+               {
                        /* FIXME: avi for now... */
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
 
                        /* FIXME: avi for now... */
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
 
-               case FFMPEG_XVID: {
+               case FFMPEG_XVID:
+               {
                        /* FIXME: avi for now... */
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
                        /* FIXME: avi for now... */
                        static const char *rv[] = { ".avi", NULL };
                        return rv;
                }
-               case FFMPEG_FLV: {
+               case FFMPEG_FLV:
+               {
                        static const char *rv[] = { ".flv", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".flv", NULL };
                        return rv;
                }
-               case FFMPEG_MKV: {
+               case FFMPEG_MKV:
+               {
                        static const char *rv[] = { ".mkv", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".mkv", NULL };
                        return rv;
                }
-               case FFMPEG_OGG: {
+               case FFMPEG_OGG:
+               {
                        static const char *rv[] = { ".ogg", ".ogv", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".ogg", ".ogv", NULL };
                        return rv;
                }
-               case FFMPEG_MP3: {
+               case FFMPEG_MP3:
+               {
                        static const char *rv[] = { ".mp3", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".mp3", NULL };
                        return rv;
                }
-               case FFMPEG_WAV: {
+               case FFMPEG_WAV:
+               {
                        static const char *rv[] = { ".wav", NULL };
                        return rv;
                }
                        static const char *rv[] = { ".wav", NULL };
                        return rv;
                }
index 4a89776..886ed6f 100644 (file)
 #endif
 
 #ifndef CLAMP
 #endif
 
 #ifndef CLAMP
-#  define CLAMP(a, b, c)  if ((a) < (b)) (a) = (b); else if ((a) > (c)) (a) = (c)
+#  define CLAMP(a, b, c)  {         \
+       if ((a) < (b)) (a) = (b);       \
+       else if ((a) > (c)) (a) = (c);  \
+} (void)0
 #endif
 
 #ifdef __BLI_MATH_INLINE_H__
 #endif
 
 #ifdef __BLI_MATH_INLINE_H__
index c11d8ed..29097a4 100644 (file)
 #define INPR(v1, v2) ( (v1)[0] * (v2)[0] + (v1)[1] * (v2)[1] + (v1)[2] * (v2)[2])
 
 /* some misc stuff.... */
 #define INPR(v1, v2) ( (v1)[0] * (v2)[0] + (v1)[1] * (v2)[1] + (v1)[2] * (v2)[2])
 
 /* some misc stuff.... */
-#define CLAMP(a, b, c)  if ((a) < (b)) (a) = (b); else if ((a) > (c)) (a) = (c)
+#define CLAMP(a, b, c)  {           \
+       if ((a) < (b)) (a) = (b);       \
+       else if ((a) > (c)) (a) = (c);  \
+} (void)0
 
 #define CLAMPIS(a, b, c) ((a) < (b) ? (b) : (a) > (c) ? (c) : (a))
 #define CLAMPTEST(a, b, c)                                                    \
 
 #define CLAMPIS(a, b, c) ((a) < (b) ? (b) : (a) > (c) ? (c) : (a))
 #define CLAMPTEST(a, b, c)                                                    \
index c449dec..76aa8d5 100644 (file)
@@ -86,8 +86,9 @@ BMVert *BM_vert_create(BMesh *bm, const float co[3], const BMVert *example)
 
                /* exception: don't copy the original shapekey index */
                keyi = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_SHAPE_KEYINDEX);
 
                /* exception: don't copy the original shapekey index */
                keyi = CustomData_bmesh_get(&bm->vdata, v->head.data, CD_SHAPE_KEYINDEX);
-               if(keyi)
+               if (keyi) {
                        *keyi = ORIGINDEX_NONE;
                        *keyi = ORIGINDEX_NONE;
+               }
        }
 
        BM_CHECK_ELEMENT(v);
        }
 
        BM_CHECK_ELEMENT(v);
@@ -357,14 +358,16 @@ int bmesh_elem_check(void *element, const char htype)
                return 2;
        
        switch (htype) {
                return 2;
        
        switch (htype) {
-               case BM_VERT: {
+               case BM_VERT:
+               {
                        BMVert *v = element;
                        if (v->e && v->e->head.htype != BM_EDGE) {
                                err |= 4;
                        }
                        break;
                }
                        BMVert *v = element;
                        if (v->e && v->e->head.htype != BM_EDGE) {
                                err |= 4;
                        }
                        break;
                }
-               case BM_EDGE: {
+               case BM_EDGE:
+               {
                        BMEdge *e = element;
                        if (e->l && e->l->head.htype != BM_LOOP)
                                err |= 8;
                        BMEdge *e = element;
                        if (e->l && e->l->head.htype != BM_LOOP)
                                err |= 8;
@@ -383,7 +386,8 @@ int bmesh_elem_check(void *element, const char htype)
                                err |= 128;
                        break;
                }
                                err |= 128;
                        break;
                }
-               case BM_LOOP: {
+               case BM_LOOP:
+               {
                        BMLoop *l = element, *l2;
                        int i;
 
                        BMLoop *l = element, *l2;
                        int i;
 
@@ -423,7 +427,8 @@ int bmesh_elem_check(void *element, const char htype)
 
                        break;
                }
 
                        break;
                }
-               case BM_FACE: {
+               case BM_FACE:
+               {
                        BMFace *f = element;
                        BMLoop *l_iter;
                        BMLoop *l_first;
                        BMFace *f = element;
                        BMLoop *l_iter;
                        BMLoop *l_first;
index 0f2dc70..53b95c9 100644 (file)
@@ -1417,7 +1417,8 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, v
                                case '=':
                                case '%':
                                        break;
                                case '=':
                                case '%':
                                        break;
-                               case 'm': {
+                               case 'm':
+                               {
                                        int size, c;
 
                                        c = NEXT_CHAR(fmt);
                                        int size, c;
 
                                        c = NEXT_CHAR(fmt);
@@ -1431,12 +1432,14 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, v
                                        state = 1;
                                        break;
                                }
                                        state = 1;
                                        break;
                                }
-                               case 'v': {
+                               case 'v':
+                               {
                                        BMO_slot_vec_set(op, slot_name, va_arg(vlist, float *));
                                        state = 1;
                                        break;
                                }
                                        BMO_slot_vec_set(op, slot_name, va_arg(vlist, float *));
                                        state = 1;
                                        break;
                                }
-                               case 'e': {
+                               case 'e':
+                               {
                                        BMHeader *ele = va_arg(vlist, void *);
                                        BMOpSlot *slot = BMO_slot_get(op, slot_name);
 
                                        BMHeader *ele = va_arg(vlist, void *);
                                        BMOpSlot *slot = BMO_slot_get(op, slot_name);
 
@@ -1447,7 +1450,8 @@ int BMO_op_vinitf(BMesh *bm, BMOperator *op, const int flag, const char *_fmt, v
                                        state = 1;
                                        break;
                                }
                                        state = 1;
                                        break;
                                }
-                               case 's': {
+                               case 's':
+                               {
                                        BMOperator *op2 = va_arg(vlist, void *);
                                        const char *slot_name2 = va_arg(vlist, char *);
 
                                        BMOperator *op2 = va_arg(vlist, void *);
                                        const char *slot_name2 = va_arg(vlist, char *);
 
index be5936b..d23ed24 100644 (file)
@@ -110,7 +110,7 @@ void OpenCLDevice::COM_clAttachSizeToKernelParameter(cl_kernel kernel, int offse
 {
        if (offsetIndex != -1) {
                cl_int error;
 {
        if (offsetIndex != -1) {
                cl_int error;
-               cl_int2 offset = {operation->getWidth(), operation->getHeight()};
+               cl_int2 offset = {(cl_int)operation->getWidth(), (cl_int)operation->getHeight()};
 
                error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset);
                if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error));  }
 
                error = clSetKernelArg(kernel, offsetIndex, sizeof(cl_int2), &offset);
                if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error));  }
@@ -127,7 +127,7 @@ void OpenCLDevice::COM_clAttachOutputMemoryBufferToKernelParameter(cl_kernel ker
 void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemoryBuffer)
 {
        cl_int error;
 void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemoryBuffer)
 {
        cl_int error;
-       const size_t size[] = {outputMemoryBuffer->getWidth(), outputMemoryBuffer->getHeight()};
+       const size_t size[] = {(size_t)outputMemoryBuffer->getWidth(), (size_t)outputMemoryBuffer->getHeight()};
 
        error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
        if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error));  }
 
        error = clEnqueueNDRangeKernel(this->m_queue, kernel, 2, NULL, size, 0, 0, 0, NULL);
        if (error != CL_SUCCESS) { printf("CLERROR[%d]: %s\n", error, clewErrorString(error));  }
@@ -144,7 +144,10 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
        size_t size[2];
        cl_int2 offset;
 
        size_t size[2];
        cl_int2 offset;
 
-       if (this->m_vendorID == NVIDIA) {localSize = 32;}
+       if (this->m_vendorID == NVIDIA) {
+               localSize = 32;
+       }
+
        bool breaked = false;
        for (offsety = 0; offsety < height && (!breaked); offsety += localSize) {
                offset[1] = offsety;
        bool breaked = false;
        for (offsety = 0; offsety < height && (!breaked); offsety += localSize) {
                offset[1] = offsety;
@@ -154,6 +157,7 @@ void OpenCLDevice::COM_clEnqueueRange(cl_kernel kernel, MemoryBuffer *outputMemo
                else {
                        size[1] = height - offsety;
                }
                else {
                        size[1] = height - offsety;
                }
+
                for (offsetx = 0; offsetx < width && (!breaked); offsetx += localSize) {
                        if (offsetx + localSize < width) {
                                size[0] = localSize;
                for (offsetx = 0; offsetx < width && (!breaked); offsetx += localSize) {
                        if (offsetx + localSize < width) {
                                size[0] = localSize;
index 54b391b..dcd652a 100644 (file)
@@ -1791,8 +1791,8 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle
                        button_activate_state(C, but, BUTTON_STATE_EXIT);
                        retval = WM_UI_HANDLER_BREAK;
                        break;
                        button_activate_state(C, but, BUTTON_STATE_EXIT);
                        retval = WM_UI_HANDLER_BREAK;
                        break;
-               case LEFTMOUSE: {
-                       
+               case LEFTMOUSE:
+               {
                        /* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */
                        if (data->searchbox)
                                inbox = ui_searchbox_inside(data->searchbox, event->x, event->y);
                        /* exit on LMB only on RELEASE for searchbox, to mimic other popups, and allow multiple menu levels */
                        if (data->searchbox)
                                inbox = ui_searchbox_inside(data->searchbox, event->x, event->y);
@@ -1958,7 +1958,8 @@ static void ui_do_but_textedit_select(bContext *C, uiBlock *block, uiBut *but, u
        int mx, my, retval = WM_UI_HANDLER_CONTINUE;
 
        switch (event->type) {
        int mx, my, retval = WM_UI_HANDLER_CONTINUE;
 
        switch (event->type) {
-               case MOUSEMOVE: {
+               case MOUSEMOVE:
+               {
                        mx = event->x;
                        my = event->y;
                        ui_window_to_block(data->region, block, &mx, &my);
                        mx = event->x;
                        my = event->y;
                        ui_window_to_block(data->region, block, &mx, &my);
@@ -5704,7 +5705,8 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
                                }
 
                                break;
                                }
 
                                break;
-                       case TIMER: {
+                       case TIMER:
+                       {
                                /* handle tooltip timer */
                                if (event->customdata == data->tooltiptimer) {
                                        WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
                                /* handle tooltip timer */
                                if (event->customdata == data->tooltiptimer) {
                                        WM_event_remove_timer(data->wm, data->window, data->tooltiptimer);
@@ -5781,9 +5783,11 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
        }
        else if (data->state == BUTTON_STATE_WAIT_FLASH) {
                switch (event->type) {
        }
        else if (data->state == BUTTON_STATE_WAIT_FLASH) {
                switch (event->type) {
-                       case TIMER: {
-                               if (event->customdata == data->flashtimer)
+                       case TIMER:
+                       {
+                               if (event->customdata == data->flashtimer) {
                                        button_activate_state(C, but, BUTTON_STATE_EXIT);
                                        button_activate_state(C, but, BUTTON_STATE_EXIT);
+                               }
                        }
                }
 
                        }
                }
 
@@ -5793,21 +5797,25 @@ static int ui_handle_button_event(bContext *C, wmEvent *event, uiBut *but)
                /* check for exit because of mouse-over another button */
                switch (event->type) {
                        case MOUSEMOVE:
                /* check for exit because of mouse-over another button */
                switch (event->type) {
                        case MOUSEMOVE:
-                               
-                               if (data->menu && data->menu->region)
-                                       if (ui_mouse_inside_region(data->menu->region, event->x, event->y))
+                       {
+                               uiBut *bt;
+
+                               if (data->menu && data->menu->region) {
+                                       if (ui_mouse_inside_region(data->menu->region, event->x, event->y)) {
                                                break;
                                                break;
-                       
-                               {
-                                       uiBut *bt = ui_but_find_mouse_over(ar, event->x, event->y);
+                                       }
+                               }
 
 
-                                       if (bt && bt->active != data) {
-                                               if (but->type != COL) /* exception */
-                                                       data->cancel = 1;
-                                               button_activate_state(C, but, BUTTON_STATE_EXIT);
+                               bt = ui_but_find_mouse_over(ar, event->x, event->y);
+
+                               if (bt && bt->active != data) {
+                                       if (but->type != COL) {  /* exception */
+                                               data->cancel = 1;
                                        }
                                        }
-                                       break;
+                                       button_activate_state(C, but, BUTTON_STATE_EXIT);
                                }
                                }
+                               break;
+                       }
                }
 
                ui_do_button(C, block, but, event);
                }
 
                ui_do_button(C, block, but, event);
index 8ff8e08..faaf09e 100644 (file)
@@ -102,7 +102,8 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
                        else
                                but = uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                        else
                                but = uiDefButR_prop(block, TEX, 0, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerRNA pptr;
 
                        pptr = RNA_property_pointer_get(ptr, prop);
                        PointerRNA pptr;
 
                        pptr = RNA_property_pointer_get(ptr, prop);
@@ -115,7 +116,8 @@ uiBut *uiDefAutoButR(uiBlock *block, PointerRNA *ptr, PropertyRNA *prop, int ind
                        but = uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                }
                        but = uiDefIconTextButR_prop(block, IDPOIN, 0, icon, name, x1, y1, x2, y2, ptr, prop, index, 0, 0, -1, -1, NULL);
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        char text[256];
                        BLI_snprintf(text, sizeof(text), IFACE_("%d items"), RNA_property_collection_length(ptr, prop));
                        but = uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
                        char text[256];
                        BLI_snprintf(text, sizeof(text), IFACE_("%d items"), RNA_property_collection_length(ptr, prop));
                        but = uiDefBut(block, LABEL, 0, text, x1, y1, x2, y2, NULL, 0, 0, 0, 0, NULL);
index d280623..4d4a890 100644 (file)
@@ -464,6 +464,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
 
                        dist = FLT_MAX;
 
 
                        dist = FLT_MAX;
 
+                       /* in the loop below we find the best vertex to drag based on its connected geometry,
+                        * either by its face corner, or connected edge (when no faces are attached) */
                        for (i = 0; i < vout_len; i++) {
 
                                if (BM_vert_is_wire(vout[i]) == FALSE) {
                        for (i = 0; i < vout_len; i++) {
 
                                if (BM_vert_is_wire(vout[i]) == FALSE) {
@@ -473,7 +475,8 @@ static int edbm_rip_invoke__vert(bContext *C, wmOperator *op, wmEvent *event)
                                                        float l_mid_co[3];
                                                        BM_loop_calc_face_tangent(l, l_mid_co);
 
                                                        float l_mid_co[3];
                                                        BM_loop_calc_face_tangent(l, l_mid_co);
 
-                                                       /* scale to average of surrounding edge size, only needs to be approx */
+                                                       /* scale to average of surrounding edge size, only needs to be approx, but should
+                                                        * be roughly equivalent to the check below which uses the middle of the edge. */
                                                        mul_v3_fl(l_mid_co, (BM_edge_calc_length(l->e) + BM_edge_calc_length(l->prev->e)) / 2.0f);
                                                        add_v3_v3(l_mid_co, v->co);
 
                                                        mul_v3_fl(l_mid_co, (BM_edge_calc_length(l->e) + BM_edge_calc_length(l->prev->e)) / 2.0f);
                                                        add_v3_v3(l_mid_co, v->co);
 
index 7870e64..4ffa993 100644 (file)
@@ -70,7 +70,8 @@ typedef struct SceneStats {
 static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
 {
        switch (ob->type) {
 static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
 {
        switch (ob->type) {
-               case OB_MESH: {
+               case OB_MESH:
+               {
                        /* we assume derivedmesh is already built, this strictly does stats now. */
                        DerivedMesh *dm = ob->derivedFinal;
                        int totvert, totedge, totface;
                        /* we assume derivedmesh is already built, this strictly does stats now. */
                        DerivedMesh *dm = ob->derivedFinal;
                        int totvert, totedge, totface;
@@ -101,7 +102,8 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
                        break;
                case OB_SURF:
                case OB_CURVE:
                        break;
                case OB_SURF:
                case OB_CURVE:
-               case OB_FONT: {
+               case OB_FONT:
+               {
                        int tot = 0, totf = 0;
 
                        stats->totcurve += totob;
                        int tot = 0, totf = 0;
 
                        stats->totcurve += totob;
@@ -121,7 +123,8 @@ static void stats_object(Object *ob, int sel, int totob, SceneStats *stats)
                        }
                        break;
                }
                        }
                        break;
                }
-               case OB_MBALL: {
+               case OB_MBALL:
+               {
                        int tot = 0, totf = 0;
 
                        BKE_displist_count(&ob->disp, &tot, &totf);
                        int tot = 0, totf = 0;
 
                        BKE_displist_count(&ob->disp, &tot, &totf);
index 3455e0b..d84a641 100644 (file)
@@ -1327,8 +1327,9 @@ static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA
        uiItemR(layout, ptr, "color_space", 0, "", ICON_NONE);
        uiItemR(layout, ptr, "projection", 0, "", ICON_NONE);
 
        uiItemR(layout, ptr, "color_space", 0, "", ICON_NONE);
        uiItemR(layout, ptr, "projection", 0, "", ICON_NONE);
 
-       if(RNA_enum_get(ptr, "projection") == SHD_PROJ_BOX)
+       if (RNA_enum_get(ptr, "projection") == SHD_PROJ_BOX) {
                uiItemR(layout, ptr, "projection_blend", 0, "Blend", ICON_NONE);
                uiItemR(layout, ptr, "projection_blend", 0, "Blend", ICON_NONE);
+       }
 
        /* note: image user properties used directly here, unlike compositor image node,
         * which redefines them in the node struct RNA to get proper updates.
 
        /* note: image user properties used directly here, unlike compositor image node,
         * which redefines them in the node struct RNA to get proper updates.
index fbae8b1..90ad145 100644 (file)
@@ -309,7 +309,8 @@ void ED_node_shader_default(Scene *scene, ID *id)
        ntree = ntreeAddTree("Shader Nodetree", NTREE_SHADER, 0);
 
        switch (GS(id->name)) {
        ntree = ntreeAddTree("Shader Nodetree", NTREE_SHADER, 0);
 
        switch (GS(id->name)) {
-               case ID_MA: {
+               case ID_MA:
+               {
                        Material *ma = (Material *)id;
                        ma->nodetree = ntree;
 
                        Material *ma = (Material *)id;
                        ma->nodetree = ntree;
 
@@ -326,7 +327,8 @@ void ED_node_shader_default(Scene *scene, ID *id)
                        strength = 0.0f;
                        break;
                }
                        strength = 0.0f;
                        break;
                }
-               case ID_WO: {
+               case ID_WO:
+               {
                        World *wo = (World *)id;
                        wo->nodetree = ntree;
 
                        World *wo = (World *)id;
                        wo->nodetree = ntree;
 
@@ -337,7 +339,8 @@ void ED_node_shader_default(Scene *scene, ID *id)
                        strength = 1.0f;
                        break;
                }
                        strength = 1.0f;
                        break;
                }
-               case ID_LA: {
+               case ID_LA:
+               {
                        Lamp *la = (Lamp *)id;
                        la->nodetree = ntree;
 
                        Lamp *la = (Lamp *)id;
                        la->nodetree = ntree;
 
index 12c221b..fec7366 100644 (file)
@@ -560,7 +560,8 @@ static int node_link_modal(bContext *C, wmOperator *op, wmEvent *event)
 
                case LEFTMOUSE:
                case RIGHTMOUSE:
 
                case LEFTMOUSE:
                case RIGHTMOUSE:
-               case MIDDLEMOUSE: {
+               case MIDDLEMOUSE:
+               {
                        for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
                                link = linkdata->data;
 
                        for (linkdata = nldrag->links.first; linkdata; linkdata = linkdata->next) {
                                link = linkdata->data;
 
index 68cc1c8..a21f8fd 100644 (file)
@@ -5363,7 +5363,8 @@ int handleEventEdgeSlide(struct TransInfo *t, struct wmEvent *event)
                                                return 1;
                                        }
                                        break;
                                                return 1;
                                        }
                                        break;
-                               case FKEY: {
+                               case FKEY:
+                               {
                                        if (event->val == KM_PRESS) {
                                                if (sld->is_proportional == FALSE) {
                                                        sld->flipped_vtx = !sld->flipped_vtx;
                                        if (event->val == KM_PRESS) {
                                                if (sld->is_proportional == FALSE) {
                                                        sld->flipped_vtx = !sld->flipped_vtx;
@@ -5372,13 +5373,16 @@ int handleEventEdgeSlide(struct TransInfo *t, struct wmEvent *event)
                                        }
                                        break;
                                }
                                        }
                                        break;
                                }
-                               case EVT_MODAL_MAP: {
+                               case EVT_MODAL_MAP:
+                               {
                                        switch (event->val) {
                                        switch (event->val) {
-                                               case TFM_MODAL_EDGESLIDE_DOWN: {
+                                               case TFM_MODAL_EDGESLIDE_DOWN:
+                                               {
                                                        sld->curr_sv_index = ((sld->curr_sv_index - 1) + sld->totsv) % sld->totsv;
                                                        break;
                                                }
                                                        sld->curr_sv_index = ((sld->curr_sv_index - 1) + sld->totsv) % sld->totsv;
                                                        break;
                                                }
-                                               case TFM_MODAL_EDGESLIDE_UP: {
+                                               case TFM_MODAL_EDGESLIDE_UP:
+                                               {
                                                        sld->curr_sv_index = (sld->curr_sv_index + 1) % sld->totsv;
                                                        break;
                                                }
                                                        sld->curr_sv_index = (sld->curr_sv_index + 1) % sld->totsv;
                                                        break;
                                                }
index 9092d59..16dbd08 100644 (file)
@@ -801,6 +801,34 @@ static int ffmpeg_decode_video_frame(struct anim *anim)
                anim->next_packet.stream_index = -1;
        }
        
                anim->next_packet.stream_index = -1;
        }
        
+       if (rval == AVERROR_EOF) {
+               anim->next_packet.size = 0;
+               anim->next_packet.data = 0;
+
+               anim->pFrameComplete = 0;
+
+               avcodec_decode_video2(
+                       anim->pCodecCtx,
+                       anim->pFrame, &anim->pFrameComplete,
+                       &anim->next_packet);
+
+               if (anim->pFrameComplete) {
+                       anim->next_pts = av_get_pts_from_frame(
+                               anim->pFormatCtx, anim->pFrame);
+
+                       av_log(anim->pFormatCtx,
+                              AV_LOG_DEBUG,
+                              "  FRAME DONE (after EOF): next_pts=%lld "
+                              "pkt_pts=%lld, guessed_pts=%lld\n",
+                              (anim->pFrame->pts == AV_NOPTS_VALUE) ?
+                              -1 : (long long int)anim->pFrame->pts,
+                              (anim->pFrame->pkt_pts == AV_NOPTS_VALUE) ?
+                              -1 : (long long int)anim->pFrame->pkt_pts,
+                              (long long int)anim->next_pts);
+                       rval = 0;
+               }
+       }
+
        if (rval < 0) {
                anim->next_packet.stream_index = -1;
 
        if (rval < 0) {
                anim->next_packet.stream_index = -1;
 
index 458f019..ea493e2 100644 (file)
@@ -723,6 +723,17 @@ typedef struct FFmpegIndexBuilderContext {
 
        IMB_Timecode_Type tcs_in_use;
        IMB_Proxy_Size proxy_sizes_in_use;
 
        IMB_Timecode_Type tcs_in_use;
        IMB_Proxy_Size proxy_sizes_in_use;
+
+       unsigned long long seek_pos;
+       unsigned long long last_seek_pos;
+       unsigned long long seek_pos_dts;
+       unsigned long long seek_pos_pts;
+       unsigned long long last_seek_pos_dts;
+       unsigned long long start_pts;
+       double frame_rate;
+       double pts_time_base;
+       int frameno, frameno_gapless;
+       int start_pts_set;
 } FFmpegIndexBuilderContext;
 
 static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, IMB_Timecode_Type tcs_in_use,
 } FFmpegIndexBuilderContext;
 
 static IndexBuildContext *index_ffmpeg_create_context(struct anim *anim, IMB_Timecode_Type tcs_in_use,
@@ -839,20 +850,63 @@ static void index_rebuild_ffmpeg_finish(FFmpegIndexBuilderContext *context, int
        MEM_freeN(context);
 }
 
        MEM_freeN(context);
 }
 
+static void index_rebuild_ffmpeg_proc_decoded_frame(
+       FFmpegIndexBuilderContext *context, 
+       AVPacket * curr_packet,
+       AVFrame *in_frame)
+{
+       int i;
+       unsigned long long s_pos = context->seek_pos;
+       unsigned long long s_dts = context->seek_pos_dts;
+       unsigned long long pts = av_get_pts_from_frame(context->iFormatCtx, in_frame);
+
+       for (i = 0; i < context->num_proxy_sizes; i++) {
+               add_to_proxy_output_ffmpeg(context->proxy_ctx[i], in_frame);
+       }
+
+       if (!context->start_pts_set) {
+               context->start_pts = pts;
+               context->start_pts_set = TRUE;
+       }
+
+       context->frameno = floor((pts - context->start_pts) 
+                                * context->pts_time_base 
+                                * context->frame_rate + 0.5f);
+
+       /* decoding starts *always* on I-Frames,
+        * so: P-Frames won't work, even if all the
+        * information is in place, when we seek
+        * to the I-Frame presented *after* the P-Frame,
+        * but located before the P-Frame within
+        * the stream */
+
+       if (pts < context->seek_pos_pts) {
+               s_pos = context->last_seek_pos;
+               s_dts = context->last_seek_pos_dts;
+       }
+
+       for (i = 0; i < context->num_indexers; i++) {
+               if (context->tcs_in_use & tc_types[i]) {
+                       int tc_frameno = context->frameno;
+
+                       if (tc_types[i] == IMB_TC_RECORD_RUN_NO_GAPS)
+                               tc_frameno = context->frameno_gapless;
+                       
+                       IMB_index_builder_proc_frame(
+                               context->indexer[i],
+                               curr_packet->data,
+                               curr_packet->size,
+                               tc_frameno,
+                               s_pos, s_dts, pts);
+               }
+       }
+       
+       context->frameno_gapless++;
+}
+
 static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
                                 short *stop, short *do_update, float *progress)
 {
 static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
                                 short *stop, short *do_update, float *progress)
 {
-       int i;
-       unsigned long long seek_pos = 0;
-       unsigned long long last_seek_pos = 0;
-       unsigned long long seek_pos_dts = 0;
-       unsigned long long seek_pos_pts = 0;
-       unsigned long long last_seek_pos_dts = 0;
-       unsigned long long start_pts = 0;
-       double frame_rate;
-       double pts_time_base;
-       int frameno = 0, frameno_gapless = 0;
-       int start_pts_set = FALSE;
        AVFrame *in_frame = 0;
        AVPacket next_packet;
        uint64_t stream_size;
        AVFrame *in_frame = 0;
        AVPacket next_packet;
        uint64_t stream_size;
@@ -861,8 +915,8 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
 
        stream_size = avio_size(context->iFormatCtx->pb);
 
 
        stream_size = avio_size(context->iFormatCtx->pb);
 
-       frame_rate = av_q2d(context->iStream->r_frame_rate);
-       pts_time_base = av_q2d(context->iStream->time_base);
+       context->frame_rate = av_q2d(context->iStream->r_frame_rate);
+       context->pts_time_base = av_q2d(context->iStream->time_base);
 
        while (av_read_frame(context->iFormatCtx, &next_packet) >= 0) {
                int frame_finished = 0;
 
        while (av_read_frame(context->iFormatCtx, &next_packet) >= 0) {
                int frame_finished = 0;
@@ -881,11 +935,11 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
 
                if (next_packet.stream_index == context->videoStream) {
                        if (next_packet.flags & AV_PKT_FLAG_KEY) {
 
                if (next_packet.stream_index == context->videoStream) {
                        if (next_packet.flags & AV_PKT_FLAG_KEY) {
-                               last_seek_pos = seek_pos;
-                               last_seek_pos_dts = seek_pos_dts;
-                               seek_pos = next_packet.pos;
-                               seek_pos_dts = next_packet.dts;
-                               seek_pos_pts = next_packet.pts;
+                               context->last_seek_pos = context->seek_pos;
+                               context->last_seek_pos_dts = context->seek_pos_dts;
+                               context->seek_pos = next_packet.pos;
+                               context->seek_pos_dts = next_packet.dts;
+                               context->seek_pos_pts = next_packet.pts;
                        }
 
                        avcodec_decode_video2(
                        }
 
                        avcodec_decode_video2(
@@ -894,54 +948,34 @@ static int index_rebuild_ffmpeg(FFmpegIndexBuilderContext *context,
                }
 
                if (frame_finished) {
                }
 
                if (frame_finished) {
-                       unsigned long long s_pos = seek_pos;
-                       unsigned long long s_dts = seek_pos_dts;
-                       unsigned long long pts = av_get_pts_from_frame(context->iFormatCtx, in_frame);
-
-                       for (i = 0; i < context->num_proxy_sizes; i++) {
-                               add_to_proxy_output_ffmpeg(
-                                       context->proxy_ctx[i], in_frame);
-                       }
-
-                       if (!start_pts_set) {
-                               start_pts = pts;
-                               start_pts_set = TRUE;
-                       }
+                       index_rebuild_ffmpeg_proc_decoded_frame(
+                               context, &next_packet, in_frame);
+               }
+               av_free_packet(&next_packet);
+       }
 
 
-                       frameno = floor((pts - start_pts) *
-                                       pts_time_base * frame_rate + 0.5f);
+       /* process pictures still stuck in decoder engine after EOF
+          according to ffmpeg docs using 0-size packets. 
 
 
-                       /* decoding starts *always* on I-Frames,
-                        * so: P-Frames won't work, even if all the
-                        * information is in place, when we seek
-                        * to the I-Frame presented *after* the P-Frame,
-                        * but located before the P-Frame within
-                        * the stream */
+          At least, if we haven't already stopped... */
+       if (!*stop) {
+               int frame_finished;
 
 
-                       if (pts < seek_pos_pts) {
-                               s_pos = last_seek_pos;
-                               s_dts = last_seek_pos_dts;
-                       }
+               next_packet.size = 0;
+               next_packet.data = 0;
 
 
-                       for (i = 0; i < context->num_indexers; i++) {
-                               if (context->tcs_in_use & tc_types[i]) {
-                                       int tc_frameno = frameno;
+               do {
+                       frame_finished = 0;
 
 
-                                       if (tc_types[i] == IMB_TC_RECORD_RUN_NO_GAPS)
-                                               tc_frameno = frameno_gapless;
+                       avcodec_decode_video2(
+                               context->iCodecCtx, in_frame, &frame_finished,
+                               &next_packet);
 
 
-                                       IMB_index_builder_proc_frame(
-                                               context->indexer[i],
-                                               next_packet.data,
-                                               next_packet.size,
-                                               tc_frameno,
-                                               s_pos, s_dts, pts);
-                               }
+                       if (frame_finished) {
+                               index_rebuild_ffmpeg_proc_decoded_frame(
+                                       context, &next_packet, in_frame);
                        }
                        }
-
-                       frameno_gapless++;
-               }
-               av_free_packet(&next_packet);
+               } while (frame_finished);
        }
 
        av_free(in_frame);
        }
 
        av_free(in_frame);
index d2ff8d1..ef3c7f4 100644 (file)
@@ -532,7 +532,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
        func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
 
        switch (prop->type) {
        func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "get");
 
        switch (prop->type) {
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, char *value)\n", func);
                        fprintf(f, "{\n");
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, char *value)\n", func);
                        fprintf(f, "{\n");
@@ -565,7 +566,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                        fprintf(f, "}\n\n");
                        break;
                }
                        fprintf(f, "}\n\n");
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        fprintf(f, "PointerRNA %s(PointerRNA *ptr)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
                        fprintf(f, "PointerRNA %s(PointerRNA *ptr)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
@@ -584,7 +586,8 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                        fprintf(f, "}\n\n");
                        break;
                }
                        fprintf(f, "}\n\n");
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                        fprintf(f, "static PointerRNA %s(CollectionPropertyIterator *iter)\n", func);
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                        fprintf(f, "static PointerRNA %s(CollectionPropertyIterator *iter)\n", func);
@@ -785,7 +788,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
        func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set");
 
        switch (prop->type) {
        func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "set");
 
        switch (prop->type) {
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, const char *value)\n", func);
                        fprintf(f, "{\n");
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, const char *value)\n", func);
                        fprintf(f, "{\n");
@@ -817,7 +821,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                        fprintf(f, "}\n\n");
                        break;
                }
                        fprintf(f, "}\n\n");
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        fprintf(f, "void %s(PointerRNA *ptr, PointerRNA value)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
                        fprintf(f, "void %s(PointerRNA *ptr, PointerRNA value)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
@@ -1275,7 +1280,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
        prop = dp->prop;
 
        switch (prop->type) {
        prop = dp->prop;
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
@@ -1291,7 +1297,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
@@ -1310,7 +1317,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
@@ -1329,14 +1337,16 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        eprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)eprop->get);
                        eprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)eprop->set);
                        break;
                }
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        eprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)eprop->get);
                        eprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)eprop->set);
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        sprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)sprop->get);
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        sprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)sprop->get);
@@ -1344,7 +1354,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        sprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)sprop->set);
                        break;
                }
                        sprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)sprop->set);
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
                        pprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)pprop->get);
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
                        pprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)pprop->get);
@@ -1356,7 +1367,8 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        const char *nextfunc = (const char *)cprop->next;
 
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        const char *nextfunc = (const char *)cprop->next;
 
@@ -1421,7 +1433,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
 
        switch (prop->type) {
                case PROP_BOOLEAN:
 
        switch (prop->type) {
                case PROP_BOOLEAN:
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        if (!prop->arraydimension) {
                                fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
                                /*fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func); */
                        if (!prop->arraydimension) {
                                fprintf(f, "int %sget(PointerRNA *ptr);\n", func);
                                /*fprintf(f, "void %sset(PointerRNA *ptr, int value);\n", func); */
@@ -1436,7 +1449,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        if (!prop->arraydimension) {
                                fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
                                /*fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func); */
                        if (!prop->arraydimension) {
                                fprintf(f, "float %sget(PointerRNA *ptr);\n", func);
                                /*fprintf(f, "void %sset(PointerRNA *ptr, float value);\n", func); */
@@ -1451,7 +1465,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
@@ -1471,7 +1486,8 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
 
                        break;
                }
 
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        if (sprop->maxlength) {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        if (sprop->maxlength) {
@@ -1484,12 +1500,14 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
 
                        break;
                }
 
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func);
                        /*fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func); */
                        break;
                }
                        fprintf(f, "PointerRNA %sget(PointerRNA *ptr);\n", func);
                        /*fprintf(f, "void %sset(PointerRNA *ptr, PointerRNA value);\n", func); */
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        fprintf(f, "void %sbegin(CollectionPropertyIterator *iter, PointerRNA *ptr);\n", func);
                        fprintf(f, "void %snext(CollectionPropertyIterator *iter);\n", func);
                        fprintf(f, "void %send(CollectionPropertyIterator *iter);\n", func);
                        fprintf(f, "void %sbegin(CollectionPropertyIterator *iter, PointerRNA *ptr);\n", func);
                        fprintf(f, "void %snext(CollectionPropertyIterator *iter);\n", func);
                        fprintf(f, "void %send(CollectionPropertyIterator *iter);\n", func);
@@ -1520,28 +1538,32 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                fprintf(f, "\t/* */\n");
 
        switch (prop->type) {
                fprintf(f, "\t/* */\n");
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline bool %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline int %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<int, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<float, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
                        if (!prop->arraydimension)
                                fprintf(f, "\tinline float %s(void);", rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                                fprintf(f, "\tinline Array<float, %u> %s(void);", prop->totarraylength, rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
@@ -1559,11 +1581,13 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                        fprintf(f, "\tinline %s_enum %s(void);", rna_safe_id(prop->identifier), rna_safe_id(prop->identifier));
                        break;
                }
                        fprintf(f, "\tinline %s_enum %s(void);", rna_safe_id(prop->identifier), rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        fprintf(f, "\tinline std::string %s(void);", rna_safe_id(prop->identifier));
                        break;
                }
                        fprintf(f, "\tinline std::string %s(void);", rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
@@ -1572,7 +1596,8 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                                fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
                        break;
                }
                                fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
                        if (cprop->item_type)
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
                        if (cprop->item_type)
@@ -1598,7 +1623,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                return;
 
        switch (prop->type) {
                return;
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                        if (!prop->arraydimension)
                                fprintf(f, "\tBOOLEAN_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
@@ -1606,7 +1632,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                                        rna_safe_id(prop->identifier));
                        break;
                }
                                        rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                        if (!prop->arraydimension)
                                fprintf(f, "\tINT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
@@ -1614,7 +1641,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                                        rna_safe_id(prop->identifier));
                        break;
                }
                                        rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        if (!prop->arraydimension)
                                fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
                        if (!prop->arraydimension)
                                fprintf(f, "\tFLOAT_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        else if (prop->totarraylength)
@@ -1622,17 +1650,20 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                                        rna_safe_id(prop->identifier));
                        break;
                }
                                        rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        fprintf(f, "\tENUM_PROPERTY(%s_enum, %s, %s)", rna_safe_id(prop->identifier), srna->identifier,
                                rna_safe_id(prop->identifier));
 
                        break;
                }
                        fprintf(f, "\tENUM_PROPERTY(%s_enum, %s, %s)", rna_safe_id(prop->identifier), srna->identifier,
                                rna_safe_id(prop->identifier));
 
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        fprintf(f, "\tSTRING_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        break;
                }
                        fprintf(f, "\tSTRING_PROPERTY(%s, %s)", srna->identifier, rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
@@ -1643,7 +1674,8 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                                        rna_safe_id(prop->identifier));
                        break;
                }
                                        rna_safe_id(prop->identifier));
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
 #if 0
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
 #if 0
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
@@ -2218,7 +2250,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i, defaultfound = 0, totflag = 0;
 
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i, defaultfound = 0, totflag = 0;
 
@@ -2270,7 +2303,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        unsigned int i;
 
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        unsigned int i;
 
@@ -2291,7 +2325,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        unsigned int i;
 
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        unsigned int i;
 
@@ -2312,7 +2347,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        unsigned int i;
 
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        unsigned int i;
 
@@ -2380,7 +2416,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        fprintf(f, "},\n");
 
        switch (prop->type) {
        fprintf(f, "},\n");
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %d, ",
                                rna_function_string(bprop->get),
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %d, ",
                                rna_function_string(bprop->get),
@@ -2393,7 +2430,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        else fprintf(f, "NULL\n");
                        break;
                }
                        else fprintf(f, "NULL\n");
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s,\n\t",
                                rna_function_string(iprop->get),
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s,\n\t",
                                rna_function_string(iprop->get),
@@ -2412,7 +2450,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        else fprintf(f, "NULL\n");
                        break;
                }
                        else fprintf(f, "NULL\n");
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s, ",
                                rna_function_string(fprop->get),
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s, ",
                                rna_function_string(fprop->get),
@@ -2432,7 +2471,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        else fprintf(f, "NULL\n");
                        break;
                }
                        else fprintf(f, "NULL\n");
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %d, ",
                                rna_function_string(sprop->get),
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %d, ",
                                rna_function_string(sprop->get),
@@ -2442,7 +2482,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
                        break;
                }
                        rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, NULL, ",
                                rna_function_string(eprop->get),
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, NULL, ",
                                rna_function_string(eprop->get),
@@ -2455,7 +2496,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
                        break;
                }
                        fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
                        break;
                }
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get),
                                rna_function_string(pprop->set),
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get),
                                rna_function_string(pprop->set),
@@ -2465,7 +2507,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                        else fprintf(f, "NULL\n");
                        break;
                }
                        else fprintf(f, "NULL\n");
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ",
                                rna_function_string(cprop->begin),
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ",
                                rna_function_string(cprop->begin),
index ec4da31..d36c0bb 100644 (file)
@@ -3192,19 +3192,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                /* handle conversions */
                                                if (set) {
                                                        switch (itemtype) {
                                                /* handle conversions */
                                                if (set) {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        int b;
                                                                        RAW_GET(int, b, in, a);
                                                                        RNA_property_boolean_set(&itemptr, iprop, b);
                                                                        break;
                                                                }
                                                                        int b;
                                                                        RAW_GET(int, b, in, a);
                                                                        RNA_property_boolean_set(&itemptr, iprop, b);
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        int i;
                                                                        RAW_GET(int, i, in, a);
                                                                        RNA_property_int_set(&itemptr, iprop, i);
                                                                        break;
                                                                }
                                                                        int i;
                                                                        RAW_GET(int, i, in, a);
                                                                        RNA_property_int_set(&itemptr, iprop, i);
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        float f;
                                                                        RAW_GET(float, f, in, a);
                                                                        RNA_property_float_set(&itemptr, iprop, f);
                                                                        float f;
                                                                        RAW_GET(float, f, in, a);
                                                                        RNA_property_float_set(&itemptr, iprop, f);
@@ -3216,17 +3219,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                }
                                                else {
                                                        switch (itemtype) {
                                                }
                                                else {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        int b = RNA_property_boolean_get(&itemptr, iprop);
                                                                        RAW_SET(int, in, a, b);
                                                                        break;
                                                                }
                                                                        int b = RNA_property_boolean_get(&itemptr, iprop);
                                                                        RAW_SET(int, in, a, b);
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        int i = RNA_property_int_get(&itemptr, iprop);
                                                                        RAW_SET(int, in, a, i);
                                                                        break;
                                                                }
                                                                        int i = RNA_property_int_get(&itemptr, iprop);
                                                                        RAW_SET(int, in, a, i);
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        float f = RNA_property_float_get(&itemptr, iprop);
                                                                        RAW_SET(float, in, a, f);
                                                                        break;
                                                                        float f = RNA_property_float_get(&itemptr, iprop);
                                                                        RAW_SET(float, in, a, f);
                                                                        break;
@@ -3251,19 +3257,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                /* handle conversions */
                                                if (set) {
                                                        switch (itemtype) {
                                                /* handle conversions */
                                                if (set) {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(int, ((int *)tmparray)[j], in, a);
                                                                        RNA_property_boolean_set_array(&itemptr, iprop, tmparray);
                                                                        break;
                                                                }
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(int, ((int *)tmparray)[j], in, a);
                                                                        RNA_property_boolean_set_array(&itemptr, iprop, tmparray);
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(int, ((int *)tmparray)[j], in, a);
                                                                        RNA_property_int_set_array(&itemptr, iprop, tmparray);
                                                                        break;
                                                                }
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(int, ((int *)tmparray)[j], in, a);
                                                                        RNA_property_int_set_array(&itemptr, iprop, tmparray);
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(float, ((float *)tmparray)[j], in, a);
                                                                        RNA_property_float_set_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_GET(float, ((float *)tmparray)[j], in, a);
                                                                        RNA_property_float_set_array(&itemptr, iprop, tmparray);
@@ -3275,19 +3284,22 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                }
                                                else {
                                                        switch (itemtype) {
                                                }
                                                else {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        RNA_property_boolean_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
                                                                        RNA_property_boolean_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        RNA_property_int_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
                                                                        RNA_property_int_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        RNA_property_float_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(float, in, a, ((float *)tmparray)[j]);
                                                                        RNA_property_float_get_array(&itemptr, iprop, tmparray);
                                                                        for (j = 0; j < itemlen; j++, a++)
                                                                                RAW_SET(float, in, a, ((float *)tmparray)[j]);
@@ -3301,17 +3313,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                        else {
                                                if (set) {
                                                        switch (itemtype) {
                                        else {
                                                if (set) {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        RNA_property_boolean_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                        RNA_property_boolean_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        RNA_property_int_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                        RNA_property_int_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        RNA_property_float_set_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                        RNA_property_float_set_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
@@ -3322,17 +3337,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                }
                                                else {
                                                        switch (itemtype) {
                                                }
                                                else {
                                                        switch (itemtype) {
-                                                               case PROP_BOOLEAN: {
+                                                               case PROP_BOOLEAN:
+                                                               {
                                                                        RNA_property_boolean_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                        RNA_property_boolean_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
-                                                               case PROP_INT: {
+                                                               case PROP_INT:
+                                                               {
                                                                        RNA_property_int_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                        RNA_property_int_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
-                                                               case PROP_FLOAT: {
+                                                               case PROP_FLOAT:
+                                                               {
                                                                        RNA_property_float_get_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                        RNA_property_float_get_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
@@ -4924,7 +4942,8 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
                                case PROP_ENUM:
                                        memcpy(data, &((EnumPropertyRNA *)parm)->defaultvalue, size);
                                        break;
                                case PROP_ENUM:
                                        memcpy(data, &((EnumPropertyRNA *)parm)->defaultvalue, size);
                                        break;
-                               case PROP_STRING: {
+                               case PROP_STRING:
+                               {
                                        const char *defvalue = ((StringPropertyRNA *)parm)->defaultvalue;
                                        if (defvalue && defvalue[0]) {
                                                /* causes bug [#29988], possibly this is only correct for thick wrapped
                                        const char *defvalue = ((StringPropertyRNA *)parm)->defaultvalue;
                                        if (defvalue && defvalue[0]) {
                                                /* causes bug [#29988], possibly this is only correct for thick wrapped
index 0320c0d..45092d0 100644 (file)
@@ -926,7 +926,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
                                }
                        }
                        break;
                                }
                        }
                        break;
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        iprop->hardmin = (subtype == PROP_UNSIGNED) ? 0 : INT_MIN;
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        iprop->hardmin = (subtype == PROP_UNSIGNED) ? 0 : INT_MIN;
@@ -937,7 +938,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
                        iprop->step = 1;
                        break;
                }
                        iprop->step = 1;
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        fprop->hardmin = (subtype == PROP_UNSIGNED) ? 0.0f : -FLT_MAX;
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        fprop->hardmin = (subtype == PROP_UNSIGNED) ? 0.0f : -FLT_MAX;
@@ -959,7 +961,8 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
                        fprop->precision = 3;
                        break;
                }
                        fprop->precision = 3;
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        sprop->defaultvalue = "";
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        sprop->defaultvalue = "";
@@ -1009,19 +1012,22 @@ PropertyRNA *RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier
                                RNA_def_property_boolean_sdna(prop, NULL, identifier, 0);
                                DefRNA.silent = 0;
                                break;
                                RNA_def_property_boolean_sdna(prop, NULL, identifier, 0);
                                DefRNA.silent = 0;
                                break;
-                       case PROP_INT: {
+                       case PROP_INT:
+                       {
                                DefRNA.silent = 1;
                                RNA_def_property_int_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
                                break;
                        }
                                DefRNA.silent = 1;
                                RNA_def_property_int_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
                                break;
                        }
-                       case PROP_FLOAT: {
+                       case PROP_FLOAT:
+                       {
                                DefRNA.silent = 1;
                                RNA_def_property_float_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
                                break;
                        }
                                DefRNA.silent = 1;
                                RNA_def_property_float_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
                                break;
                        }
-                       case PROP_STRING: {
+                       case PROP_STRING:
+                       {
                                DefRNA.silent = 1;
                                RNA_def_property_string_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
                                DefRNA.silent = 1;
                                RNA_def_property_string_sdna(prop, NULL, identifier);
                                DefRNA.silent = 0;
@@ -1173,14 +1179,16 @@ void RNA_def_property_ui_range(PropertyRNA *prop, double min, double max, double
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->softmin = (int)min;
                        iprop->softmax = (int)max;
                        iprop->step = (int)step;
                        break;
                }
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->softmin = (int)min;
                        iprop->softmax = (int)max;
                        iprop->step = (int)step;
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->softmin = (float)min;
                        fprop->softmax = (float)max;
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->softmin = (float)min;
                        fprop->softmax = (float)max;
@@ -1201,7 +1209,8 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->hardmin = (int)min;
                        iprop->hardmax = (int)max;
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->hardmin = (int)min;
                        iprop->hardmax = (int)max;
@@ -1209,7 +1218,8 @@ void RNA_def_property_range(PropertyRNA *prop, double min, double max)
                        iprop->softmax = MIN2((int)max, iprop->hardmax);
                        break;
                }
                        iprop->softmax = MIN2((int)max, iprop->hardmax);
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->hardmin = (float)min;
                        fprop->hardmax = (float)max;
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->hardmin = (float)min;
                        fprop->hardmax = (float)max;
@@ -1234,12 +1244,14 @@ void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        pprop->type = (StructRNA *)type;
                        break;
                }
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        pprop->type = (StructRNA *)type;
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        cprop->item_type = (StructRNA *)type;
                        break;
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        cprop->item_type = (StructRNA *)type;
                        break;
@@ -1262,7 +1274,8 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        pprop->type = type;
 
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                        pprop->type = type;
 
@@ -1271,7 +1284,8 @@ void RNA_def_property_struct_runtime(PropertyRNA *prop, StructRNA *type)
 
                        break;
                }
 
                        break;
                }
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        cprop->item_type = type;
                        break;
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                        cprop->item_type = type;
                        break;
@@ -1290,7 +1304,8 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
        int i, defaultfound = 0;
 
        switch (prop->type) {
        int i, defaultfound = 0;
 
        switch (prop->type) {
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        eprop->item = (EnumPropertyItem *)item;
                        eprop->totitem = 0;
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        eprop->item = (EnumPropertyItem *)item;
                        eprop->totitem = 0;
@@ -1325,7 +1340,8 @@ void RNA_def_property_string_maxlength(PropertyRNA *prop, int maxlength)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        sprop->maxlength = maxlength;
                        break;
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        sprop->maxlength = maxlength;
                        break;
@@ -1342,7 +1358,8 @@ void RNA_def_property_boolean_default(PropertyRNA *prop, int value)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        bprop->defaultvalue = value;
                        break;
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        bprop->defaultvalue = value;
                        break;
@@ -1359,7 +1376,8 @@ void RNA_def_property_boolean_array_default(PropertyRNA *prop, const int *array)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        bprop->defaultarray = array;
                        break;
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                        bprop->defaultarray = array;
                        break;
@@ -1376,7 +1394,8 @@ void RNA_def_property_int_default(PropertyRNA *prop, int value)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->defaultvalue = value;
                        break;
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->defaultvalue = value;
                        break;
@@ -1393,7 +1412,8 @@ void RNA_def_property_int_array_default(PropertyRNA *prop, const int *array)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->defaultarray = array;
                        break;
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                        iprop->defaultarray = array;
                        break;
@@ -1410,7 +1430,8 @@ void RNA_def_property_float_default(PropertyRNA *prop, float value)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->defaultvalue = value;
                        break;
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->defaultvalue = value;
                        break;
@@ -1427,7 +1448,8 @@ void RNA_def_property_float_array_default(PropertyRNA *prop, const float *array)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->defaultarray = array; /* WARNING, this array must not come from the stack and lost */
                        break;
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                        fprop->defaultarray = array; /* WARNING, this array must not come from the stack and lost */
                        break;
@@ -1444,7 +1466,8 @@ void RNA_def_property_string_default(PropertyRNA *prop, const char *value)
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
        StructRNA *srna = DefRNA.laststruct;
 
        switch (prop->type) {
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        sprop->defaultvalue = value;
                        break;
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        sprop->defaultvalue = value;
                        break;
@@ -1462,7 +1485,8 @@ void RNA_def_property_enum_default(PropertyRNA *prop, int value)
        int i, defaultfound = 0;
 
        switch (prop->type) {
        int i, defaultfound = 0;
 
        switch (prop->type) {
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        eprop->defaultvalue = value;
 
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        eprop->defaultvalue = value;
 
@@ -1945,7 +1969,8 @@ void RNA_def_property_boolean_funcs(PropertyRNA *prop, const char *get, const ch
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
@@ -1975,7 +2000,8 @@ void RNA_def_property_int_funcs(PropertyRNA *prop, const char *get, const char *
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
@@ -2006,7 +2032,8 @@ void RNA_def_property_float_funcs(PropertyRNA *prop, const char *get, const char
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (prop->arraydimension) {
@@ -2037,7 +2064,8 @@ void RNA_def_property_enum_funcs(PropertyRNA *prop, const char *get, const char
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        if (get) eprop->get = (PropEnumGetFunc)get;
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        if (get) eprop->get = (PropEnumGetFunc)get;
@@ -2062,7 +2090,8 @@ void RNA_def_property_string_funcs(PropertyRNA *prop, const char *get, const cha
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        if (get) sprop->get = (PropStringGetFunc)get;
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        if (get) sprop->get = (PropStringGetFunc)get;
@@ -2088,7 +2117,8 @@ void RNA_def_property_pointer_funcs(PropertyRNA *prop, const char *get, const ch
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_POINTER: {
+               case PROP_POINTER:
+               {
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
                        if (get) pprop->get = (PropPointerGetFunc)get;
                        PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
                        if (get) pprop->get = (PropPointerGetFunc)get;
@@ -2116,7 +2146,8 @@ void RNA_def_property_collection_funcs(PropertyRNA *prop, const char *begin, con
        }
 
        switch (prop->type) {
        }
 
        switch (prop->type) {
-               case PROP_COLLECTION: {
+               case PROP_COLLECTION:
+               {
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                        if (begin) cprop->begin = (PropCollectionBeginFunc)begin;
                        CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                        if (begin) cprop->begin = (PropCollectionBeginFunc)begin;
@@ -2742,7 +2773,8 @@ int rna_parameter_size(PropertyRNA *parm)
                                }
                                else
                                        return sizeof(char *);
                                }
                                else
                                        return sizeof(char *);
-                       case PROP_POINTER: {
+                       case PROP_POINTER:
+                       {
 #ifdef RNA_RUNTIME
                                if (parm->flag & PROP_RNAPTR)
                                        return sizeof(PointerRNA);
 #ifdef RNA_RUNTIME
                                if (parm->flag & PROP_RNAPTR)
                                        return sizeof(PointerRNA);
@@ -2889,7 +2921,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
        if (prop->description) prop->description = BLI_strdup(prop->description);
 
        switch (prop->type) {
        if (prop->description) prop->description = BLI_strdup(prop->description);
 
        switch (prop->type) {
-               case PROP_BOOLEAN: {
+               case PROP_BOOLEAN:
+               {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (bprop->defaultarray) {
                        BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (bprop->defaultarray) {
@@ -2899,7 +2932,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_INT: {
+               case PROP_INT:
+               {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (iprop->defaultarray) {
                        IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (iprop->defaultarray) {
@@ -2909,7 +2943,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_ENUM: {
+               case PROP_ENUM:
+               {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        if (eprop->item) {
                        EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                        if (eprop->item) {
@@ -2928,7 +2963,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_FLOAT: {
+               case PROP_FLOAT:
+               {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (fprop->defaultarray) {
                        FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (fprop->defaultarray) {
@@ -2938,7 +2974,8 @@ void RNA_def_property_duplicate_pointers(StructOrFunctionRNA *cont_, PropertyRNA
                        }
                        break;
                }
                        }
                        break;
                }
-               case PROP_STRING: {
+               case PROP_STRING:
+               {
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        if (sprop->defaultvalue)
                                sprop->defaultvalue = BLI_strdup(sprop->defaultvalue);
                        StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        if (sprop->defaultvalue)
                                sprop->defaultvalue = BLI_strdup(sprop->defaultvalue);
@@ -2966,25 +3003,29 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
                        MEM_freeN(prop->py_data);
 
                switch (prop->type) {
                        MEM_freeN(prop->py_data);
 
                switch (prop->type) {
-                       case PROP_BOOLEAN: {
+                       case PROP_BOOLEAN:
+                       {
                                BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                                if (bprop->defaultarray)
                                        MEM_freeN((void *)bprop->defaultarray);
                                break;
                        }
                                BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
                                if (bprop->defaultarray)
                                        MEM_freeN((void *)bprop->defaultarray);
                                break;
                        }
-                       case PROP_INT: {
+                       case PROP_INT:
+                       {
                                IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                                if (iprop->defaultarray)
                                        MEM_freeN((void *)iprop->defaultarray);
                                break;
                        }
                                IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                                if (iprop->defaultarray)
                                        MEM_freeN((void *)iprop->defaultarray);
                                break;
                        }
-                       case PROP_FLOAT: {
+                       case PROP_FLOAT:
+                       {
                                FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                                if (fprop->defaultarray)
                                        MEM_freeN((void *)fprop->defaultarray);
                                break;
                        }
                                FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                                if (fprop->defaultarray)
                                        MEM_freeN((void *)fprop->defaultarray);
                                break;
                        }
-                       case PROP_ENUM: {
+                       case PROP_ENUM:
+                       {
                                EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                                for (a = 0; a < eprop->totitem; a++) {
                                EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
                                for (a = 0; a < eprop->totitem; a++) {
@@ -2999,7 +3040,8 @@ void RNA_def_property_free_pointers(PropertyRNA *prop)
                                if (eprop->item) MEM_freeN((void *)eprop->item);
                                break;
                        }
                                if (eprop->item) MEM_freeN((void *)eprop->item);
                                break;
                        }
-                       case PROP_STRING: {
+                       case PROP_STRING:
+                       {
                                StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                                if (sprop->defaultvalue)
                                        MEM_freeN((void *)sprop->defaultvalue);
                                StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                                if (sprop->defaultvalue)
                                        MEM_freeN((void *)sprop->defaultvalue);
index 7ab3596..5bf1cc2 100644 (file)
@@ -84,7 +84,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
        switch (ob->type) {
                case OB_FONT:
                case OB_CURVE:
        switch (ob->type) {
                case OB_FONT:
                case OB_CURVE:
-               case OB_SURF: {
+               case OB_SURF:
+               {
                        ListBase dispbase = {NULL, NULL};
                        DerivedMesh *derivedFinal = NULL;
                        int uv_from_orco;
                        ListBase dispbase = {NULL, NULL};
                        DerivedMesh *derivedFinal = NULL;
                        int uv_from_orco;
@@ -163,7 +164,8 @@ Mesh *rna_Object_to_mesh(Object *ob, ReportList *reports, Scene *sce, int apply_
                        break;
                }
 
                        break;
                }
 
-               case OB_MBALL: {
+               case OB_MBALL:
+               {
                        /* metaballs don't have modifiers, so just convert to mesh */
                        Object *basis_ob = BKE_mball_basis_find(sce, ob);
                        /* todo, re-generatre for render-res */
                        /* metaballs don't have modifiers, so just convert to mesh */
                        Object *basis_ob = BKE_mball_basis_find(sce, ob);
                        /* todo, re-generatre for render-res */
index f753ff6..7f8c695 100644 (file)
@@ -2982,7 +2982,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
        /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
        /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
        /* Note: As this list is in alphabetical order, and not defined order,
        /* locale according to http://www.roseindia.net/tutorials/I18N/locales-list.shtml */
        /* if you edit here, please also edit the source/blender/blenfont/intern/blf_lang.c 's locales */
        /* Note: As this list is in alphabetical order, and not defined order,
-        *       here is the highest define currently in use: 32 (Brazilian Portuguese). */
+        *       here is the highest define currently in use: 33 (Hebrew). */
        static EnumPropertyItem language_items[] = {
                { 0, "", 0, N_("Nearly done"), ""},
                { 0, "DEFAULT", 0, "Default (Default)", ""},
        static EnumPropertyItem language_items[] = {
                { 0, "", 0, N_("Nearly done"), ""},
                { 0, "DEFAULT", 0, "Default (Default)", ""},
@@ -3008,6 +3008,7 @@ static void rna_def_userdef_system(BlenderRNA *brna)
                { 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
                { 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
                {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
                { 6, "FINNISH", 0, "Finnish (Suomi)", "fi_FI"},
                { 5, "GERMAN", 0, "German (Deutsch)", "de_DE"},
                {23, "GREEK", 0, "Greek (Ελληνικά)", "el_GR"},
+               {33, "HEBREW", 0, "Hebrew (עִבְרִית)", "he_IL"},
                {31, "HUNGARIAN", 0, "Hungarian (magyar)", "hu_HU"},
                {27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
                {29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
                {31, "HUNGARIAN", 0, "Hungarian (magyar)", "hu_HU"},
                {27, "INDONESIAN", 0, "Indonesian (Bahasa indonesia)", "id_ID"},
                {29, "KYRGYZ", 0, "Kyrgyz (Кыргыз тили)", "ky_KG"},
index cda6fa8..06b77de 100644 (file)
@@ -82,15 +82,18 @@ static void do_channel_matte(bNode *node, float *out, float *in)
        }
        case 1: { /* Alpha=G-MAX(R, B) */
                switch (node->custom2) {
        }
        case 1: { /* Alpha=G-MAX(R, B) */
                switch (node->custom2) {
-                       case 1: {
+                       case 1:
+                       {
                                alpha=in[0]-MAX2(in[1], in[2]);
                                break;
                        }
                                alpha=in[0]-MAX2(in[1], in[2]);
                                break;
                        }
-                       case 2: {
+                       case 2:
+                       {
                                alpha=in[1]-MAX2(in[0], in[2]);
                                break;
                        }
                                alpha=in[1]-MAX2(in[0], in[2]);
                                break;
                        }
-                       case 3: {
+                       case 3:
+                       {
                                alpha=in[2]-MAX2(in[0], in[1]);
                                break;
                        }
                                alpha=in[2]-MAX2(in[0], in[1]);
                                break;
                        }
index ce11545..45b767c 100644 (file)
@@ -44,7 +44,7 @@
 #include "BLI_utildefines.h"
 
 static PyObject *Buffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
 #include "BLI_utildefines.h"
 
 static PyObject *Buffer_new(PyTypeObject *type, PyObject *args, PyObject *kwds);
-static PyObject *Method_ShaderSource (PyObject *self, PyObject *args);
+static PyObject *Method_ShaderSource(PyObject *self, PyObject *args);
 
 /* Buffer sequence methods */
 
 
 /* Buffer sequence methods */
 
index dee9d03..17f17ba 100644 (file)
@@ -2708,7 +2708,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
        
        switch (type) {
                /* mouse move */
        
        switch (type) {
                /* mouse move */
-               case GHOST_kEventCursorMove: {
+               case GHOST_kEventCursorMove:
+               {
                        if (win->active) {
                                GHOST_TEventCursorData *cd = customdata;
                                wmEvent *lastevent = win->queue.last;
                        if (win->active) {
                                GHOST_TEventCursorData *cd = customdata;
                                wmEvent *lastevent = win->queue.last;
@@ -2751,7 +2752,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        }
                        break;
                }
                        }
                        break;
                }
-               case GHOST_kEventTrackpad: {
+               case GHOST_kEventTrackpad:
+               {
                        GHOST_TEventTrackpadData *pd = customdata;
                        switch (pd->subtype) {
                                case GHOST_kTrackpadEventMagnify:
                        GHOST_TEventTrackpadData *pd = customdata;
                        switch (pd->subtype) {
                                case GHOST_kTrackpadEventMagnify:
@@ -2783,7 +2785,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                }
                /* mouse button */
                case GHOST_kEventButtonDown:
                }
                /* mouse button */
                case GHOST_kEventButtonDown:
-               case GHOST_kEventButtonUp: {
+               case GHOST_kEventButtonUp:
+               {
                        GHOST_TEventButtonData *bd = customdata;
 
                        event.val = (type == GHOST_kEventButtonDown) ? KM_PRESS : KM_RELEASE;
                        GHOST_TEventButtonData *bd = customdata;
 
                        event.val = (type == GHOST_kEventButtonDown) ? KM_PRESS : KM_RELEASE;
@@ -2831,7 +2834,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                }
                /* keyboard */
                case GHOST_kEventKeyDown:
                }
                /* keyboard */
                case GHOST_kEventKeyDown:
-               case GHOST_kEventKeyUp: {
+               case GHOST_kEventKeyUp:
+               {
                        GHOST_TEventKeyData *kd = customdata;
                        event.type = convert_key(kd->key);
                        event.ascii = kd->ascii;
                        GHOST_TEventKeyData *kd = customdata;
                        event.type = convert_key(kd->key);
                        event.ascii = kd->ascii;
@@ -2915,7 +2919,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        break;
                }
                        
                        break;
                }
                        
-               case GHOST_kEventWheel: {
+               case GHOST_kEventWheel:
+               {
                        GHOST_TEventWheelData *wheelData = customdata;
                        
                        if (wheelData->z > 0)
                        GHOST_TEventWheelData *wheelData = customdata;
                        
                        if (wheelData->z > 0)
@@ -2928,7 +2933,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        
                        break;
                }
                        
                        break;
                }
-               case GHOST_kEventTimer: {
+               case GHOST_kEventTimer:
+               {
                        event.type = TIMER;
                        event.custom = EVT_DATA_TIMER;
                        event.customdata = customdata;
                        event.type = TIMER;
                        event.custom = EVT_DATA_TIMER;
                        event.customdata = customdata;
@@ -2937,7 +2943,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        break;
                }
 
                        break;
                }
 
-               case GHOST_kEventNDOFMotion: {
+               case GHOST_kEventNDOFMotion:
+               {
                        event.type = NDOF_MOTION;
                        attach_ndof_data(&event, customdata);
                        wm_event_add(win, &event);
                        event.type = NDOF_MOTION;
                        attach_ndof_data(&event, customdata);
                        wm_event_add(win, &event);
@@ -2947,7 +2954,8 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                        break;
                }
 
                        break;
                }
 
-               case GHOST_kEventNDOFButton: {
+               case GHOST_kEventNDOFButton:
+               {
                        GHOST_TEventNDOFButtonData *e = customdata;
 
                        event.type = NDOF_BUTTON_NONE + e->button;
                        GHOST_TEventNDOFButtonData *e = customdata;
 
                        event.type = NDOF_BUTTON_NONE + e->button;
@@ -2973,12 +2981,12 @@ void wm_event_add_ghostevent(wmWindowManager *wm, wmWindow *win, int type, int U
                case GHOST_kNumEventTypes:
                        break;
 
                case GHOST_kNumEventTypes:
                        break;
 
-               case GHOST_kEventWindowDeactivate: {
+               case GHOST_kEventWindowDeactivate:
+               {
                        event.type = WINDEACTIVATE;
                        wm_event_add(win, &event);
 
                        break;
                        event.type = WINDEACTIVATE;
                        wm_event_add(win, &event);
 
                        break;
-                       
                }
 
        }
                }
 
        }
index b83b934..59c8235 100644 (file)
@@ -724,11 +724,13 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
 
                                break;
                        }
 
                                break;
                        }
-                       case GHOST_kEventWindowClose: {
+                       case GHOST_kEventWindowClose:
+                       {
                                wm_window_close(C, wm, win);
                                break;
                        }
                                wm_window_close(C, wm, win);
                                break;
                        }
-                       case GHOST_kEventWindowUpdate: {
+                       case GHOST_kEventWindowUpdate:
+                       {
                                if (G.debug & G_DEBUG_EVENTS) {
                                        printf("%s: ghost redraw %d\n", __func__, win->winid);
                                }
                                if (G.debug & G_DEBUG_EVENTS) {
                                        printf("%s: ghost redraw %d\n", __func__, win->winid);
                                }
@@ -739,7 +741,8 @@ static int ghost_event_proc(GHOST_EventHandle evt, GHOST_TUserDataPtr C_void_ptr
                                break;
                        }
                        case GHOST_kEventWindowSize:
                                break;
                        }
                        case GHOST_kEventWindowSize:
-                       case GHOST_kEventWindowMove: {
+                       case GHOST_kEventWindowMove:
+                       {
                                GHOST_TWindowState state;
                                state = GHOST_GetWindowState(win->ghostwin);
                                win->windowstate = state;
                                GHOST_TWindowState state;
                                state = GHOST_GetWindowState(win->ghostwin);
                                win->windowstate = state;
index 37920dc..064ffe5 100644 (file)
@@ -48,5 +48,7 @@
                <key>OMP_NUM_THREADS</key>
                <string>4</string>
        </dict>
                <key>OMP_NUM_THREADS</key>
                <string>4</string>
        </dict>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
 </dict>
 </plist>
 </dict>
 </plist>
index 54364d1..c7b9ceb 100644 (file)
@@ -1,33 +1,27 @@
 <?xml version="1.0" encoding="UTF-8"?>
 <?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE plist SYSTEM "file://localhost/System/Library/DTDs/PropertyList.dtd">
-<plist version="0.9">
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
 <dict>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
 <dict>
        <key>CFBundleInfoDictionaryVersion</key>
        <string>6.0</string>
-
        <key>CFBundleExecutable</key>
        <string>blenderplayer</string>
        <key>CFBundleExecutable</key>
        <string>blenderplayer</string>
-
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleSignature</key>
        <string>????</string>
        <key>CFBundlePackageType</key>
        <string>APPL</string>
        <key>CFBundleSignature</key>
        <string>????</string>
-
        <key>CFBundleIconFile</key>
        <string>blender player icon.icns</string>
        <key>CFBundleIconFile</key>
        <string>blender player icon.icns</string>
-
        <key>CFBundleName</key>
        <string>BlenderPlayer</string>
        <key>CFBundleIdentifier</key>
        <string>org.blenderfoundation.blenderplayer</string>
        <key>CFBundleName</key>
        <string>BlenderPlayer</string>
        <key>CFBundleIdentifier</key>
        <string>org.blenderfoundation.blenderplayer</string>
-
        <key>CFBundleVersion</key>
        <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
        <key>CFBundleShortVersionString</key>
        <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
        <key>CFBundleGetInfoString</key>
        <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
        <key>CFBundleVersion</key>
        <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
        <key>CFBundleShortVersionString</key>
        <string>${MACOSX_BUNDLE_SHORT_VERSION_STRING}</string>
        <key>CFBundleGetInfoString</key>
        <string>${MACOSX_BUNDLE_LONG_VERSION_STRING}, Blender Foundation</string>
-
        <key>CFBundleDocumentTypes</key>
        <array>
                <dict>
        <key>CFBundleDocumentTypes</key>
        <array>
                <dict>
@@ -49,5 +43,7 @@
                        <false/>
                </dict>
        </array>
                        <false/>
                </dict>
        </array>
+       <key>NSPrincipalClass</key>
+       <string>NSApplication</string>
 </dict>
 </plist>
 </dict>
 </plist>