style cleanup: mostly whitespace in rna
authorCampbell Barton <ideasman42@gmail.com>
Sat, 12 May 2012 11:01:29 +0000 (11:01 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 12 May 2012 11:01:29 +0000 (11:01 +0000)
73 files changed:
source/blender/avi/AVI_avi.h
source/blender/editors/space_file/fsmenu.c
source/blender/makesrna/RNA_types.h
source/blender/makesrna/intern/makesrna.c
source/blender/makesrna/intern/rna_ID.c
source/blender/makesrna/intern/rna_access.c
source/blender/makesrna/intern/rna_action.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_animation.c
source/blender/makesrna/intern/rna_animation_api.c
source/blender/makesrna/intern/rna_animviz.c
source/blender/makesrna/intern/rna_armature.c
source/blender/makesrna/intern/rna_armature_api.c
source/blender/makesrna/intern/rna_boid.c
source/blender/makesrna/intern/rna_camera.c
source/blender/makesrna/intern/rna_cloth.c
source/blender/makesrna/intern/rna_color.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_context.c
source/blender/makesrna/intern/rna_controller.c
source/blender/makesrna/intern/rna_curve.c
source/blender/makesrna/intern/rna_define.c
source/blender/makesrna/intern/rna_dynamicpaint.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_fluidsim.c
source/blender/makesrna/intern/rna_gpencil.c
source/blender/makesrna/intern/rna_group.c
source/blender/makesrna/intern/rna_image.c
source/blender/makesrna/intern/rna_image_api.c
source/blender/makesrna/intern/rna_key.c
source/blender/makesrna/intern/rna_lamp.c
source/blender/makesrna/intern/rna_lattice.c
source/blender/makesrna/intern/rna_main.c
source/blender/makesrna/intern/rna_main_api.c
source/blender/makesrna/intern/rna_material.c
source/blender/makesrna/intern/rna_mesh.c
source/blender/makesrna/intern/rna_mesh_api.c
source/blender/makesrna/intern/rna_meta.c
source/blender/makesrna/intern/rna_modifier.c
source/blender/makesrna/intern/rna_movieclip.c
source/blender/makesrna/intern/rna_nla.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_api.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_packedfile.c
source/blender/makesrna/intern/rna_particle.c
source/blender/makesrna/intern/rna_pose.c
source/blender/makesrna/intern/rna_pose_api.c
source/blender/makesrna/intern/rna_property.c
source/blender/makesrna/intern/rna_render.c
source/blender/makesrna/intern/rna_rna.c
source/blender/makesrna/intern/rna_scene_api.c
source/blender/makesrna/intern/rna_screen.c
source/blender/makesrna/intern/rna_sculpt_paint.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_sequencer.c
source/blender/makesrna/intern/rna_smoke.c
source/blender/makesrna/intern/rna_sound.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_text.c
source/blender/makesrna/intern/rna_text_api.c
source/blender/makesrna/intern/rna_texture.c
source/blender/makesrna/intern/rna_texture_api.c
source/blender/makesrna/intern/rna_timeline.c
source/blender/makesrna/intern/rna_ui.c
source/blender/makesrna/intern/rna_ui_api.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/makesrna/intern/rna_wm_api.c
source/blender/makesrna/intern/rna_world.c
source/blender/modifiers/intern/MOD_util.c
source/blender/windowmanager/wm_cursors.h
source/creator/buildinfo.c

index 76e11ebad08c77275d09cb444c230fd789d3f4f4..bdfdbc117ed218fe37d8570de48e4f4cd786b862 100644 (file)
@@ -201,7 +201,7 @@ typedef struct _AviMovie {
 } AviMovie;
 
 typedef enum {
-       AVI_ERROR_NONE=0,
+       AVI_ERROR_NONE = 0,
        AVI_ERROR_COMPRESSION,
        AVI_ERROR_OPEN,
        AVI_ERROR_READING,
@@ -214,7 +214,7 @@ typedef enum {
 
 /* belongs to the option-setting function. */
 typedef enum {
-       AVI_OPTION_WIDTH=0,
+       AVI_OPTION_WIDTH = 0,
        AVI_OPTION_HEIGHT, 
        AVI_OPTION_QUALITY,
        AVI_OPTION_FRAMERATE
@@ -230,7 +230,7 @@ typedef enum {
 /**
  * This is a sort of MAKE_ID thing. Used in imbuf :( It is used
  * through options in the AVI header (AviStreamHeader). */
-#define FCC(ch4) (ch4[0] | ch4[1]<<8 | ch4[2]<<16 | ch4[3] << 24)
+#define FCC(ch4) (ch4[0] | ch4[1] << 8 | ch4[2] << 16 | ch4[3] << 24)
 
 /**
  * Test whether this is an avi-format.
index 4f8da4a10691c6cb4122ff960f232f8a32c8be41..502611758521cf8bec7e5775c0f5df4af1744dd9 100644 (file)
@@ -54,7 +54,7 @@
 #endif
 
 #ifdef __APPLE__
-   /* XXX BIG WARNING: carbon.h can not be included in blender code, it conflicts with struct ID */
+/* XXX BIG WARNING: carbon.h can not be included in blender code, it conflicts with struct ID */
 #  define ID ID_
 #  include <CoreServices/CoreServices.h>
 #endif /* __APPLE__ */
@@ -68,7 +68,7 @@
 
 /* FSMENU HANDLING */
 
-       /* FSMenuEntry's without paths indicate seperators */
+/* FSMenuEntry's without paths indicate seperators */
 typedef struct _FSMenuEntry FSMenuEntry;
 struct _FSMenuEntry {
        FSMenuEntry *next;
@@ -77,8 +77,7 @@ struct _FSMenuEntry {
        short save;
 };
 
-typedef struct FSMenu
-{
+typedef struct FSMenu {
        FSMenuEntry *fsmenu_system;
        FSMenuEntry *fsmenu_bookmarks;
        FSMenuEntry *fsmenu_recent;
@@ -87,15 +86,15 @@ typedef struct FSMenu
 
 static FSMenu *g_fsmenu = NULL;
 
-struct FSMenu* fsmenu_get(void)
+FSMenu *fsmenu_get(void)
 {
        if (!g_fsmenu) {
-               g_fsmenu=MEM_callocN(sizeof(struct FSMenu), "fsmenu");
+               g_fsmenu = MEM_callocN(sizeof(struct FSMenu), "fsmenu");
        }
        return g_fsmenu;
 }
 
-static FSMenuEntry *fsmenu_get_category(struct FSMenufsmenu, FSMenuCategory category)
+static FSMenuEntry *fsmenu_get_category(struct FSMenu *fsmenu, FSMenuCategory category)
 {
        FSMenuEntry *fsms = NULL;
 
@@ -113,7 +112,7 @@ static FSMenuEntry *fsmenu_get_category(struct FSMenu* fsmenu, FSMenuCategory ca
        return fsms;
 }
 
-static void fsmenu_set_category(struct FSMenufsmenu, FSMenuCategory category, FSMenuEntry *fsms)
+static void fsmenu_set_category(struct FSMenu *fsmenu, FSMenuCategory category, FSMenuEntry *fsms)
 {
        switch (category) {
                case FS_CATEGORY_SYSTEM:
@@ -128,49 +127,49 @@ static void fsmenu_set_category(struct FSMenu* fsmenu, FSMenuCategory category,
        }
 }
 
-int fsmenu_get_nentries(struct FSMenufsmenu, FSMenuCategory category)
+int fsmenu_get_nentries(struct FSMenu *fsmenu, FSMenuCategory category)
 {
        FSMenuEntry *fsme;
-       int count= 0;
+       int count = 0;
 
-       for (fsme= fsmenu_get_category(fsmenu, category); fsme; fsme= fsme->next) 
+       for (fsme = fsmenu_get_category(fsmenu, category); fsme; fsme = fsme->next)
                count++;
 
        return count;
 }
 
-char *fsmenu_get_entry(struct FSMenufsmenu, FSMenuCategory category, int idx)
+char *fsmenu_get_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
 {
        FSMenuEntry *fsme;
 
-       for (fsme= fsmenu_get_category(fsmenu, category); fsme && idx; fsme= fsme->next)
+       for (fsme = fsmenu_get_category(fsmenu, category); fsme && idx; fsme = fsme->next)
                idx--;
 
-       return fsme?fsme->path:NULL;
+       return fsme ? fsme->path : NULL;
 }
 
-short fsmenu_can_save (struct FSMenu* fsmenu, FSMenuCategory category, int idx)
+short fsmenu_can_save(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
 {
        FSMenuEntry *fsme;
 
-       for (fsme= fsmenu_get_category(fsmenu, category); fsme && idx; fsme= fsme->next)
+       for (fsme = fsmenu_get_category(fsmenu, category); fsme && idx; fsme = fsme->next)
                idx--;
 
-       return fsme?fsme->save:0;
+       return fsme ? fsme->save : 0;
 }
 
-void fsmenu_insert_entry(struct FSMenufsmenu, FSMenuCategory category, const char *path, int sorted, short save)
+void fsmenu_insert_entry(struct FSMenu *fsmenu, FSMenuCategory category, const char *path, int sorted, short save)
 {
        FSMenuEntry *prev;
        FSMenuEntry *fsme;
        FSMenuEntry *fsms;
 
        fsms = fsmenu_get_category(fsmenu, category);
-       prev= fsme= fsms;
+       prev = fsme = fsms;
 
-       for (; fsme; prev= fsme, fsme= fsme->next) {
+       for (; fsme; prev = fsme, fsme = fsme->next) {
                if (fsme->path) {
-                       const int cmp_ret= BLI_path_cmp(path, fsme->path);
+                       const int cmp_ret = BLI_path_cmp(path, fsme->path);
                        if (cmp_ret == 0) {
                                return;
                        }
@@ -188,26 +187,26 @@ void fsmenu_insert_entry(struct FSMenu* fsmenu, FSMenuCategory category, const c
                }
        }
        
-       fsme= MEM_mallocN(sizeof(*fsme), "fsme");
-       fsme->path= BLI_strdup(path);
+       fsme = MEM_mallocN(sizeof(*fsme), "fsme");
+       fsme->path = BLI_strdup(path);
        fsme->save = save;
 
        if (prev) {
-               fsme->next= prev->next;
-               prev->next= fsme;
+               fsme->next = prev->next;
+               prev->next = fsme;
        }
        else {
-               fsme->next= fsms;
+               fsme->next = fsms;
                fsmenu_set_category(fsmenu, category, fsme);
        }
 }
 
-void fsmenu_remove_entry(struct FSMenufsmenu, FSMenuCategory category, int idx)
+void fsmenu_remove_entry(struct FSMenu *fsmenu, FSMenuCategory category, int idx)
 {
-       FSMenuEntry *prev= NULL, *fsme= NULL;
+       FSMenuEntry *prev = NULL, *fsme = NULL;
        FSMenuEntry *fsms = fsmenu_get_category(fsmenu, category);
 
-       for (fsme= fsms; fsme && idx; prev= fsme, fsme= fsme->next)             
+       for (fsme = fsms; fsme && idx; prev = fsme, fsme = fsme->next)
                idx--;
 
        if (fsme) {
@@ -218,10 +217,10 @@ void fsmenu_remove_entry(struct FSMenu* fsmenu, FSMenuCategory category, int idx
 
                        /* remove fsme from list */
                        if (prev) {
-                               prev->next= fsme->next;
+                               prev->next = fsme->next;
                        }
                        else {
-                               fsms= fsme->next;
+                               fsms = fsme->next;
                                fsmenu_set_category(fsmenu, category, fsms);
                        }
                        /* free entry */
@@ -231,16 +230,16 @@ void fsmenu_remove_entry(struct FSMenu* fsmenu, FSMenuCategory category, int idx
        }
 }
 
-void fsmenu_write_file(struct FSMenufsmenu, const char *filename)
+void fsmenu_write_file(struct FSMenu *fsmenu, const char *filename)
 {
-       FSMenuEntry *fsme= NULL;
-       int nskip= 0;
+       FSMenuEntry *fsme = NULL;
+       int nskip = 0;
 
        FILE *fp = BLI_fopen(filename, "w");
        if (!fp) return;
        
        fprintf(fp, "[Bookmarks]\n");
-       for (fsme= fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); fsme; fsme= fsme->next) {
+       for (fsme = fsmenu_get_category(fsmenu, FS_CATEGORY_BOOKMARKS); fsme; fsme = fsme->next) {
                if (fsme->path && fsme->save) {
                        fprintf(fp, "%s\n", fsme->path);
                }
@@ -248,10 +247,10 @@ void fsmenu_write_file(struct FSMenu* fsmenu, const char *filename)
        fprintf(fp, "[Recent]\n");
        nskip = fsmenu_get_nentries(fsmenu, FS_CATEGORY_RECENT) - FSMENU_RECENT_MAX;
        // skip first entries if list too long
-       for (fsme= fsmenu_get_category(fsmenu, FS_CATEGORY_RECENT); fsme && (nskip>0); fsme= fsme->next, --nskip) {
+       for (fsme = fsmenu_get_category(fsmenu, FS_CATEGORY_RECENT); fsme && (nskip > 0); fsme = fsme->next, --nskip) {
                /* pass */
        }
-       for (; fsme; fsme= fsme->next) {
+       for (; fsme; fsme = fsme->next) {
                if (fsme->path && fsme->save) {
                        fprintf(fp, "%s\n", fsme->path);
                }
@@ -259,7 +258,7 @@ void fsmenu_write_file(struct FSMenu* fsmenu, const char *filename)
        fclose(fp);
 }
 
-void fsmenu_read_bookmarks(struct FSMenufsmenu, const char *filename)
+void fsmenu_read_bookmarks(struct FSMenu *fsmenu, const char *filename)
 {
        char line[256];
        FSMenuCategory category = FS_CATEGORY_BOOKMARKS;
@@ -268,11 +267,11 @@ void fsmenu_read_bookmarks(struct FSMenu* fsmenu, const char *filename)
        fp = BLI_fopen(filename, "r");
        if (!fp) return;
 
-       while ( fgets ( line, 256, fp ) != NULL ) {  /* read a line */
-               if (strncmp(line, "[Bookmarks]", 11)==0) {
+       while (fgets(line, 256, fp) != NULL) {       /* read a line */
+               if (strncmp(line, "[Bookmarks]", 11) == 0) {
                        category = FS_CATEGORY_BOOKMARKS;
                }
-               else if (strncmp(line, "[Recent]", 8)==0) {
+               else if (strncmp(line, "[Recent]", 8) == 0) {
                        category = FS_CATEGORY_RECENT;
                }
                else {
@@ -296,7 +295,7 @@ void fsmenu_read_bookmarks(struct FSMenu* fsmenu, const char *filename)
        fclose(fp);
 }
 
-void fsmenu_read_system(struct FSMenufsmenu)
+void fsmenu_read_system(struct FSMenu *fsmenu)
 {
        char line[256];
 #ifdef WIN32
@@ -306,14 +305,14 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                char tmps[4];
                int i;
                        
-               tmp= GetLogicalDrives();
+               tmp = GetLogicalDrives();
                
-               for (i=0; i < 26; i++) {
-                       if ((tmp>>i) & 1) {
-                               tmps[0]='A'+i;
-                               tmps[1]=':';
-                               tmps[2]='\\';
-                               tmps[3]=0;
+               for (i = 0; i < 26; i++) {
+                       if ((tmp >> i) & 1) {
+                               tmps[0] = 'A' + i;
+                               tmps[1] = ':';
+                               tmps[2] = '\\';
+                               tmps[3] = 0;
                                
                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, tmps, 1, 0);
                        }
@@ -329,7 +328,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
 #ifdef __APPLE__
        {
 #if (MAC_OS_X_VERSION_MIN_REQUIRED <= MAC_OS_X_VERSION_10_4)
-               OSErr err=noErr;
+               OSErr err = noErr;
                int i;
                const char *home;
                
@@ -343,7 +342,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                                continue;
                        
                        FSRefMakePath(&dir, path, FILE_MAX);
-                       if (strcmp((char*)path, "/home") && strcmp((char*)path, "/net")) {
+                       if (strcmp((char *)path, "/home") && strcmp((char *)path, "/net")) {
                                /* /net and /home are meaningless on OSX, home folders are stored in /Users */
                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, (char *)path, 1, 0);
                        }
@@ -393,13 +392,13 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                pathesArray = LSSharedFileListCopySnapshot(list, &seed);
                pathesCount = CFArrayGetCount(pathesArray);
                
-               for (i=0; i<pathesCount; i++) {
+               for (i = 0; i < pathesCount; i++) {
                        itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
                        
                        err = LSSharedFileListItemResolve(itemRef, 
-                                                                                         kLSSharedFileListNoUserInteraction |
+                                                         kLSSharedFileListNoUserInteraction |
                                                          kLSSharedFileListDoNotMountVolumes,
-                                                                                         &cfURL, NULL);
+                                                         &cfURL, NULL);
                        if (err != noErr)
                                continue;
                        
@@ -418,7 +417,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                
                /* Then get network volumes */
                err = noErr;
-               for (i=1; err!=nsvErr; i++) {
+               for (i = 1; err != nsvErr; i++) {
                        FSRef dir;
                        FSVolumeRefNum volRefNum;
                        struct GetVolParmsInfoBuffer volParmsBuffer;
@@ -442,13 +441,13 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                pathesArray = LSSharedFileListCopySnapshot(list, &seed);
                pathesCount = CFArrayGetCount(pathesArray);
                
-               for (i=0; i<pathesCount; i++) {
+               for (i = 0; i < pathesCount; i++) {
                        itemRef = (LSSharedFileListItemRef)CFArrayGetValueAtIndex(pathesArray, i);
                        
                        err = LSSharedFileListItemResolve(itemRef, 
-                                                                                         kLSSharedFileListNoUserInteraction |
+                                                         kLSSharedFileListNoUserInteraction |
                                                          kLSSharedFileListDoNotMountVolumes,
-                                                                                         &cfURL, NULL);
+                                                         &cfURL, NULL);
                        if (err != noErr)
                                continue;
                        
@@ -469,7 +468,7 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
 #else
        /* unix */
        {
-               const char *home= getenv("HOME");
+               const char *home = getenv("HOME");
 
                if (home) {
                        BLI_snprintf(line, FILE_MAXDIR, "%s/", home);
@@ -481,34 +480,34 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
                }
 
                {
-                       int found= 0;
+                       int found = 0;
 #ifdef __linux__
                        /* loop over mount points */
                        struct mntent *mnt;
                        int len;
                        FILE *fp;
 
-                       fp = setmntent (MOUNTED, "r");
+                       fp = setmntent(MOUNTED, "r");
                        if (fp == NULL) {
                                fprintf(stderr, "could not get a list of mounted filesystemts\n");
                        }
                        else {
-                               while ((mnt = getmntent (fp))) {
+                               while ((mnt = getmntent(fp))) {
                                        /* not sure if this is right, but seems to give the relevant mnts */
                                        if (strncmp(mnt->mnt_fsname, "/dev", 4))
                                                continue;
 
-                                       len= strlen(mnt->mnt_dir);
-                                       if (len && mnt->mnt_dir[len-1] != '/') {
+                                       len = strlen(mnt->mnt_dir);
+                                       if (len && mnt->mnt_dir[len - 1] != '/') {
                                                BLI_snprintf(line, FILE_MAXDIR, "%s/", mnt->mnt_dir);
                                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, line, 1, 0);
                                        }
                                        else
                                                fsmenu_insert_entry(fsmenu, FS_CATEGORY_SYSTEM, mnt->mnt_dir, 1, 0);
 
-                                       found= 1;
+                                       found = 1;
                                }
-                               if (endmntent (fp) == 0) {
+                               if (endmntent(fp) == 0) {
                                        fprintf(stderr, "could not close the list of mounted filesystemts\n");
                                }
                        }
@@ -524,25 +523,24 @@ void fsmenu_read_system(struct FSMenu* fsmenu)
 }
 
 
-static void fsmenu_free_category(struct FSMenufsmenu, FSMenuCategory category)
+static void fsmenu_free_category(struct FSMenu *fsmenu, FSMenuCategory category)
 {
-       FSMenuEntry *fsme= fsmenu_get_category(fsmenu, category);
+       FSMenuEntry *fsme = fsmenu_get_category(fsmenu, category);
 
        while (fsme) {
-               FSMenuEntry *n= fsme->next;
+               FSMenuEntry *n = fsme->next;
 
                if (fsme->path) MEM_freeN(fsme->path);
                MEM_freeN(fsme);
 
-               fsme= n;
+               fsme = n;
        }
 }
 
-void fsmenu_free(struct FSMenufsmenu)
+void fsmenu_free(struct FSMenu *fsmenu)
 {
        fsmenu_free_category(fsmenu, FS_CATEGORY_SYSTEM);
        fsmenu_free_category(fsmenu, FS_CATEGORY_BOOKMARKS);
        fsmenu_free_category(fsmenu, FS_CATEGORY_RECENT);
        MEM_freeN(fsmenu);
 }
-
index 47b25720373ec24e089783457ee2957e6374288a..348efaed8c6b49459f0c10b0f2f1730cee2c1515 100644 (file)
@@ -80,15 +80,15 @@ typedef enum PropertyType {
 
 /* also update rna_property_subtype_unit when you change this */
 typedef enum PropertyUnit {
-       PROP_UNIT_NONE = (0<<16),
-       PROP_UNIT_LENGTH = (1<<16),                     /* m */
-       PROP_UNIT_AREA = (2<<16),                       /* m^2 */
-       PROP_UNIT_VOLUME = (3<<16),                     /* m^3 */
-       PROP_UNIT_MASS = (4<<16),                       /* kg */
-       PROP_UNIT_ROTATION = (5<<16),           /* radians */
-       PROP_UNIT_TIME = (6<<16),                       /* frame */
-       PROP_UNIT_VELOCITY = (7<<16),           /* m/s */
-       PROP_UNIT_ACCELERATION = (8<<16)        /* m/(s^2) */
+       PROP_UNIT_NONE = (0 << 16),
+       PROP_UNIT_LENGTH = (1 << 16),         /* m */
+       PROP_UNIT_AREA = (2 << 16),           /* m^2 */
+       PROP_UNIT_VOLUME = (3 << 16),         /* m^3 */
+       PROP_UNIT_MASS = (4 << 16),           /* kg */
+       PROP_UNIT_ROTATION = (5 << 16),       /* radians */
+       PROP_UNIT_TIME = (6 << 16),           /* frame */
+       PROP_UNIT_VELOCITY = (7 << 16),       /* m/s */
+       PROP_UNIT_ACCELERATION = (8 << 16)    /* m/(s^2) */
 } PropertyUnit;
 
 #define RNA_SUBTYPE_UNIT(subtype)       ((subtype) &  0x00FF0000)
@@ -118,22 +118,22 @@ typedef enum PropertySubType {
        PROP_UNSIGNED = 13,
        PROP_PERCENTAGE = 14,
        PROP_FACTOR = 15,
-       PROP_ANGLE = 16|PROP_UNIT_ROTATION,
-       PROP_TIME = 17|PROP_UNIT_TIME,
-       PROP_DISTANCE = 18|PROP_UNIT_LENGTH,
+       PROP_ANGLE = 16 | PROP_UNIT_ROTATION,
+       PROP_TIME = 17 | PROP_UNIT_TIME,
+       PROP_DISTANCE = 18 | PROP_UNIT_LENGTH,
 
        /* number arrays */
        PROP_COLOR = 20,
-       PROP_TRANSLATION = 21|PROP_UNIT_LENGTH,
+       PROP_TRANSLATION = 21 | PROP_UNIT_LENGTH,
        PROP_DIRECTION = 22,
-       PROP_VELOCITY = 23|PROP_UNIT_VELOCITY,
-       PROP_ACCELERATION = 24|PROP_UNIT_ACCELERATION,
+       PROP_VELOCITY = 23 | PROP_UNIT_VELOCITY,
+       PROP_ACCELERATION = 24 | PROP_UNIT_ACCELERATION,
        PROP_MATRIX = 25,
-       PROP_EULER = 26|PROP_UNIT_ROTATION,
+       PROP_EULER = 26 | PROP_UNIT_ROTATION,
        PROP_QUATERNION = 27,
        PROP_AXISANGLE = 28,
        PROP_XYZ = 29,
-       PROP_XYZ_LENGTH = 29|PROP_UNIT_LENGTH,
+       PROP_XYZ_LENGTH = 29 | PROP_UNIT_LENGTH,
        PROP_COLOR_GAMMA = 30,
        PROP_COORDS = 31, /* generic array, no units applied, only that x/y/z/w are used (python vec) */
 
@@ -147,49 +147,49 @@ typedef enum PropertyFlag {
        /* editable means the property is editable in the user
         * interface, properties are editable by default except
         * for pointers and collections. */
-       PROP_EDITABLE = (1<<0),
+       PROP_EDITABLE = (1 << 0),
 
        /* this property is editable even if it is lib linked,
         * meaning it will get lost on reload, but it's useful
         * for editing. */
-       PROP_LIB_EXCEPTION = (1<<16),
+       PROP_LIB_EXCEPTION = (1 << 16),
 
        /* animatable means the property can be driven by some
         * other input, be it animation curves, expressions, ..
         * properties are animatable by default except for pointers
         * and collections */
-       PROP_ANIMATABLE = (1<<1),
+       PROP_ANIMATABLE = (1 << 1),
 
        /* icon */
-       PROP_ICONS_CONSECUTIVE = (1<<12),
+       PROP_ICONS_CONSECUTIVE = (1 << 12),
 
        /* hidden in  the user interface */
-       PROP_HIDDEN = (1<<19),
+       PROP_HIDDEN = (1 << 19),
        /* do not write in presets */
-       PROP_SKIP_SAVE = (1<<28),
+       PROP_SKIP_SAVE = (1 << 28),
 
        /* function paramater flags */
-       PROP_REQUIRED = (1<<2),
-       PROP_OUTPUT = (1<<3),
-       PROP_RNAPTR = (1<<11),
+       PROP_REQUIRED = (1 << 2),
+       PROP_OUTPUT = (1 << 3),
+       PROP_RNAPTR = (1 << 11),
        /* registering */
-       PROP_REGISTER = (1<<4),
-       PROP_REGISTER_OPTIONAL = (1<<4)|(1<<5),
+       PROP_REGISTER = (1 << 4),
+       PROP_REGISTER_OPTIONAL = (1 << 4) | (1 << 5),
 
        /* pointers */
-       PROP_ID_REFCOUNT = (1<<6),
+       PROP_ID_REFCOUNT = (1 << 6),
 
        /* disallow assigning a variable to its self, eg an object tracking its self
         * only apply this to types that are derived from an ID ()*/
-       PROP_ID_SELF_CHECK = (1<<20),
+       PROP_ID_SELF_CHECK = (1 << 20),
        /* use for...
         * - pointers: in the UI and python so unsetting or setting to None won't work
         * - strings: so our internal generated get/length/set functions know to do NULL checks before access [#30865] */
-       PROP_NEVER_NULL = (1<<18),
+       PROP_NEVER_NULL = (1 << 18),
        /* currently only used for UI, this is similar to PROP_NEVER_NULL
         * except that the value may be NULL at times, used for ObData, where an Empty's will be NULL
         * but setting NULL on a mesh object is not possible. So, if its not NULL, setting NULL cant be done! */
-       PROP_NEVER_UNLINK = (1<<25),
+       PROP_NEVER_UNLINK = (1 << 25),
 
        /* flag contains multiple enums.
         * note: not to be confused with prop->enumbitflags
@@ -197,32 +197,32 @@ typedef enum PropertyFlag {
         *
         * note: these can't be animated so use with care.
         */
-       PROP_ENUM_FLAG = (1<<21),
+       PROP_ENUM_FLAG = (1 << 21),
 
        /* need context for update function */
-       PROP_CONTEXT_UPDATE = (1<<22),
-       PROP_CONTEXT_PROPERTY_UPDATE = (1<<22)|(1<<27),
+       PROP_CONTEXT_UPDATE = (1 << 22),
+       PROP_CONTEXT_PROPERTY_UPDATE = (1 << 22) | (1 << 27),
 
        /* Use for arrays or for any data that should not have a referene kept
         * most common case is functions that return arrays where the array */
-       PROP_THICK_WRAP = (1<<23),
+       PROP_THICK_WRAP = (1 << 23),
 
        /* Reject values outside limits, use for python api only so far
         * this is for use when silently clamping string length will give
         * bad behavior later. Could also enforce this for INT's and other types.
         * note: currently no support for function arguments or non utf8 paths (filepaths) */
-       PROP_NEVER_CLAMP = (1<<26),
+       PROP_NEVER_CLAMP = (1 << 26),
 
        /* internal flags */
-       PROP_BUILTIN = (1<<7),
-       PROP_EXPORT = (1<<8),
-       PROP_RUNTIME = (1<<9),
-       PROP_IDPROPERTY = (1<<10),
-       PROP_RAW_ACCESS = (1<<13),
-       PROP_RAW_ARRAY = (1<<14),
-       PROP_FREE_POINTERS = (1<<15),
-       PROP_DYNAMIC = (1<<17), /* for dynamic arrays, and retvals of type string */
-       PROP_ENUM_NO_CONTEXT = (1<<24) /* for enum that shouldn't be contextual */
+       PROP_BUILTIN = (1 << 7),
+       PROP_EXPORT = (1 << 8),
+       PROP_RUNTIME = (1 << 9),
+       PROP_IDPROPERTY = (1 << 10),
+       PROP_RAW_ACCESS = (1 << 13),
+       PROP_RAW_ARRAY = (1 << 14),
+       PROP_FREE_POINTERS = (1 << 15),
+       PROP_DYNAMIC = (1 << 17), /* for dynamic arrays, and retvals of type string */
+       PROP_ENUM_NO_CONTEXT = (1 << 24) /* for enum that shouldn't be contextual */
 } PropertyFlag;
 
 typedef struct CollectionPropertyIterator {
@@ -245,7 +245,7 @@ typedef struct CollectionPointerLink {
 } CollectionPointerLink;
 
 typedef enum RawPropertyType {
-       PROP_RAW_UNSET=-1,
+       PROP_RAW_UNSET = -1,
        PROP_RAW_INT, // XXX - abused for types that are not set, eg. MFace.verts, needs fixing.
        PROP_RAW_SHORT,
        PROP_RAW_CHAR,
@@ -315,7 +315,7 @@ typedef enum FunctionFlag {
 
        /* registering */
        FUNC_REGISTER = 16,
-       FUNC_REGISTER_OPTIONAL = 16|32,
+       FUNC_REGISTER_OPTIONAL = 16 | 32,
 
        /* internal flags */
        FUNC_BUILTIN = 128,
index 62957ac5de8b5274b217c2676fcbaf9b8bb437d5..d148182cce7ff630b909fd4326561f34d6915e49 100644 (file)
@@ -139,7 +139,7 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
                                /* dir only */
                                p1 = strrchr(from_path, '/');
                                p2 = strrchr(from_path, '\\');
-                               strcpy((p1 > p2 ? p1 : p2)+1, dep_files[pass]);
+                               strcpy((p1 > p2 ? p1 : p2) + 1, dep_files[pass]);
                                /* account for build deps, if makesrna.c (this file) is newer */
                                if (file_older(orgfile, from_path)) {
                                        REN_IF_DIFF;
@@ -170,8 +170,8 @@ static int replace_if_different(char *tmpfile, const char *dep_files[])
        }
 
        /* now compare the files... */
-       arr_new = MEM_mallocN(sizeof(char)*len_new, "rna_cmp_file_new");
-       arr_org = MEM_mallocN(sizeof(char)*len_org, "rna_cmp_file_org");
+       arr_new = MEM_mallocN(sizeof(char) * len_new, "rna_cmp_file_new");
+       arr_org = MEM_mallocN(sizeof(char) * len_org, "rna_cmp_file_org");
 
        if (fread(arr_new, sizeof(char), len_new, fp_new) != len_new)
                fprintf(stderr, "%s:%d, error reading file %s for comparison.\n", __FILE__, __LINE__, tmpfile);
@@ -213,16 +213,16 @@ static const char *rna_safe_id(const char *id)
 
 static int cmp_struct(const void *a, const void *b)
 {
-       const StructRNA *structa = *(const StructRNA**)a;
-       const StructRNA *structb = *(const StructRNA**)b;
+       const StructRNA *structa = *(const StructRNA **)a;
+       const StructRNA *structb = *(const StructRNA **)b;
 
        return strcmp(structa->identifier, structb->identifier);
 }
 
 static int cmp_property(const void *a, const void *b)
 {
-       const PropertyRNA *propa = *(const PropertyRNA**)a;
-       const PropertyRNA *propb = *(const PropertyRNA**)b;
+       const PropertyRNA *propa = *(const PropertyRNA **)a;
+       const PropertyRNA *propb = *(const PropertyRNA **)b;
 
        if (strcmp(propa->identifier, "rna_type") == 0) return -1;
        else if (strcmp(propb->identifier, "rna_type") == 0) return 1;
@@ -235,21 +235,21 @@ static int cmp_property(const void *a, const void *b)
 
 static int cmp_def_struct(const void *a, const void *b)
 {
-       const StructDefRNA *dsa = *(const StructDefRNA**)a;
-       const StructDefRNA *dsb = *(const StructDefRNA**)b;
+       const StructDefRNA *dsa = *(const StructDefRNA **)a;
+       const StructDefRNA *dsb = *(const StructDefRNA **)b;
 
        return cmp_struct(&dsa->srna, &dsb->srna);
 }
 
 static int cmp_def_property(const void *a, const void *b)
 {
-       const PropertyDefRNA *dpa = *(const PropertyDefRNA**)a;
-       const PropertyDefRNA *dpb = *(const PropertyDefRNA**)b;
+       const PropertyDefRNA *dpa = *(const PropertyDefRNA **)a;
+       const PropertyDefRNA *dpb = *(const PropertyDefRNA **)b;
 
        return cmp_property(&dpa->prop, &dpb->prop);
 }
 
-static void rna_sortlist(ListBase *listbase, int(*cmp)(const void*, const void*))
+static void rna_sortlist(ListBase *listbase, int (*cmp)(const void *, const void *))
 {
        Link *link;
        void **array;
@@ -261,14 +261,14 @@ static void rna_sortlist(ListBase *listbase, int(*cmp)(const void*, const void*)
        for (size = 0, link = listbase->first; link; link = link->next)
                size++;
 
-       array = MEM_mallocN(sizeof(void*)*size, "rna_sortlist");
+       array = MEM_mallocN(sizeof(void *) * size, "rna_sortlist");
        for (a = 0, link = listbase->first; link; link = link->next, a++)
                array[a] = link;
 
-       qsort(array, size, sizeof(void*), cmp);
+       qsort(array, size, sizeof(void *), cmp);
 
        listbase->first = listbase->last = NULL;
-       for (a = 0; a<size; a++) {
+       for (a = 0; a < size; a++) {
                link = array[a];
                link->next = link->prev = NULL;
                rna_addtail(listbase, link);
@@ -322,7 +322,7 @@ static char *rna_alloc_function_name(const char *structname, const char *propnam
        char *result;
 
        snprintf(buffer, sizeof(buffer), "%s_%s_%s", structname, propname, type);
-       result = MEM_callocN(sizeof(char)*strlen(buffer)+1, "rna_alloc_function_name");
+       result = MEM_callocN(sizeof(char) * strlen(buffer) + 1, "rna_alloc_function_name");
        strcpy(result, buffer);
 
        alloc = MEM_callocN(sizeof(AllocDefRNA), "AllocDefRNA");
@@ -421,7 +421,7 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
 
        switch (parm->type) {
                case PROP_POINTER:  {
-                       PointerPropertyRNA *pparm = (PointerPropertyRNA*)parm;
+                       PointerPropertyRNA *pparm = (PointerPropertyRNA *)parm;
 
                        if (parm->flag & PROP_RNAPTR)
                                return "PointerRNA";
@@ -438,11 +438,11 @@ static const char *rna_parameter_type_name(PropertyRNA *parm)
 
 static int rna_enum_bitmask(PropertyRNA *prop)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
        int a, mask = 0;
 
        if (eprop->item) {
-               for (a = 0; a<eprop->totitem; a++)
+               for (a = 0; a < eprop->totitem; a++)
                        if (eprop->item[a].identifier[0])
                                mask |= eprop->item[a].value;
        }
@@ -459,7 +459,7 @@ static int rna_color_quantize(PropertyRNA *prop, PropertyDefRNA *dp)
 
 static const char *rna_function_string(void *func)
 {
-       return (func)? (const char*)func: "NULL";
+       return (func) ? (const char *)func : "NULL";
 }
 
 static void rna_float_print(FILE *f, float num)
@@ -524,7 +524,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
 
        switch (prop->type) {
                case PROP_STRING: {
-                       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+                       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, char *value)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
@@ -533,10 +533,10 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                        else {
                                const PropertySubType subtype = prop->subtype;
                                const char *string_copy_func = (subtype == PROP_FILEPATH ||
-                                                              subtype == PROP_DIRPATH  ||
-                                                              subtype == PROP_FILENAME ||
-                                                              subtype == PROP_BYTESTRING) ?
-                                           "BLI_strncpy" : "BLI_strncpy_utf8";
+                                                               subtype == PROP_DIRPATH  ||
+                                                               subtype == PROP_FILENAME ||
+                                                               subtype == PROP_BYTESTRING) ?
+                                                              "BLI_strncpy" : "BLI_strncpy_utf8";
 
                                rna_print_data_get(f, dp);
 
@@ -563,20 +563,20 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                fprintf(f, "    return %s(ptr);\n", manualfunc);
                        }
                        else {
-                               PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+                               PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                                rna_print_data_get(f, dp);
                                if (dp->dnapointerlevel == 0)
                                        fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, &data->%s);\n",
-                                               (const char*)pprop->type, dp->dnaname);
+                                               (const char *)pprop->type, dp->dnaname);
                                else
                                        fprintf(f, "    return rna_pointer_inherit_refine(ptr, &RNA_%s, data->%s);\n",
-                                               (const char*)pprop->type, dp->dnaname);
+                                               (const char *)pprop->type, dp->dnaname);
                        }
                        fprintf(f, "}\n\n");
                        break;
                }
                case PROP_COLLECTION: {
-                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                        fprintf(f, "static PointerRNA %s(CollectionPropertyIterator *iter)\n", func);
                        fprintf(f, "{\n");
@@ -586,7 +586,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                    strcmp(manualfunc, "rna_iterator_array_dereference_get") == 0)
                                {
                                        fprintf(f, "    return rna_pointer_inherit_refine(&iter->parent, &RNA_%s, %s(iter));\n",
-                                               (cprop->item_type) ? (const char *)cprop->item_type: "UnknownType", manualfunc);
+                                               (cprop->item_type) ? (const char *)cprop->item_type : "UnknownType", manualfunc);
                                }
                                else {
                                        fprintf(f, "    return %s(iter);\n", manualfunc);
@@ -626,16 +626,16 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                        if (dp->dnaarraylength == 1) {
                                                if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
                                                        fprintf(f, "            values[i]= %s((data->%s & (%d<<i)) != 0);\n",
-                                                               (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
+                                                               (dp->booleannegative) ? "!" : "", dp->dnaname, dp->booleanbit);
                                                }
                                                else {
                                                        fprintf(f, "            values[i]= (%s)%s((&data->%s)[i]);\n",
-                                                               rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
+                                                               rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname);
                                                }
                                        }
                                        else {
                                                if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
-                                                       fprintf(f, "            values[i]= %s((data->%s[i] & ", (dp->booleannegative)? "!": "",
+                                                       fprintf(f, "            values[i]= %s((data->%s[i] & ", (dp->booleannegative) ? "!" : "",
                                                                dp->dnaname);
                                                        rna_int_print(f, dp->booleanbit);
                                                        fprintf(f, ") != 0);\n");
@@ -646,11 +646,11 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                                }
                                                else if (dp->dnatype) {
                                                        fprintf(f, "            values[i]= (%s)%s(((%s*)data->%s)[i]);\n",
-                                                               rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnatype, dp->dnaname);
+                                                               rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnatype, dp->dnaname);
                                                }
                                                else {
                                                        fprintf(f, "            values[i]= (%s)%s((data->%s)[i]);\n",
-                                                               rna_type_type(prop), (dp->booleannegative)? "!": "", dp->dnaname);
+                                                               rna_type_type(prop), (dp->booleannegative) ? "!" : "", dp->dnaname);
                                                }
                                        }
                                        fprintf(f, "    }\n");
@@ -667,7 +667,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                else {
                                        rna_print_data_get(f, dp);
                                        if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
-                                               fprintf(f, "    return %s(((data->%s) & ", (dp->booleannegative)? "!": "", dp->dnaname);
+                                               fprintf(f, "    return %s(((data->%s) & ", (dp->booleannegative) ? "!" : "", dp->dnaname);
                                                rna_int_print(f, dp->booleanbit);
                                                fprintf(f, ") != 0);\n");
                                        }
@@ -678,7 +678,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                        }
                                        else
                                                fprintf(f, "    return (%s)%s(data->%s);\n", rna_type_type(prop),
-                                                       (dp->booleannegative)? "!": "", dp->dnaname);
+                                                       (dp->booleannegative) ? "!" : "", dp->dnaname);
                                }
 
                                fprintf(f, "}\n\n");
@@ -693,7 +693,7 @@ static char *rna_def_property_get_func(FILE *f, StructRNA *srna, PropertyRNA *pr
 static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
 {
        if (prop->type == PROP_FLOAT) {
-               FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+               FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
                if (fprop->range) {
                        fprintf(f,
                                "       float prop_clamp_min = -FLT_MAX, prop_clamp_max = FLT_MAX, prop_soft_min, prop_soft_max;\n");
@@ -702,7 +702,7 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
                }
        }
        else if (prop->type == PROP_INT) {
-               IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+               IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
                if (iprop->range) {
                        fprintf(f, "    int prop_clamp_min = INT_MIN, prop_clamp_max = INT_MAX, prop_soft_min, prop_soft_max;\n");
                        fprintf(f, "    %s(ptr, &prop_clamp_min, &prop_clamp_max, &prop_soft_min, &prop_soft_max);\n",
@@ -714,7 +714,7 @@ static void rna_clamp_value_range(FILE *f, PropertyRNA *prop)
 static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
 {
        if (prop->type == PROP_INT) {
-               IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+               IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                if (iprop->hardmin != INT_MIN || iprop->hardmax != INT_MAX) {
                        if (array) fprintf(f, "CLAMPIS(values[i], ");
@@ -730,7 +730,7 @@ static void rna_clamp_value(FILE *f, PropertyRNA *prop, int array)
                }
        }
        else if (prop->type == PROP_FLOAT) {
-               FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+               FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                if (fprop->hardmin != -FLT_MAX || fprop->hardmax != FLT_MAX) {
                        if (array) fprintf(f, "CLAMPIS(values[i], ");
@@ -777,7 +777,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
 
        switch (prop->type) {
                case PROP_STRING: {
-                       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+                       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
                        fprintf(f, "void %s(PointerRNA *ptr, const char *value)\n", func);
                        fprintf(f, "{\n");
                        if (manualfunc) {
@@ -786,10 +786,10 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                        else {
                                const PropertySubType subtype = prop->subtype;
                                const char *string_copy_func = (subtype == PROP_FILEPATH ||
-                                                              subtype == PROP_DIRPATH  ||
-                                                              subtype == PROP_FILENAME ||
-                                                              subtype == PROP_BYTESTRING) ?
-                                           "BLI_strncpy" : "BLI_strncpy_utf8";
+                                                               subtype == PROP_DIRPATH  ||
+                                                               subtype == PROP_FILENAME ||
+                                                               subtype == PROP_BYTESTRING) ?
+                                                              "BLI_strncpy" : "BLI_strncpy_utf8";
 
                                rna_print_data_get(f, dp);
 
@@ -829,8 +829,8 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                        fprintf(f, "            id_us_plus((ID*)value.data);\n\n");
                                }
                                else {
-                                       PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
-                                       StructRNA *type = rna_find_struct((const char*)pprop->type);
+                                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
+                                       StructRNA *type = rna_find_struct((const char *)pprop->type);
                                        if (type && (type->flag & STRUCT_ID)) {
                                                fprintf(f, "    if (value.data)\n");
                                                fprintf(f, "            id_lib_extern((ID*)value.data);\n\n");
@@ -876,7 +876,7 @@ static char *rna_def_property_set_func(FILE *f, StructRNA *srna, PropertyRNA *pr
                                        if (dp->dnaarraylength == 1) {
                                                if (prop->type == PROP_BOOLEAN && dp->booleanbit) {
                                                        fprintf(f, "            if (%svalues[i]) data->%s |= (%d<<i);\n",
-                                                               (dp->booleannegative)? "!": "", dp->dnaname, dp->booleanbit);
+                                                               (dp->booleannegative) ? "!" : "", dp->dnaname, dp->booleanbit);
                                                        fprintf(f, "            else data->%s &= ~(%d<<i);\n", dp->dnaname, dp->booleanbit);
                                                }
                                                else {
@@ -983,7 +983,7 @@ static char *rna_def_property_length_func(FILE *f, StructRNA *srna, PropertyRNA
        }
        else if (prop->type == PROP_COLLECTION) {
                if (!manualfunc) {
-                       if (prop->type == PROP_COLLECTION && (!(dp->dnalengthname || dp->dnalengthfixed)|| !dp->dnaname)) {
+                       if (prop->type == PROP_COLLECTION && (!(dp->dnalengthname || dp->dnalengthfixed) || !dp->dnaname)) {
                                fprintf(stderr, "%s: %s.%s has no valid dna info.\n",
                                        __func__, srna->identifier, prop->identifier);
                                DefRNA.error = 1;
@@ -1088,8 +1088,8 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
                        return NULL;
 
                /* only supported in case of standard next functions */
-               if (strcmp(nextfunc, "rna_iterator_array_next") == 0);
-               else if (strcmp(nextfunc, "rna_iterator_listbase_next") == 0);
+               if (strcmp(nextfunc, "rna_iterator_array_next") == 0) ;
+               else if (strcmp(nextfunc, "rna_iterator_listbase_next") == 0) ;
                else return NULL;
        }
 
@@ -1153,7 +1153,7 @@ static char *rna_def_property_lookup_int_func(FILE *f, StructRNA *srna, Property
 
 #if 0
        rna_print_data_get(f, dp);
-       item_type = (cprop->item_type)? (const char*)cprop->item_type: "UnknownType";
+       item_type = (cprop->item_type) ? (const char *)cprop->item_type : "UnknownType";
 
        if (dp->dnalengthname || dp->dnalengthfixed) {
                if (dp->dnalengthname)
@@ -1267,79 +1267,79 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
 
        switch (prop->type) {
                case PROP_BOOLEAN: {
-                       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+                       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                                if (!bprop->get && !bprop->set && !dp->booleanbit)
                                        rna_set_raw_property(dp, prop);
 
-                               bprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->get);
-                               bprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->set);
+                               bprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)bprop->get);
+                               bprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)bprop->set);
                        }
                        else {
-                               bprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)bprop->getarray);
-                               bprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)bprop->setarray);
+                               bprop->getarray = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)bprop->getarray);
+                               bprop->setarray = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)bprop->setarray);
                        }
                        break;
                }
                case PROP_INT: {
-                       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+                       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                                if (!iprop->get && !iprop->set)
                                        rna_set_raw_property(dp, prop);
 
-                               iprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->get);
-                               iprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->set);
+                               iprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)iprop->get);
+                               iprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)iprop->set);
                        }
                        else {
                                if (!iprop->getarray && !iprop->setarray)
                                        rna_set_raw_property(dp, prop);
 
-                               iprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)iprop->getarray);
-                               iprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)iprop->setarray);
+                               iprop->getarray = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)iprop->getarray);
+                               iprop->setarray = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)iprop->setarray);
                        }
                        break;
                }
                case PROP_FLOAT: {
-                       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+                       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
                        if (!prop->arraydimension) {
                                if (!fprop->get && !fprop->set)
                                        rna_set_raw_property(dp, prop);
 
-                               fprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->get);
-                               fprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->set);
+                               fprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)fprop->get);
+                               fprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)fprop->set);
                        }
                        else {
                                if (!fprop->getarray && !fprop->setarray)
                                        rna_set_raw_property(dp, prop);
 
-                               fprop->getarray = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)fprop->getarray);
-                               fprop->setarray = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)fprop->setarray);
+                               fprop->getarray = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)fprop->getarray);
+                               fprop->setarray = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)fprop->setarray);
                        }
                        break;
                }
                case PROP_ENUM: {
-                       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+                       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);
+                       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: {
-                       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+                       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
-                       sprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)sprop->get);
-                       sprop->length = (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)sprop->length);
-                       sprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)sprop->set);
+                       sprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)sprop->get);
+                       sprop->length = (void *)rna_def_property_length_func(f, srna, prop, dp, (const char *)sprop->length);
+                       sprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)sprop->set);
                        break;
                }
                case PROP_POINTER: {
-                       PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
-                       pprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)pprop->get);
-                       pprop->set = (void*)rna_def_property_set_func(f, srna, prop, dp, (const char*)pprop->set);
+                       pprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)pprop->get);
+                       pprop->set = (void *)rna_def_property_set_func(f, srna, prop, dp, (const char *)pprop->set);
                        if (!pprop->type) {
                                fprintf(stderr, "%s: %s.%s, pointer must have a struct type.\n",
                                        __func__, srna->identifier, prop->identifier);
@@ -1348,28 +1348,28 @@ static void rna_def_property_funcs(FILE *f, StructRNA *srna, PropertyDefRNA *dp)
                        break;
                }
                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;
 
-                       if (dp->dnatype && strcmp(dp->dnatype, "ListBase") == 0);
+                       if (dp->dnatype && strcmp(dp->dnatype, "ListBase") == 0) ;
                        else if (dp->dnalengthname || dp->dnalengthfixed)
-                               cprop->length = (void*)rna_def_property_length_func(f, srna, prop, dp, (const char*)cprop->length);
+                               cprop->length = (void *)rna_def_property_length_func(f, srna, prop, dp, (const char *)cprop->length);
 
                        /* test if we can allow raw array access, if it is using our standard
                         * array get/next function, we can be sure it is an actual array */
                        if (cprop->next && cprop->get)
-                               if (strcmp((const char*)cprop->next, "rna_iterator_array_next") == 0 &&
-                                   strcmp((const char*)cprop->get, "rna_iterator_array_get") == 0)
+                               if (strcmp((const char *)cprop->next, "rna_iterator_array_next") == 0 &&
+                                   strcmp((const char *)cprop->get, "rna_iterator_array_get") == 0)
                                {
                                        prop->flag |= PROP_RAW_ARRAY;
                                }
 
-                       cprop->get = (void*)rna_def_property_get_func(f, srna, prop, dp, (const char*)cprop->get);
-                       cprop->begin = (void*)rna_def_property_begin_func(f, srna, prop, dp, (const char*)cprop->begin);
-                       cprop->next = (void*)rna_def_property_next_func(f, srna, prop, dp, (const char*)cprop->next);
-                       cprop->end = (void*)rna_def_property_end_func(f, srna, prop, dp, (const char*)cprop->end);
-                       cprop->lookupint = (void*)rna_def_property_lookup_int_func(f, srna, prop, dp,
-                                                                                  (const char*)cprop->lookupint, nextfunc);
+                       cprop->get = (void *)rna_def_property_get_func(f, srna, prop, dp, (const char *)cprop->get);
+                       cprop->begin = (void *)rna_def_property_begin_func(f, srna, prop, dp, (const char *)cprop->begin);
+                       cprop->next = (void *)rna_def_property_next_func(f, srna, prop, dp, (const char *)cprop->next);
+                       cprop->end = (void *)rna_def_property_end_func(f, srna, prop, dp, (const char *)cprop->end);
+                       cprop->lookupint = (void *)rna_def_property_lookup_int_func(f, srna, prop, dp,
+                                                                                   (const char *)cprop->lookupint, nextfunc);
 
                        if (!(prop->flag & PROP_IDPROPERTY)) {
                                if (!cprop->begin) {
@@ -1405,7 +1405,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
 
        prop = dp->prop;
 
-       if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+       if (prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN))
                return;
 
        func = rna_alloc_function_name(srna->identifier, rna_safe_id(prop->identifier), "");
@@ -1443,13 +1443,13 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
                        break;
                }
                case PROP_ENUM: {
-                       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+                       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
                        if (eprop->item) {
                                fprintf(f, "enum {\n");
 
-                               for (i = 0; i<eprop->totitem; i++)
+                               for (i = 0; i < eprop->totitem; i++)
                                        if (eprop->item[i].identifier[0])
                                                fprintf(f, "\t%s_%s_%s = %d,\n", srna->identifier, prop->identifier,
                                                        eprop->item[i].identifier, eprop->item[i].value);
@@ -1463,7 +1463,7 @@ static void rna_def_property_funcs_header(FILE *f, StructRNA *srna, PropertyDefR
                        break;
                }
                case PROP_STRING: {
-                       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+                       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
                        if (sprop->maxlength) {
                                fprintf(f, "#define %s_%s_MAX %d\n\n", srna->identifier, prop->identifier, sprop->maxlength);
@@ -1500,7 +1500,7 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
 
        prop = dp->prop;
 
-       if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+       if (prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN))
                return;
        
        if (prop->name && prop->description && prop->description[0] != '\0')
@@ -1533,13 +1533,13 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                        break;
                }
                case PROP_ENUM: {
-                       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+                       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
                        int i;
 
                        if (eprop->item) {
                                fprintf(f, "\tenum %s_enum {\n", rna_safe_id(prop->identifier));
 
-                               for (i = 0; i<eprop->totitem; i++)
+                               for (i = 0; i < eprop->totitem; i++)
                                        if (eprop->item[i].identifier[0])
                                                fprintf(f, "\t\t%s_%s = %d,\n", rna_safe_id(prop->identifier), eprop->item[i].identifier,
                                                        eprop->item[i].value);
@@ -1555,19 +1555,19 @@ static void rna_def_property_funcs_header_cpp(FILE *f, StructRNA *srna, Property
                        break;
                }
                case PROP_POINTER: {
-                       PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
+                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
-                               fprintf(f, "\tinline %s %s(void);", (const char*)pprop->type, rna_safe_id(prop->identifier));
+                               fprintf(f, "\tinline %s %s(void);", (const char *)pprop->type, rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tinline %s %s(void);", "UnknownType", rna_safe_id(prop->identifier));
                        break;
                }
                case PROP_COLLECTION: {
-                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)dp->prop;
+                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
                        if (cprop->item_type)
-                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->item_type, srna->identifier,
+                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char *)cprop->item_type, srna->identifier,
                                        rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier,
@@ -1585,7 +1585,7 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
 
        prop = dp->prop;
 
-       if (prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN))
+       if (prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN))
                return;
 
        switch (prop->type) {
@@ -1624,10 +1624,10 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                        break;
                }
                case PROP_POINTER: {
-                       PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
+                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
 
                        if (pprop->type)
-                               fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (const char*)pprop->type, srna->identifier,
+                               fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", (const char *)pprop->type, srna->identifier,
                                        rna_safe_id(prop->identifier));
                        else
                                fprintf(f, "\tPOINTER_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier,
@@ -1636,10 +1636,10 @@ static void rna_def_property_funcs_impl_cpp(FILE *f, StructRNA *srna, PropertyDe
                }
                case PROP_COLLECTION: {
 #if 0
-                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)dp->prop;
+                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
                        if (cprop->type)
-                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char*)cprop->type, srna->identifier,
+                               fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", (const char *)cprop->type, srna->identifier,
                                        prop->identifier);
                        else
                                fprintf(f, "\tCOLLECTION_PROPERTY(%s, %s, %s)", "UnknownType", srna->identifier, prop->identifier);
@@ -1869,23 +1869,23 @@ static void rna_auto_types(void)
 
                        if (dp->dnatype) {
                                if (dp->prop->type == PROP_POINTER) {
-                                       PointerPropertyRNA *pprop = (PointerPropertyRNA*)dp->prop;
+                                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)dp->prop;
                                        StructRNA *type;
 
                                        if (!pprop->type && !pprop->get)
-                                               pprop->type = (StructRNA*)rna_find_type(dp->dnatype);
+                                               pprop->type = (StructRNA *)rna_find_type(dp->dnatype);
 
                                        if (pprop->type) {
-                                               type = rna_find_struct((const char*)pprop->type);
+                                               type = rna_find_struct((const char *)pprop->type);
                                                if (type && (type->flag & STRUCT_ID_REFCOUNT))
                                                        pprop->property.flag |= PROP_ID_REFCOUNT;
                                        }
                                }
                                else if (dp->prop->type == PROP_COLLECTION) {
-                                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)dp->prop;
+                                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)dp->prop;
 
                                        if (!cprop->item_type && !cprop->get && strcmp(dp->dnatype, "ListBase") == 0)
-                                               cprop->item_type = (StructRNA*)rna_find_type(dp->dnatype);
+                                               cprop->item_type = (StructRNA *)rna_find_type(dp->dnatype);
                                }
                        }
                }
@@ -1965,16 +1965,16 @@ static const char *rna_property_subtypename(PropertySubType type)
 static const char *rna_property_subtype_unit(PropertySubType type)
 {
        switch (RNA_SUBTYPE_UNIT(type)) {
-               case PROP_UNIT_NONE:            return "PROP_UNIT_NONE";
-               case PROP_UNIT_LENGTH:          return "PROP_UNIT_LENGTH";
-               case PROP_UNIT_AREA:            return "PROP_UNIT_AREA";
-               case PROP_UNIT_VOLUME:          return "PROP_UNIT_VOLUME";
-               case PROP_UNIT_MASS:            return "PROP_UNIT_MASS";
-               case PROP_UNIT_ROTATION:        return "PROP_UNIT_ROTATION";
-               case PROP_UNIT_TIME:            return "PROP_UNIT_TIME";
-               case PROP_UNIT_VELOCITY:        return "PROP_UNIT_VELOCITY";
-               case PROP_UNIT_ACCELERATION:return "PROP_UNIT_ACCELERATION";
-               default:                                        return "PROP_UNIT_UNKNOWN";
+               case PROP_UNIT_NONE:         return "PROP_UNIT_NONE";
+               case PROP_UNIT_LENGTH:       return "PROP_UNIT_LENGTH";
+               case PROP_UNIT_AREA:         return "PROP_UNIT_AREA";
+               case PROP_UNIT_VOLUME:       return "PROP_UNIT_VOLUME";
+               case PROP_UNIT_MASS:         return "PROP_UNIT_MASS";
+               case PROP_UNIT_ROTATION:     return "PROP_UNIT_ROTATION";
+               case PROP_UNIT_TIME:         return "PROP_UNIT_TIME";
+               case PROP_UNIT_VELOCITY:     return "PROP_UNIT_VELOCITY";
+               case PROP_UNIT_ACCELERATION: return "PROP_UNIT_ACCELERATION";
+               default:                     return "PROP_UNIT_UNKNOWN";
        }
 }
 
@@ -2022,7 +2022,7 @@ static void rna_generate_property_prototypes(BlenderRNA *brna, StructRNA *srna,
                fprintf(f, "\n");
 
        for (prop = srna->cont.properties.first; prop; prop = prop->next)
-               fprintf(f, "%s%s rna_%s_%s;\n", (prop->flag & PROP_EXPORT)? "": "", rna_property_structname(prop->type),
+               fprintf(f, "%s%s rna_%s_%s;\n", (prop->flag & PROP_EXPORT) ? "" : "", rna_property_structname(prop->type),
                        srna->identifier, prop->identifier);
        fprintf(f, "\n");
 }
@@ -2082,7 +2082,7 @@ static void rna_generate_static_parameter_prototypes(BlenderRNA *brna, StructRNA
        for (dparm = dfunc->cont.properties.first; dparm; dparm = dparm->next) {
                if (dparm->prop == func->c_ret) {
                        if (dparm->prop->arraydimension)
-                               fprintf(f, "XXX no array return types yet"); /* XXX not supported */
+                               fprintf(f, "XXX no array return types yet");  /* XXX not supported */
                        else if (dparm->prop->type == PROP_POINTER && !(dparm->prop->flag & PROP_RNAPTR))
                                fprintf(f, "%s%s *", rna_type_struct(dparm->prop), rna_parameter_type_name(dparm->prop));
                        else
@@ -2199,8 +2199,8 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        if (nest != NULL) {
                len = strlen(nest);
 
-               strnest = MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> strnest");
-               errnest = MEM_mallocN(sizeof(char)*(len+2), "rna_generate_property -> errnest");
+               strnest = MEM_mallocN(sizeof(char) * (len + 2), "rna_generate_property -> strnest");
+               errnest = MEM_mallocN(sizeof(char) * (len + 2), "rna_generate_property -> errnest");
 
                strcpy(strnest, "_"); strcat(strnest, nest);
                strcpy(errnest, "."); strcat(errnest, nest);
@@ -2209,127 +2209,127 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        }
 
        switch (prop->type) {
-                       case PROP_ENUM: {
-                               EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
-                               int i, defaultfound = 0, totflag = 0;
-
-                               if (eprop->item) {
-                                       fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier,
-                                               strnest, prop->identifier, eprop->totitem+1);
-
-                                       for (i = 0; i<eprop->totitem; i++) {
-                                               fprintf(f, "{%d, ", eprop->item[i].value);
-                                               rna_print_c_string(f, eprop->item[i].identifier); fprintf(f, ", ");
-                                               fprintf(f, "%d, ", eprop->item[i].icon);
-                                               rna_print_c_string(f, eprop->item[i].name); fprintf(f, ", ");
-                                               rna_print_c_string(f, eprop->item[i].description); fprintf(f, "},\n\t");
-
-                                               if (eprop->item[i].identifier[0]) {
-                                                       if (prop->flag & PROP_ENUM_FLAG) {
-                                                               totflag |= eprop->item[i].value;
-                                                       }
-                                                       else {
-                                                               if (eprop->defaultvalue == eprop->item[i].value) {
-                                                                       defaultfound = 1;
-                                                               }
+               case PROP_ENUM: {
+                       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
+                       int i, defaultfound = 0, totflag = 0;
+
+                       if (eprop->item) {
+                               fprintf(f, "static EnumPropertyItem rna_%s%s_%s_items[%d] = {\n\t", srna->identifier,
+                                       strnest, prop->identifier, eprop->totitem + 1);
+
+                               for (i = 0; i < eprop->totitem; i++) {
+                                       fprintf(f, "{%d, ", eprop->item[i].value);
+                                       rna_print_c_string(f, eprop->item[i].identifier); fprintf(f, ", ");
+                                       fprintf(f, "%d, ", eprop->item[i].icon);
+                                       rna_print_c_string(f, eprop->item[i].name); fprintf(f, ", ");
+                                       rna_print_c_string(f, eprop->item[i].description); fprintf(f, "},\n\t");
+
+                                       if (eprop->item[i].identifier[0]) {
+                                               if (prop->flag & PROP_ENUM_FLAG) {
+                                                       totflag |= eprop->item[i].value;
+                                               }
+                                               else {
+                                                       if (eprop->defaultvalue == eprop->item[i].value) {
+                                                               defaultfound = 1;
                                                        }
                                                }
                                        }
+                               }
 
-                                       fprintf(f, "{0, NULL, 0, NULL, NULL}\n};\n\n");
+                               fprintf(f, "{0, NULL, 0, NULL, NULL}\n};\n\n");
 
-                                       if (prop->flag & PROP_ENUM_FLAG) {
-                                               if (eprop->defaultvalue & ~totflag) {
-                                                       fprintf(stderr, "%s: %s%s.%s, enum default includes unused bits (%d).\n",
-                                                               __func__, srna->identifier, errnest, prop->identifier,
-                                                               eprop->defaultvalue & ~totflag);
-                                                       DefRNA.error = 1;
-                                               }
-                                       }
-                                       else {
-                                               if (!defaultfound) {
-                                                       fprintf(stderr, "%s: %s%s.%s, enum default is not in items.\n",
-                                                               __func__, srna->identifier, errnest, prop->identifier);
-                                                       DefRNA.error = 1;
-                                               }
+                               if (prop->flag & PROP_ENUM_FLAG) {
+                                       if (eprop->defaultvalue & ~totflag) {
+                                               fprintf(stderr, "%s: %s%s.%s, enum default includes unused bits (%d).\n",
+                                                       __func__, srna->identifier, errnest, prop->identifier,
+                                                       eprop->defaultvalue & ~totflag);
+                                               DefRNA.error = 1;
                                        }
                                }
                                else {
-                                       fprintf(stderr, "%s: %s%s.%s, enum must have items defined.\n",
-                                               __func__, srna->identifier, errnest, prop->identifier);
-                                       DefRNA.error = 1;
+                                       if (!defaultfound) {
+                                               fprintf(stderr, "%s: %s%s.%s, enum default is not in items.\n",
+                                                       __func__, srna->identifier, errnest, prop->identifier);
+                                               DefRNA.error = 1;
+                                       }
                                }
-                               break;
                        }
-                       case PROP_BOOLEAN: {
-                               BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
-                               unsigned int i;
-
-                               if (prop->arraydimension && prop->totarraylength) {
-                                       fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
-                                               prop->identifier, prop->totarraylength);
-
-                                       for (i = 0; i<prop->totarraylength; i++) {
-                                               if (bprop->defaultarray)
-                                                       fprintf(f, "%d", bprop->defaultarray[i]);
-                                               else
-                                                       fprintf(f, "%d", bprop->defaultvalue);
-                                               if (i != prop->totarraylength-1)
-                                                       fprintf(f, ",\n\t");
-                                       }
+                       else {
+                               fprintf(stderr, "%s: %s%s.%s, enum must have items defined.\n",
+                                       __func__, srna->identifier, errnest, prop->identifier);
+                               DefRNA.error = 1;
+                       }
+                       break;
+               }
+               case PROP_BOOLEAN: {
+                       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
+                       unsigned int i;
 
-                                       fprintf(f, "\n};\n\n");
+                       if (prop->arraydimension && prop->totarraylength) {
+                               fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
+                                       prop->identifier, prop->totarraylength);
+
+                               for (i = 0; i < prop->totarraylength; i++) {
+                                       if (bprop->defaultarray)
+                                               fprintf(f, "%d", bprop->defaultarray[i]);
+                                       else
+                                               fprintf(f, "%d", bprop->defaultvalue);
+                                       if (i != prop->totarraylength - 1)
+                                               fprintf(f, ",\n\t");
                                }
-                               break;
+
+                               fprintf(f, "\n};\n\n");
                        }
-                       case PROP_INT: {
-                               IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
-                               unsigned int i;
-
-                               if (prop->arraydimension && prop->totarraylength) {
-                                       fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
-                                               prop->identifier, prop->totarraylength);
-
-                                       for (i = 0; i<prop->totarraylength; i++) {
-                                               if (iprop->defaultarray)
-                                                       fprintf(f, "%d", iprop->defaultarray[i]);
-                                               else
-                                                       fprintf(f, "%d", iprop->defaultvalue);
-                                               if (i != prop->totarraylength-1)
-                                                       fprintf(f, ",\n\t");
-                                       }
+                       break;
+               }
+               case PROP_INT: {
+                       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
+                       unsigned int i;
+
+                       if (prop->arraydimension && prop->totarraylength) {
+                               fprintf(f, "static int rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
+                                       prop->identifier, prop->totarraylength);
 
-                                       fprintf(f, "\n};\n\n");
+                               for (i = 0; i < prop->totarraylength; i++) {
+                                       if (iprop->defaultarray)
+                                               fprintf(f, "%d", iprop->defaultarray[i]);
+                                       else
+                                               fprintf(f, "%d", iprop->defaultvalue);
+                                       if (i != prop->totarraylength - 1)
+                                               fprintf(f, ",\n\t");
                                }
-                               break;
+
+                               fprintf(f, "\n};\n\n");
                        }
-                       case PROP_FLOAT: {
-                               FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
-                               unsigned int i;
-
-                               if (prop->arraydimension && prop->totarraylength) {
-                                       fprintf(f, "static float rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
-                                               prop->identifier, prop->totarraylength);
-
-                                       for (i = 0; i<prop->totarraylength; i++) {
-                                               if (fprop->defaultarray)
-                                                       rna_float_print(f, fprop->defaultarray[i]);
-                                               else
-                                                       rna_float_print(f, fprop->defaultvalue);
-                                               if (i != prop->totarraylength-1)
-                                                       fprintf(f, ",\n\t");
-                                       }
+                       break;
+               }
+               case PROP_FLOAT: {
+                       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
+                       unsigned int i;
+
+                       if (prop->arraydimension && prop->totarraylength) {
+                               fprintf(f, "static float rna_%s%s_%s_default[%u] = {\n\t", srna->identifier, strnest,
+                                       prop->identifier, prop->totarraylength);
 
-                                       fprintf(f, "\n};\n\n");
+                               for (i = 0; i < prop->totarraylength; i++) {
+                                       if (fprop->defaultarray)
+                                               rna_float_print(f, fprop->defaultarray[i]);
+                                       else
+                                               rna_float_print(f, fprop->defaultvalue);
+                                       if (i != prop->totarraylength - 1)
+                                               fprintf(f, ",\n\t");
                                }
-                               break;
+
+                               fprintf(f, "\n};\n\n");
                        }
-                       default:
-                               break;
+                       break;
+               }
+               default:
+                       break;
        }
 
        fprintf(f, "%s%s rna_%s%s_%s = {\n",
-               (prop->flag & PROP_EXPORT) ? "": "",
+               (prop->flag & PROP_EXPORT) ? "" : "",
                rna_property_structname(prop->type),
                srna->identifier, strnest, prop->identifier);
 
@@ -2355,7 +2355,7 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
                prop->arraylength[2],
                prop->totarraylength);
        fprintf(f, "\t%s%s, %d, %s, %s,\n",
-               (prop->flag & PROP_CONTEXT_UPDATE) ? "(UpdateFunc)": "",
+               (prop->flag & PROP_CONTEXT_UPDATE) ? "(UpdateFunc)" : "",
                rna_function_string(prop->update),
                prop->noteflag,
                rna_function_string(prop->editable),
@@ -2365,112 +2365,112 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr
        else fprintf(f, "\t0, -1");
 
        /* our own type - collections/arrays only */
-       if (prop->srna) fprintf(f, ", &RNA_%s", (const char*)prop->srna);
+       if (prop->srna) fprintf(f, ", &RNA_%s", (const char *)prop->srna);
        else fprintf(f, ", NULL");
 
        fprintf(f, "},\n");
 
        switch (prop->type) {
-                       case PROP_BOOLEAN: {
-                               BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %s, %d, ",
-                                       rna_function_string(bprop->get),
-                                       rna_function_string(bprop->set),
-                                       rna_function_string(bprop->getarray),
-                                       rna_function_string(bprop->setarray),
-                                       bprop->defaultvalue);
-                               if (prop->arraydimension && prop->totarraylength)
-                                       fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
-                               else fprintf(f, "NULL\n");
-                               break;
-                       }
-                       case PROP_INT: {
-                               IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %s, %s,\n\t",
-                                       rna_function_string(iprop->get),
-                                       rna_function_string(iprop->set),
-                                       rna_function_string(iprop->getarray),
-                                       rna_function_string(iprop->setarray),
-                                       rna_function_string(iprop->range));
-                               rna_int_print(f, iprop->softmin); fprintf(f, ", ");
-                               rna_int_print(f, iprop->softmax); fprintf(f, ", ");
-                               rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
-                               rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
-                               rna_int_print(f, iprop->step); fprintf(f, ", ");
-                               rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
-                               if (prop->arraydimension && prop->totarraylength)
-                                       fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
-                               else fprintf(f, "NULL\n");
-                               break;
-                       }
-                       case PROP_FLOAT: {
-                               FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %s, %s, ",
-                                       rna_function_string(fprop->get),
-                                       rna_function_string(fprop->set),
-                                       rna_function_string(fprop->getarray),
-                                       rna_function_string(fprop->setarray),
-                                       rna_function_string(fprop->range));
-                               rna_float_print(f, fprop->softmin); fprintf(f, ", ");
-                               rna_float_print(f, fprop->softmax); fprintf(f, ", ");
-                               rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
-                               rna_float_print(f, fprop->hardmax); fprintf(f, ", ");
-                               rna_float_print(f, fprop->step); fprintf(f, ", ");
-                               rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
-                               rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
-                               if (prop->arraydimension && prop->totarraylength)
-                                       fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
-                               else fprintf(f, "NULL\n");
-                               break;
-                       }
-                       case PROP_STRING: {
-                               StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %d, ",
-                                       rna_function_string(sprop->get),
-                                       rna_function_string(sprop->length),
-                                       rna_function_string(sprop->set),
-                                       sprop->maxlength);
-                               rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
-                               break;
-                       }
-                       case PROP_ENUM: {
-                               EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, NULL, ",
-                                       rna_function_string(eprop->get),
-                                       rna_function_string(eprop->set),
-                                       rna_function_string(eprop->itemf));
-                               if (eprop->item)
-                                       fprintf(f, "rna_%s%s_%s_items, ", srna->identifier, strnest, prop->identifier);
-                               else
-                                       fprintf(f, "NULL, ");
-                               fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
-                               break;
-                       }
-                       case PROP_POINTER: {
-                               PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get),
-                                       rna_function_string(pprop->set),
-                                       rna_function_string(pprop->typef),
-                                       rna_function_string(pprop->poll));
-                               if (pprop->type) fprintf(f, "&RNA_%s\n", (const char*)pprop->type);
-                               else fprintf(f, "NULL\n");
-                               break;
-                       }
-                       case PROP_COLLECTION: {
-                               CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
-                               fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ",
-                                       rna_function_string(cprop->begin),
-                                       rna_function_string(cprop->next),
-                                       rna_function_string(cprop->end),
-                                       rna_function_string(cprop->get),
-                                       rna_function_string(cprop->length),
-                                       rna_function_string(cprop->lookupint),
-                                       rna_function_string(cprop->lookupstring),
-                                       rna_function_string(cprop->assignint));
-                               if (cprop->item_type) fprintf(f, "&RNA_%s\n", (const char*)cprop->item_type);
-                               else fprintf(f, "NULL\n");
-                               break;
-                       }
+               case PROP_BOOLEAN: {
+                       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %s, %d, ",
+                               rna_function_string(bprop->get),
+                               rna_function_string(bprop->set),
+                               rna_function_string(bprop->getarray),
+                               rna_function_string(bprop->setarray),
+                               bprop->defaultvalue);
+                       if (prop->arraydimension && prop->totarraylength)
+                               fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+                       else fprintf(f, "NULL\n");
+                       break;
+               }
+               case PROP_INT: {
+                       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %s, %s,\n\t",
+                               rna_function_string(iprop->get),
+                               rna_function_string(iprop->set),
+                               rna_function_string(iprop->getarray),
+                               rna_function_string(iprop->setarray),
+                               rna_function_string(iprop->range));
+                       rna_int_print(f, iprop->softmin); fprintf(f, ", ");
+                       rna_int_print(f, iprop->softmax); fprintf(f, ", ");
+                       rna_int_print(f, iprop->hardmin); fprintf(f, ", ");
+                       rna_int_print(f, iprop->hardmax); fprintf(f, ", ");
+                       rna_int_print(f, iprop->step); fprintf(f, ", ");
+                       rna_int_print(f, iprop->defaultvalue); fprintf(f, ", ");
+                       if (prop->arraydimension && prop->totarraylength)
+                               fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+                       else fprintf(f, "NULL\n");
+                       break;
+               }
+               case PROP_FLOAT: {
+                       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %s, %s, ",
+                               rna_function_string(fprop->get),
+                               rna_function_string(fprop->set),
+                               rna_function_string(fprop->getarray),
+                               rna_function_string(fprop->setarray),
+                               rna_function_string(fprop->range));
+                       rna_float_print(f, fprop->softmin); fprintf(f, ", ");
+                       rna_float_print(f, fprop->softmax); fprintf(f, ", ");
+                       rna_float_print(f, fprop->hardmin); fprintf(f, ", ");
+                       rna_float_print(f, fprop->hardmax); fprintf(f, ", ");
+                       rna_float_print(f, fprop->step); fprintf(f, ", ");
+                       rna_int_print(f, (int)fprop->precision); fprintf(f, ", ");
+                       rna_float_print(f, fprop->defaultvalue); fprintf(f, ", ");
+                       if (prop->arraydimension && prop->totarraylength)
+                               fprintf(f, "rna_%s%s_%s_default\n", srna->identifier, strnest, prop->identifier);
+                       else fprintf(f, "NULL\n");
+                       break;
+               }
+               case PROP_STRING: {
+                       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %d, ",
+                               rna_function_string(sprop->get),
+                               rna_function_string(sprop->length),
+                               rna_function_string(sprop->set),
+                               sprop->maxlength);
+                       rna_print_c_string(f, sprop->defaultvalue); fprintf(f, "\n");
+                       break;
+               }
+               case PROP_ENUM: {
+                       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, NULL, ",
+                               rna_function_string(eprop->get),
+                               rna_function_string(eprop->set),
+                               rna_function_string(eprop->itemf));
+                       if (eprop->item)
+                               fprintf(f, "rna_%s%s_%s_items, ", srna->identifier, strnest, prop->identifier);
+                       else
+                               fprintf(f, "NULL, ");
+                       fprintf(f, "%d, %d\n", eprop->totitem, eprop->defaultvalue);
+                       break;
+               }
+               case PROP_POINTER: {
+                       PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %s,", rna_function_string(pprop->get),
+                               rna_function_string(pprop->set),
+                               rna_function_string(pprop->typef),
+                               rna_function_string(pprop->poll));
+                       if (pprop->type) fprintf(f, "&RNA_%s\n", (const char *)pprop->type);
+                       else fprintf(f, "NULL\n");
+                       break;
+               }
+               case PROP_COLLECTION: {
+                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
+                       fprintf(f, "\t%s, %s, %s, %s, %s, %s, %s, %s, ",
+                               rna_function_string(cprop->begin),
+                               rna_function_string(cprop->next),
+                               rna_function_string(cprop->end),
+                               rna_function_string(cprop->get),
+                               rna_function_string(cprop->length),
+                               rna_function_string(cprop->lookupint),
+                               rna_function_string(cprop->lookupstring),
+                               rna_function_string(cprop->assignint));
+                       if (cprop->item_type) fprintf(f, "&RNA_%s\n", (const char *)cprop->item_type);
+                       else fprintf(f, "NULL\n");
+                       break;
+               }
        }
 
        fprintf(f, "};\n\n");
@@ -2501,12 +2501,12 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
 
                if (func->cont.next)
                        fprintf(f, "\t{(FunctionRNA*)&rna_%s_%s_func, ", srna->identifier,
-                               ((FunctionRNA*)func->cont.next)->identifier);
+                               ((FunctionRNA *)func->cont.next)->identifier);
                else
                        fprintf(f, "\t{NULL, ");
                if (func->cont.prev)
                        fprintf(f, "(FunctionRNA*)&rna_%s_%s_func,\n", srna->identifier,
-                               ((FunctionRNA*)func->cont.prev)->identifier);
+                               ((FunctionRNA *)func->cont.prev)->identifier);
                else
                        fprintf(f, "NULL,\n");
 
@@ -2540,9 +2540,9 @@ static void rna_generate_struct(BlenderRNA *brna, StructRNA *srna, FILE *f)
 
        fprintf(f, "StructRNA RNA_%s = {\n", srna->identifier);
 
-       if (srna->cont.next) fprintf(f, "\t{(ContainerRNA *)&RNA_%s, ", ((StructRNA*)srna->cont.next)->identifier);
+       if (srna->cont.next) fprintf(f, "\t{(ContainerRNA *)&RNA_%s, ", ((StructRNA *)srna->cont.next)->identifier);
        else fprintf(f, "\t{NULL, ");
-       if (srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA*)srna->cont.prev)->identifier);
+       if (srna->cont.prev) fprintf(f, "(ContainerRNA *)&RNA_%s,\n", ((StructRNA *)srna->cont.prev)->identifier);
        else fprintf(f, "NULL,\n");
 
        fprintf(f, "\tNULL,\n");
@@ -2679,7 +2679,8 @@ static RNAProcessItem PROCESS_ITEMS[] = {
        {"rna_world.c", NULL, RNA_def_world},
        {"rna_movieclip.c", NULL, RNA_def_movieclip},
        {"rna_tracking.c", NULL, RNA_def_tracking},
-       {NULL, NULL}};
+       {NULL, NULL}
+};
 
 static void rna_generate(BlenderRNA *brna, FILE *f, const char *filename, const char *api_filename)
 {
@@ -2778,7 +2779,7 @@ static void rna_generate_header(BlenderRNA *brna, FILE *f)
        fprintf(f, "    { \\\n");
        fprintf(f, "            CollectionPropertyIterator rna_macro_iter; \\\n");
        fprintf(f, "            for (property##_begin(&rna_macro_iter, sptr); rna_macro_iter.valid; "
-                  "property##_next(&rna_macro_iter)) { \\\n");
+               "property##_next(&rna_macro_iter)) { \\\n");
        fprintf(f, "                    itemptr= rna_macro_iter.ptr;\n\n");
 
        fprintf(f, "#define FOREACH_END(property) \\\n");
@@ -2955,12 +2956,12 @@ static void rna_generate_header_cpp(BlenderRNA *brna, FILE *f)
 
                fprintf(f, "/**************** %s ****************/\n\n", srna->name);
 
-               fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base)? srna->base->identifier: "Pointer");
+               fprintf(f, "class %s : public %s {\n", srna->identifier, (srna->base) ? srna->base->identifier : "Pointer");
                fprintf(f, "public:\n");
                fprintf(f, "\t%s(const PointerRNA& ptr) :\n\t\t%s(ptr)", srna->identifier,
-                       (srna->base)? srna->base->identifier: "Pointer");
+                       (srna->base) ? srna->base->identifier : "Pointer");
                for (dp = ds->cont.properties.first; dp; dp = dp->next)
-                       if (!(dp->prop->flag & (PROP_IDPROPERTY|PROP_BUILTIN)))
+                       if (!(dp->prop->flag & (PROP_IDPROPERTY | PROP_BUILTIN)))
                                if (dp->prop->type == PROP_COLLECTION)
                                        fprintf(f, ",\n\t\t%s(ptr)", dp->prop->identifier);
                fprintf(f, "\n\t\t{}\n\n");
@@ -3046,7 +3047,7 @@ static int rna_preprocess(const char *outfile)
        for (i = 0; PROCESS_ITEMS[i].filename; i++) {
                strcpy(deffile, outfile);
                strcat(deffile, PROCESS_ITEMS[i].filename);
-               deffile[strlen(deffile)-2] = '\0';
+               deffile[strlen(deffile) - 2] = '\0';
                strcat(deffile, "_gen.c" TMP_EXT);
 
                if (status) {
@@ -3114,7 +3115,7 @@ int main(int argc, char **argv)
 {
        int totblock, return_status = 0;
 
-       if (argc<2) {
+       if (argc < 2) {
                fprintf(stderr, "Usage: %s outdirectory/\n", argv[0]);
                return_status = 1;
        }
index 74a55b97e1b232c27ae817eb5cf32cdfdf348c89..8832d92e42f889414beba0c735500a4d622f1169 100644 (file)
@@ -71,7 +71,8 @@ EnumPropertyItem id_type_items[] = {
        {ID_TE, "TEXTURE", ICON_TEXTURE_DATA, "Texture", ""},
        {ID_WO, "WORLD", ICON_WORLD_DATA, "World", ""},
        {ID_WM, "WINDOWMANAGER", ICON_FULLSCREEN, "Window Manager", ""},
-       {0, NULL, 0, NULL, NULL}};
+       {0, NULL, 0, NULL, NULL}
+};
 
 #ifdef RNA_RUNTIME
 
@@ -84,26 +85,26 @@ EnumPropertyItem id_type_items[] = {
 /* name functions that ignore the first two ID characters */
 void rna_ID_name_get(PointerRNA *ptr, char *value)
 {
-       ID *id = (ID*)ptr->data;
-       BLI_strncpy(value, id->name+2, sizeof(id->name)-2);
+       ID *id = (ID *)ptr->data;
+       BLI_strncpy(value, id->name + 2, sizeof(id->name) - 2);
 }
 
 int rna_ID_name_length(PointerRNA *ptr)
 {
-       ID *id = (ID*)ptr->data;
-       return strlen(id->name+2);
+       ID *id = (ID *)ptr->data;
+       return strlen(id->name + 2);
 }
 
 void rna_ID_name_set(PointerRNA *ptr, const char *value)
 {
-       ID *id = (ID*)ptr->data;
-       BLI_strncpy_utf8(id->name+2, value, sizeof(id->name)-2);
-       test_idbutton(id->name+2);
+       ID *id = (ID *)ptr->data;
+       BLI_strncpy_utf8(id->name + 2, value, sizeof(id->name) - 2);
+       test_idbutton(id->name + 2);
 }
 
 static int rna_ID_name_editable(PointerRNA *ptr)
 {
-       ID *id = (ID*)ptr->data;
+       ID *id = (ID *)ptr->data;
        
        if (GS(id->name) == ID_VF) {
                VFont *vf = (VFont *)id;
@@ -185,7 +186,7 @@ StructRNA *ID_code_to_RNA_type(short idcode)
 
 StructRNA *rna_ID_refine(PointerRNA *ptr)
 {
-       ID *id = (ID*)ptr->data;
+       ID *id = (ID *)ptr->data;
 
        return ID_code_to_RNA_type(GS(id->name));
 }
@@ -197,7 +198,7 @@ IDProperty *rna_ID_idprops(PointerRNA *ptr, int create)
 
 void rna_ID_fake_user_set(PointerRNA *ptr, int value)
 {
-       ID *id = (ID*)ptr->data;
+       ID *id = (ID *)ptr->data;
 
        if (value && !(id->flag & LIB_FAKEUSER)) {
                id->flag |= LIB_FAKEUSER;
@@ -238,14 +239,14 @@ StructRNA *rna_PropertyGroup_register(Main *UNUSED(bmain), ReportList *reports,
         * is running. */
        if (BLI_strnlen(identifier, MAX_IDPROP_NAME) == MAX_IDPROP_NAME) {
                BKE_reportf(reports, RPT_ERROR, "registering id property class: '%s' is too long, maximum length is "
-                                               STRINGIFY(MAX_IDPROP_NAME), identifier);
+                           STRINGIFY(MAX_IDPROP_NAME), identifier);
                return NULL;
        }
 
        return RNA_def_struct(&BLENDER_RNA, identifier, "PropertyGroup");  /* XXX */
 }
 
-StructRNArna_PropertyGroup_refine(PointerRNA *ptr)
+StructRNA *rna_PropertyGroup_refine(PointerRNA *ptr)
 {
        return ptr->type;
 }
@@ -279,24 +280,24 @@ static void rna_ID_update_tag(ID *id, ReportList *reports, int flag)
        else {
                /* ensure flag us correct for the type */
                switch (GS(id->name)) {
-               case ID_OB:
-                       if (flag & ~(OB_RECALC_ALL)) {
-                               BKE_report(reports, RPT_ERROR, "'refresh' incompatible with Object ID type");
-                               return;
-                       }
-                       break;
-               /* Could add particle updates later */
+                       case ID_OB:
+                               if (flag & ~(OB_RECALC_ALL)) {
+                                       BKE_report(reports, RPT_ERROR, "'refresh' incompatible with Object ID type");
+                                       return;
+                               }
+                               break;
+                               /* Could add particle updates later */
 #if 0
-               case ID_PA:
-                       if (flag & ~(OB_RECALC_ALL|PSYS_RECALC)) {
-                               BKE_report(reports, RPT_ERROR, "'refresh' incompatible with ParticleSettings ID type");
-                               return;
-                       }
-                       break;
+                       case ID_PA:
+                               if (flag & ~(OB_RECALC_ALL | PSYS_RECALC)) {
+                                       BKE_report(reports, RPT_ERROR, "'refresh' incompatible with ParticleSettings ID type");
+                                       return;
+                               }
+                               break;
 #endif
-               default:
-                       BKE_report(reports, RPT_ERROR, "This ID type is not compatible with any 'refresh' options");
-                       return;
+                       default:
+                               BKE_report(reports, RPT_ERROR, "This ID type is not compatible with any 'refresh' options");
+                               return;
                }
        }
 
@@ -337,7 +338,7 @@ int rna_IDMaterials_assign_int(PointerRNA *ptr, int key, const PointerRNA *assig
 
 void rna_Library_filepath_set(PointerRNA *ptr, const char *value)
 {
-       Library *lib = (Library*)ptr->data;
+       Library *lib = (Library *)ptr->data;
        BKE_library_filepath_set(lib, value);
 }
 
@@ -356,52 +357,52 @@ static void rna_def_ID_properties(BlenderRNA *brna)
        
        /* IDP_STRING */
        prop = RNA_def_property(srna, "string", PROP_STRING, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
 
        /* IDP_INT */
        prop = RNA_def_property(srna, "int", PROP_INT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
 
        prop = RNA_def_property(srna, "int_array", PROP_INT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_array(prop, 1);
 
        /* IDP_FLOAT */
        prop = RNA_def_property(srna, "float", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
 
        prop = RNA_def_property(srna, "float_array", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_array(prop, 1);
 
        /* IDP_DOUBLE */
        prop = RNA_def_property(srna, "double", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
 
        prop = RNA_def_property(srna, "double_array", PROP_FLOAT, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_array(prop, 1);
 
        /* IDP_GROUP */
        prop = RNA_def_property(srna, "group", PROP_POINTER, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_struct_type(prop, "PropertyGroup");
 
        prop = RNA_def_property(srna, "collection", PROP_COLLECTION, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_struct_type(prop, "PropertyGroup");
 
        prop = RNA_def_property(srna, "idp_array", PROP_COLLECTION, PROP_NONE);
        RNA_def_property_struct_type(prop, "PropertyGroup");
        RNA_def_property_collection_funcs(prop, "rna_IDPArray_begin", "rna_iterator_array_next", "rna_iterator_array_end",
                                          "rna_iterator_array_get", "rna_IDPArray_length", NULL, NULL, NULL);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
 
        /* never tested, maybe its useful to have this? */
 #if 0
        prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
        RNA_def_struct_name_property(srna, prop);
@@ -423,7 +424,7 @@ static void rna_def_ID_properties(BlenderRNA *brna)
         * however this isn't prefect because it overrides how python would set the name
         * when we only really want this so RNA_def_struct_name_property() is set to something useful */
        prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
-       RNA_def_property_flag(prop, PROP_EXPORT|PROP_IDPROPERTY);
+       RNA_def_property_flag(prop, PROP_EXPORT | PROP_IDPROPERTY);
        /*RNA_def_property_clear_flag(prop, PROP_EDITABLE); */
        RNA_def_property_ui_text(prop, "Name", "Unique name used in the code and scripting");
        RNA_def_struct_name_property(srna, prop);
@@ -465,22 +466,23 @@ static void rna_def_ID(BlenderRNA *brna)
                {OB_RECALC_OB, "OBJECT", 0, "Object", ""},
                {OB_RECALC_DATA, "DATA", 0, "Data", ""},
                {OB_RECALC_TIME, "TIME", 0, "Time", ""},
-               {0, NULL, 0, NULL, NULL}};
+               {0, NULL, 0, NULL, NULL}
+       };
 
        srna = RNA_def_struct(brna, "ID", NULL);
        RNA_def_struct_ui_text(srna, "ID",
                               "Base type for datablocks, defining a unique name, linking from other libraries "
                               "and garbage collection");
-       RNA_def_struct_flag(srna, STRUCT_ID|STRUCT_ID_REFCOUNT);
+       RNA_def_struct_flag(srna, STRUCT_ID | STRUCT_ID_REFCOUNT);
        RNA_def_struct_refine_func(srna, "rna_ID_refine");
        RNA_def_struct_idprops_func(srna, "rna_ID_idprops");
 
        prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
        RNA_def_property_ui_text(prop, "Name", "Unique datablock ID name");
        RNA_def_property_string_funcs(prop, "rna_ID_name_get", "rna_ID_name_length", "rna_ID_name_set");
-       RNA_def_property_string_maxlength(prop, MAX_ID_NAME-2);
+       RNA_def_property_string_maxlength(prop, MAX_ID_NAME - 2);
        RNA_def_property_editable_func(prop, "rna_ID_name_editable");
-       RNA_def_property_update(prop, NC_ID|NA_RENAME, NULL);
+       RNA_def_property_update(prop, NC_ID | NA_RENAME, NULL);
        RNA_def_struct_name_property(srna, prop);
 
        prop = RNA_def_property(srna, "users", PROP_INT, PROP_UNSIGNED);
@@ -521,7 +523,7 @@ static void rna_def_ID(BlenderRNA *brna)
 
        func = RNA_def_function(srna, "user_clear", "rna_ID_user_clear");
        RNA_def_function_ui_description(func, "Clear the user count of a datablock so its not saved, "
-                                             "on reload the data will be removed");
+                                       "on reload the data will be removed");
 
        func = RNA_def_function(srna, "animation_data_create", "BKE_id_add_animdata");
        RNA_def_function_ui_description(func, "Create animation data to this ID, note that not all ID types support this");
index 573d72161140d43a5355dd3b64c9d4a36713b993..3079ba8c8d8b0d1ed1f8d81b838fbe3f1ebc9775 100644 (file)
@@ -78,7 +78,7 @@ void RNA_init(void)
 
                        for (prop = srna->cont.properties.first; prop; prop = prop->next)
                                if (!(prop->flag & PROP_BUILTIN))
-                                       BLI_ghash_insert(srna->cont.prophash, (void*)prop->identifier, prop);
+                                       BLI_ghash_insert(srna->cont.prophash, (void *)prop->identifier, prop);
                }
        }
 }
@@ -285,10 +285,10 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
 {
        if (prop->magic == RNA_MAGIC) {
                int arraylen[RNA_MAX_ARRAY_DIMENSION];
-               return (prop->getlength && ptr->data)? prop->getlength(ptr, arraylen): prop->totarraylength;
+               return (prop->getlength && ptr->data) ? prop->getlength(ptr, arraylen) : prop->totarraylength;
        }
        else {
-               IDProperty *idprop = (IDProperty*)prop;
+               IDProperty *idprop = (IDProperty *)prop;
 
                if (idprop->type == IDP_ARRAY)
                        return idprop->len;
@@ -300,12 +300,12 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
 static int rna_ensure_property_array_check(PropertyRNA *prop)
 {
        if (prop->magic == RNA_MAGIC) {
-               return (prop->getlength || prop->totarraylength) ? 1:0;
+               return (prop->getlength || prop->totarraylength) ? 1 : 0;
        }
        else {
-               IDProperty *idprop = (IDProperty*)prop;
+               IDProperty *idprop = (IDProperty *)prop;
 
-               return idprop->type == IDP_ARRAY ? 1:0;
+               return idprop->type == IDP_ARRAY ? 1 : 0;
        }
 }
 
@@ -315,10 +315,10 @@ static void rna_ensure_property_multi_array_length(PointerRNA *ptr, PropertyRNA
                if (prop->getlength)
                        prop->getlength(ptr, length);
                else
-                       memcpy(length, prop->arraylength, prop->arraydimension*sizeof(int));
+                       memcpy(length, prop->arraylength, prop->arraydimension * sizeof(int));
        }
        else {
-               IDProperty *idprop = (IDProperty*)prop;
+               IDProperty *idprop = (IDProperty *)prop;
 
                if (idprop->type == IDP_ARRAY)
                        length[0] = idprop->len;
@@ -373,21 +373,23 @@ static int rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPro
        return 1;
 }
 
-static PropertyRNA *typemap[IDP_NUMTYPES] =
-       {(PropertyRNA*)&rna_PropertyGroupItem_string,
-        (PropertyRNA*)&rna_PropertyGroupItem_int,
-        (PropertyRNA*)&rna_PropertyGroupItem_float,
-        NULL, NULL, NULL,
-        (PropertyRNA*)&rna_PropertyGroupItem_group, NULL,
-        (PropertyRNA*)&rna_PropertyGroupItem_double,
-        (PropertyRNA*)&rna_PropertyGroupItem_idp_array};
+static PropertyRNA *typemap[IDP_NUMTYPES] = {
+       (PropertyRNA *)&rna_PropertyGroupItem_string,
+       (PropertyRNA *)&rna_PropertyGroupItem_int,
+       (PropertyRNA *)&rna_PropertyGroupItem_float,
+       NULL, NULL, NULL,
+       (PropertyRNA *)&rna_PropertyGroupItem_group, NULL,
+       (PropertyRNA *)&rna_PropertyGroupItem_double,
+       (PropertyRNA *)&rna_PropertyGroupItem_idp_array
+};
 
-static PropertyRNA *arraytypemap[IDP_NUMTYPES] =
-       {NULL, (PropertyRNA*)&rna_PropertyGroupItem_int_array,
-        (PropertyRNA*)&rna_PropertyGroupItem_float_array,
-        NULL, NULL, NULL,
-        (PropertyRNA*)&rna_PropertyGroupItem_collection, NULL,
-        (PropertyRNA*)&rna_PropertyGroupItem_double_array};
+static PropertyRNA *arraytypemap[IDP_NUMTYPES] = {
+       NULL, (PropertyRNA *)&rna_PropertyGroupItem_int_array,
+       (PropertyRNA *)&rna_PropertyGroupItem_float_array,
+       NULL, NULL, NULL,
+       (PropertyRNA *)&rna_PropertyGroupItem_collection, NULL,
+       (PropertyRNA *)&rna_PropertyGroupItem_double_array
+};
 
 IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
 {
@@ -418,7 +420,7 @@ IDProperty *rna_idproperty_check(PropertyRNA **prop, PointerRNA *ptr)
        }
 
        {
-               IDProperty *idprop = (IDProperty*)(*prop);
+               IDProperty *idprop = (IDProperty *)(*prop);
 
                if (idprop->type == IDP_ARRAY)
                        *prop = arraytypemap[(int)(idprop->subtype)];
@@ -437,7 +439,7 @@ static PropertyRNA *rna_ensure_property(PropertyRNA *prop)
                return prop;
 
        {
-               IDProperty *idprop = (IDProperty*)prop;
+               IDProperty *idprop = (IDProperty *)prop;
 
                if (idprop->type == IDP_ARRAY)
                        return arraytypemap[(int)(idprop->subtype)];
@@ -451,7 +453,7 @@ static const char *rna_ensure_property_identifier(PropertyRNA *prop)
        if (prop->magic == RNA_MAGIC)
                return prop->identifier;
        else
-               return ((IDProperty*)prop)->name;
+               return ((IDProperty *)prop)->name;
 }
 
 static const char *rna_ensure_property_description(PropertyRNA *prop)
@@ -471,7 +473,7 @@ static const char *rna_ensure_property_description(PropertyRNA *prop)
                }
 
                if (description == NULL)
-                       description = ((IDProperty*)prop)->name; /* XXX - not correct */
+                       description = ((IDProperty *)prop)->name;  /* XXX - not correct */
        }
 
        return TIP_(description);
@@ -484,7 +486,7 @@ static const char *rna_ensure_property_name(PropertyRNA *prop)
        if (prop->magic == RNA_MAGIC)
                name = prop->name;
        else
-               name = ((IDProperty*)prop)->name;
+               name = ((IDProperty *)prop)->name;
 
        return CTX_IFACE_(prop->translation_context, name);
 }
@@ -590,8 +592,8 @@ int RNA_struct_is_a(StructRNA *type, StructRNA *srna)
 
 PropertyRNA *RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
 {
-       if (identifier[0] =='[' && identifier[1] =='"') { /* "  (dummy comment to avoid confusing some
-                                                          * function lists in text editors) */
+       if (identifier[0] == '[' && identifier[1] == '"') { /* "  (dummy comment to avoid confusing some
+                                                                * function lists in text editors) */
                /* id prop lookup, not so common */
                PropertyRNA *r_prop = NULL;
                PointerRNA r_ptr; /* only support single level props */
@@ -615,7 +617,7 @@ PropertyRNA *RNA_struct_find_nested(PointerRNA *ptr, StructRNA *srna)
 {
        PropertyRNA *prop = NULL;
 
-       RNA_STRUCT_BEGIN (ptr, iprop)
+       RNA_STRUCT_BEGIN(ptr, iprop)
        {
                /* This assumes that there can only be one user of this nested struct */
                if (RNA_property_pointer_type(ptr, iprop) == srna) {
@@ -638,7 +640,7 @@ int RNA_struct_contains_property(PointerRNA *ptr, PropertyRNA *prop_test)
 
        iterprop = RNA_struct_iterator_property(ptr->type);
 
-       RNA_PROP_BEGIN (ptr, itemptr, iterprop)
+       RNA_PROP_BEGIN(ptr, itemptr, iterprop)
        {
                /* PropertyRNA *prop= itemptr.data; */
                if (prop_test == (PropertyRNA *)itemptr.data) {
@@ -686,7 +688,7 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
 
        func = NULL;
 
-       RNA_PROP_BEGIN (&tptr, funcptr, iterprop)
+       RNA_PROP_BEGIN(&tptr, funcptr, iterprop)
        {
                if (strcmp(identifier, RNA_function_identifier(funcptr.data)) == 0) {
                        func = funcptr.data;
@@ -699,8 +701,7 @@ FunctionRNA *RNA_struct_find_function(PointerRNA *ptr, const char *identifier)
 #endif
 }
 
-const struct ListBase *RNA_struct_type_functions(StructRNA *srna)
-{
+const struct ListBase *RNA_struct_type_functions(StructRNA *srna){
        return &srna->functions;
 }
 
@@ -814,7 +815,7 @@ int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[
        PropertyRNA *rprop = rna_ensure_property(prop);
 
        if (length)
-                       rna_ensure_property_multi_array_length(ptr, prop, length);
+               rna_ensure_property_multi_array_length(ptr, prop, length);
 
        return rprop->arraydimension;
 }
@@ -841,7 +842,7 @@ char RNA_property_array_item_char(PropertyRNA *prop, int index)
                return quatitem[index];
        }
        else if ((index < 4) && ELEM8(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ, PROP_XYZ_LENGTH,
-                                             PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION, PROP_COORDS))
+                                     PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION, PROP_COORDS))
        {
                return vectoritem[index];
        }
@@ -871,7 +872,7 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name)
                }
        }
        else if (ELEM6(subtype, PROP_TRANSLATION, PROP_DIRECTION, PROP_XYZ,
-                              PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
+                      PROP_EULER, PROP_VELOCITY, PROP_ACCELERATION))
        {
                switch (name) {
                        case 'x':
@@ -903,7 +904,7 @@ int RNA_property_array_item_index(PropertyRNA *prop, char name)
 
 void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, int *hardmax)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop);
+       IntPropertyRNA *iprop = (IntPropertyRNA *)rna_ensure_property(prop);
        int softmin, softmax;
 
        if (prop->magic != RNA_MAGIC) {
@@ -937,7 +938,7 @@ void RNA_property_int_range(PointerRNA *ptr, PropertyRNA *prop, int *hardmin, in
 
 void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin, int *softmax, int *step)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)rna_ensure_property(prop);
+       IntPropertyRNA *iprop = (IntPropertyRNA *)rna_ensure_property(prop);
        int hardmin, hardmax;
        
        if (prop->magic != RNA_MAGIC) {
@@ -978,7 +979,7 @@ void RNA_property_int_ui_range(PointerRNA *ptr, PropertyRNA *prop, int *softmin,
 
 void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin, float *hardmax)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop);
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)rna_ensure_property(prop);
        float softmin, softmax;
 
        if (prop->magic != RNA_MAGIC) {
@@ -1013,7 +1014,7 @@ void RNA_property_float_range(PointerRNA *ptr, PropertyRNA *prop, float *hardmin
 void RNA_property_float_ui_range(PointerRNA *ptr, PropertyRNA *prop, float *softmin, float *softmax,
                                  float *step, float *precision)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)rna_ensure_property(prop);
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)rna_ensure_property(prop);
        float hardmin, hardmax;
 
        if (prop->magic != RNA_MAGIC) {
@@ -1098,7 +1099,7 @@ int RNA_property_int_clamp(PointerRNA *ptr, PropertyRNA *prop, int *value)
  * '0' used when their is no maximum */
 int RNA_property_string_maxlength(PropertyRNA *prop)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)rna_ensure_property(prop);
+       StringPropertyRNA *sprop = (StringPropertyRNA *)rna_ensure_property(prop);
        return sprop->maxlength;
 }
 
@@ -1107,7 +1108,7 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
        prop = rna_ensure_property(prop);
 
        if (prop->type == PROP_POINTER) {
-               PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+               PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
                if (pprop->typef)
                        return pprop->typef(ptr);
@@ -1115,7 +1116,7 @@ StructRNA *RNA_property_pointer_type(PointerRNA *ptr, PropertyRNA *prop)
                        return pprop->type;
        }
        else if (prop->type == PROP_COLLECTION) {
-               CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+               CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
                if (cprop->item_type)
                        return cprop->item_type;
@@ -1130,7 +1131,7 @@ int RNA_property_pointer_poll(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *va
        prop = rna_ensure_property(prop);
 
        if (prop->type == PROP_POINTER) {
-               PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+               PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
                if (pprop->poll)
                        return pprop->poll(ptr, *value);
 
@@ -1155,7 +1156,7 @@ EnumPropertyItem DummyRNA_DEFAULT_items[] = {
 void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, EnumPropertyItem **item,
                              int *totitem, int *free)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)rna_ensure_property(prop);
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)rna_ensure_property(prop);
 
        *free = 0;
 
@@ -1169,7 +1170,7 @@ void RNA_property_enum_items(bContext *C, PointerRNA *ptr, PropertyRNA *prop, En
 
                if (totitem) {
                        if (*item) {
-                               for ( ; (*item)[tot].identifier; tot++);
+                               for (; (*item)[tot].identifier; tot++) ;
                        }
 
                        *totitem = tot;
@@ -1204,7 +1205,7 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
                        for (i = 0; (*item)[i].identifier; i++)
                                totitem++;
 
-                       nitem = MEM_callocN(sizeof(EnumPropertyItem)*(totitem+1), "enum_items_gettexted");
+                       nitem = MEM_callocN(sizeof(EnumPropertyItem) * (totitem + 1), "enum_items_gettexted");
 
                        for (i = 0; (*item)[i].identifier; i++)
                                nitem[i] = (*item)[i];
@@ -1213,13 +1214,13 @@ void RNA_property_enum_items_gettexted(bContext *C, PointerRNA *ptr, PropertyRNA
                }
 
                for (i = 0; nitem[i].identifier; i++) {
-                       if ( nitem[i].name ) {
+                       if (nitem[i].name) {
                                if (prop->translation_context)
                                        nitem[i].name = BLF_pgettext(prop->translation_context, nitem[i].name);
                                else
                                        nitem[i].name = BLF_gettext(nitem[i].name);
                        }
-                       if ( nitem[i].description )
+                       if (nitem[i].description)
                                nitem[i].description = BLF_gettext(nitem[i].description);
                }
 
@@ -1483,7 +1484,7 @@ static void rna_property_update(bContext *C, Main *bmain, Scene *scene, PointerR
        if (!is_rna || (prop->flag & PROP_IDPROPERTY)) {
                /* WARNING! This is so property drivers update the display!
                 * not especially nice  */
-               DAG_id_tag_update(ptr->id.data, OB_RECALC_OB|OB_RECALC_DATA|OB_RECALC_TIME);
+               DAG_id_tag_update(ptr->id.data, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME);
                WM_main_add_notifier(NC_WINDOW, NULL);
        }
 }
@@ -1525,8 +1526,8 @@ void RNA_property_update_main(Main *bmain, Scene *scene, PointerRNA *ptr, Proper
 typedef struct tRnaUpdateCacheElem {
        struct tRnaUpdateCacheElem *next, *prev;
        
-       PointerRNA ptr;         /* L1 key - id as primary, data secondary/ignored? */
-       ListBase L2Funcs;       /* L2 functions (LinkData<RnaUpdateFuncRef>) */
+       PointerRNA ptr;     /* L1 key - id as primary, data secondary/ignored? */
+       ListBase L2Funcs;   /* L2 functions (LinkData<RnaUpdateFuncRef>) */
 } tRnaUpdateCacheElem;
 
 /* cache global (tRnaUpdateCacheElem's) - only accessible using these API calls */
@@ -1617,7 +1618,7 @@ void RNA_property_update_cache_free(void)
 
 int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
@@ -1633,7 +1634,7 @@ int RNA_property_boolean_get(PointerRNA *ptr, PropertyRNA *prop)
 
 void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
@@ -1662,7 +1663,7 @@ void RNA_property_boolean_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
 void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
@@ -1672,16 +1673,16 @@ void RNA_property_boolean_get_array(PointerRNA *ptr, PropertyRNA *prop, int *val
                if (prop->arraydimension == 0)
                        values[0] = RNA_property_boolean_get(ptr, prop);
                else
-                       memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
+                       memcpy(values, IDP_Array(idprop), sizeof(int) * idprop->len);
        }
        else if (prop->arraydimension == 0)
                values[0] = RNA_property_boolean_get(ptr, prop);
        else if (bprop->getarray)
                bprop->getarray(ptr, values);
        else if (bprop->defaultarray)
-               memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+               memcpy(values, bprop->defaultarray, sizeof(int) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(int)*prop->totarraylength);
+               memset(values, 0, sizeof(int) * prop->totarraylength);
 }
 
 int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
@@ -1699,7 +1700,7 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
        else {
                int *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_boolean_get_index");
                RNA_property_boolean_get_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -1710,7 +1711,7 @@ int RNA_property_boolean_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
 
 void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
@@ -1720,7 +1721,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
                if (prop->arraydimension == 0)
                        IDP_Int(idprop) = values[0];
                else
-                       memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(int) * idprop->len);
 
                rna_idproperty_touch(idprop);
        }
@@ -1739,7 +1740,7 @@ void RNA_property_boolean_set_array(PointerRNA *ptr, PropertyRNA *prop, const in
                if (group) {
                        idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
-                       memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(int) * idprop->len);
                }
        }
 }
@@ -1760,7 +1761,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde
        else {
                int *tmparray;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_boolean_get_index");
                RNA_property_boolean_get_array(ptr, prop, tmparray);
                tmparray[index] = value;
                RNA_property_boolean_set_array(ptr, prop, tmparray);
@@ -1770,7 +1771,7 @@ void RNA_property_boolean_set_index(PointerRNA *ptr, PropertyRNA *prop, int inde
 
 int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
        BLI_assert(RNA_property_array_check(prop) == 0);
@@ -1780,7 +1781,7 @@ int RNA_property_boolean_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 
 void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int *values)
 {
-       BoolPropertyRNA *bprop = (BoolPropertyRNA*)prop;
+       BoolPropertyRNA *bprop = (BoolPropertyRNA *)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_BOOLEAN);
        BLI_assert(RNA_property_array_check(prop) != 0);
@@ -1788,9 +1789,9 @@ void RNA_property_boolean_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA
        if (prop->arraydimension == 0)
                values[0] = bprop->defaultvalue;
        else if (bprop->defaultarray)
-               memcpy(values, bprop->defaultarray, sizeof(int)*prop->totarraylength);
+               memcpy(values, bprop->defaultarray, sizeof(int) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(int)*prop->totarraylength);
+               memset(values, 0, sizeof(int) * prop->totarraylength);
 }
 
 int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
@@ -1808,7 +1809,7 @@ int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
        else {
                int *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_boolean_get_default_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_boolean_get_default_index");
                RNA_property_boolean_get_default_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -1819,7 +1820,7 @@ int RNA_property_boolean_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
 
 int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
@@ -1835,7 +1836,7 @@ int RNA_property_int_get(PointerRNA *ptr, PropertyRNA *prop)
 
 void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
@@ -1865,7 +1866,7 @@ void RNA_property_int_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
 void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
@@ -1875,16 +1876,16 @@ void RNA_property_int_get_array(PointerRNA *ptr, PropertyRNA *prop, int *values)
                if (prop->arraydimension == 0)
                        values[0] = RNA_property_int_get(ptr, prop);
                else
-                       memcpy(values, IDP_Array(idprop), sizeof(int)*idprop->len);
+                       memcpy(values, IDP_Array(idprop), sizeof(int) * idprop->len);
        }
        else if (prop->arraydimension == 0)
                values[0] = RNA_property_int_get(ptr, prop);
        else if (iprop->getarray)
                iprop->getarray(ptr, values);
        else if (iprop->defaultarray)
-               memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+               memcpy(values, iprop->defaultarray, sizeof(int) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(int)*prop->totarraylength);
+               memset(values, 0, sizeof(int) * prop->totarraylength);
 }
 
 void RNA_property_int_get_array_range(PointerRNA *ptr, PropertyRNA *prop, int values[2])
@@ -1939,7 +1940,7 @@ int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
        else {
                int *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_int_get_index");
                RNA_property_int_get_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -1950,7 +1951,7 @@ int RNA_property_int_get_index(PointerRNA *ptr, PropertyRNA *prop, int index)
 
 void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *values)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_INT);
@@ -1960,7 +1961,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
                if (prop->arraydimension == 0)
                        IDP_Int(idprop) = values[0];
                else
-                       memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(int) * idprop->len);
 
                rna_idproperty_touch(idprop);
        }
@@ -1981,7 +1982,7 @@ void RNA_property_int_set_array(PointerRNA *ptr, PropertyRNA *prop, const int *v
                if (group) {
                        idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
-                       memcpy(IDP_Array(idprop), values, sizeof(int)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(int) * idprop->len);
                }
        }
 }
@@ -2002,7 +2003,7 @@ void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, i
        else {
                int *tmparray;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_int_get_index");
                RNA_property_int_get_array(ptr, prop, tmparray);
                tmparray[index] = value;
                RNA_property_int_set_array(ptr, prop, tmparray);
@@ -2012,13 +2013,13 @@ void RNA_property_int_set_index(PointerRNA *ptr, PropertyRNA *prop, int index, i
 
 int RNA_property_int_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        return iprop->defaultvalue;
 }
 
 void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, int *values)
 {
-       IntPropertyRNA *iprop = (IntPropertyRNA*)prop;
+       IntPropertyRNA *iprop = (IntPropertyRNA *)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_INT);
        BLI_assert(RNA_property_array_check(prop) != 0);
@@ -2026,9 +2027,9 @@ void RNA_property_int_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *pr
        if (prop->arraydimension == 0)
                values[0] = iprop->defaultvalue;
        else if (iprop->defaultarray)
-               memcpy(values, iprop->defaultarray, sizeof(int)*prop->totarraylength);
+               memcpy(values, iprop->defaultarray, sizeof(int) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(int)*prop->totarraylength);
+               memset(values, 0, sizeof(int) * prop->totarraylength);
 }
 
 int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
@@ -2043,7 +2044,7 @@ int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int i
        else {
                int *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(int)*len, "RNA_property_int_get_default_index");
+               tmparray = MEM_callocN(sizeof(int) * len, "RNA_property_int_get_default_index");
                RNA_property_int_get_default_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -2054,7 +2055,7 @@ int RNA_property_int_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int i
 
 float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
@@ -2074,7 +2075,7 @@ float RNA_property_float_get(PointerRNA *ptr, PropertyRNA *prop)
 
 void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
@@ -2109,7 +2110,7 @@ void RNA_property_float_set(PointerRNA *ptr, PropertyRNA *prop, float value)
 
 void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *values)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
        IDProperty *idprop;
        int i;
 
@@ -2120,11 +2121,11 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
                if (prop->arraydimension == 0)
                        values[0] = RNA_property_float_get(ptr, prop);
                else if (idprop->subtype == IDP_FLOAT) {
-                       memcpy(values, IDP_Array(idprop), sizeof(float)*idprop->len);
+                       memcpy(values, IDP_Array(idprop), sizeof(float) * idprop->len);
                }
                else {
-                       for (i = 0; i<idprop->len; i++)
-                               values[i] =  (float)(((double*)IDP_Array(idprop))[i]);
+                       for (i = 0; i < idprop->len; i++)
+                               values[i] =  (float)(((double *)IDP_Array(idprop))[i]);
                }
        }
        else if (prop->arraydimension == 0)
@@ -2132,9 +2133,9 @@ void RNA_property_float_get_array(PointerRNA *ptr, PropertyRNA *prop, float *val
        else if (fprop->getarray)
                fprop->getarray(ptr, values);
        else if (fprop->defaultarray)
-               memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+               memcpy(values, fprop->defaultarray, sizeof(float) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(float)*prop->totarraylength);
+               memset(values, 0, sizeof(float) * prop->totarraylength);
 }
 
 void RNA_property_float_get_array_range(PointerRNA *ptr, PropertyRNA *prop, float values[2])
@@ -2189,7 +2190,7 @@ float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
        else {
                float *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
+               tmparray = MEM_callocN(sizeof(float) * len, "RNA_property_float_get_index");
                RNA_property_float_get_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -2201,7 +2202,7 @@ float RNA_property_float_get_index(PointerRNA *ptr, PropertyRNA *prop, int index
 
 void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const float *values)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
        IDProperty *idprop;
        int i;
 
@@ -2216,11 +2217,11 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
                                IDP_Double(idprop) = values[0];
                }
                else if (idprop->subtype == IDP_FLOAT) {
-                       memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(float) * idprop->len);
                }
                else {
-                       for (i = 0; i<idprop->len; i++)
-                               ((double*)IDP_Array(idprop))[i] = values[i];
+                       for (i = 0; i < idprop->len; i++)
+                               ((double *)IDP_Array(idprop))[i] = values[i];
                }
 
                rna_idproperty_touch(idprop);
@@ -2243,7 +2244,7 @@ void RNA_property_float_set_array(PointerRNA *ptr, PropertyRNA *prop, const floa
                if (group) {
                        idprop = IDP_New(IDP_ARRAY, &val, prop->identifier);
                        IDP_AddToGroup(group, idprop);
-                       memcpy(IDP_Array(idprop), values, sizeof(float)*idprop->len);
+                       memcpy(IDP_Array(idprop), values, sizeof(float) * idprop->len);
                }
        }
 }
@@ -2264,7 +2265,7 @@ void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index,
        else {
                float *tmparray;
 
-               tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_index");
+               tmparray = MEM_callocN(sizeof(float) * len, "RNA_property_float_get_index");
                RNA_property_float_get_array(ptr, prop, tmparray);
                tmparray[index] = value;
                RNA_property_float_set_array(ptr, prop, tmparray);
@@ -2274,7 +2275,7 @@ void RNA_property_float_set_index(PointerRNA *ptr, PropertyRNA *prop, int index,
 
 float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
        BLI_assert(RNA_property_array_check(prop) == 0);
@@ -2284,7 +2285,7 @@ float RNA_property_float_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 
 void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *prop, float *values)
 {
-       FloatPropertyRNA *fprop = (FloatPropertyRNA*)prop;
+       FloatPropertyRNA *fprop = (FloatPropertyRNA *)prop;
        
        BLI_assert(RNA_property_type(prop) == PROP_FLOAT);
        BLI_assert(RNA_property_array_check(prop) != 0);
@@ -2292,9 +2293,9 @@ void RNA_property_float_get_default_array(PointerRNA *UNUSED(ptr), PropertyRNA *
        if (prop->arraydimension == 0)
                values[0] = fprop->defaultvalue;
        else if (fprop->defaultarray)
-               memcpy(values, fprop->defaultarray, sizeof(float)*prop->totarraylength);
+               memcpy(values, fprop->defaultarray, sizeof(float) * prop->totarraylength);
        else
-               memset(values, 0, sizeof(float)*prop->totarraylength);
+               memset(values, 0, sizeof(float) * prop->totarraylength);
 }
 
 float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, int index)
@@ -2312,7 +2313,7 @@ float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
        else {
                float *tmparray, value;
 
-               tmparray = MEM_callocN(sizeof(float)*len, "RNA_property_float_get_default_index");
+               tmparray = MEM_callocN(sizeof(float) * len, "RNA_property_float_get_default_index");
                RNA_property_float_get_default_array(ptr, prop, tmparray);
                value = tmparray[index];
                MEM_freeN(tmparray);
@@ -2323,7 +2324,7 @@ float RNA_property_float_get_default_index(PointerRNA *ptr, PropertyRNA *prop, i
 
 void RNA_property_string_get(PointerRNA *ptr, PropertyRNA *prop, char *value)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
@@ -2357,10 +2358,10 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop,
 
        length = RNA_property_string_length(ptr, prop);
 
-       if (length+1 < fixedlen)
+       if (length + 1 < fixedlen)
                buf = fixedbuf;
        else
-               buf = MEM_mallocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+               buf = MEM_mallocN(sizeof(char) * (length + 1), "RNA_string_get_alloc");
 
 #ifndef NDEBUG
        /* safety check to ensure the string is actually set */
@@ -2383,7 +2384,7 @@ char *RNA_property_string_get_alloc(PointerRNA *ptr, PropertyRNA *prop,
 /* this is the length without \0 terminator */
 int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
@@ -2408,7 +2409,7 @@ int RNA_property_string_length(PointerRNA *ptr, PropertyRNA *prop)
 
 void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *value)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
@@ -2419,7 +2420,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
                rna_idproperty_touch(idprop);
        }
        else if (sprop->set)
-               sprop->set(ptr, value); /* set function needs to clamp its self */
+               sprop->set(ptr, value);  /* set function needs to clamp its self */
        else if (prop->flag & PROP_EDITABLE) {
                IDProperty *group;
 
@@ -2431,7 +2432,7 @@ void RNA_property_string_set(PointerRNA *ptr, PropertyRNA *prop, const char *val
 
 void RNA_property_string_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop, char *value)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
 
@@ -2447,10 +2448,10 @@ char *RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop,
 
        length = RNA_property_string_default_length(ptr, prop);
 
-       if (length+1 < fixedlen)
+       if (length + 1 < fixedlen)
                buf = fixedbuf;
        else
-               buf = MEM_callocN(sizeof(char)*(length+1), "RNA_string_get_alloc");
+               buf = MEM_callocN(sizeof(char) * (length + 1), "RNA_string_get_alloc");
 
        RNA_property_string_get_default(ptr, prop, buf);
 
@@ -2460,7 +2461,7 @@ char *RNA_property_string_get_default_alloc(PointerRNA *ptr, PropertyRNA *prop,
 /* this is the length without \0 terminator */
 int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 {
-       StringPropertyRNA *sprop = (StringPropertyRNA*)prop;
+       StringPropertyRNA *sprop = (StringPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_STRING);
 
@@ -2469,7 +2470,7 @@ int RNA_property_string_default_length(PointerRNA *UNUSED(ptr), PropertyRNA *pro
 
 int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_ENUM);
@@ -2484,7 +2485,7 @@ int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
 
 void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_ENUM);
@@ -2510,7 +2511,7 @@ void RNA_property_enum_set(PointerRNA *ptr, PropertyRNA *prop, int value)
 
 int RNA_property_enum_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_ENUM);
 
@@ -2519,7 +2520,7 @@ int RNA_property_enum_get_default(PointerRNA *UNUSED(ptr), PropertyRNA *prop)
 
 void *RNA_property_enum_py_data_get(PropertyRNA *prop)
 {
-       EnumPropertyRNA *eprop = (EnumPropertyRNA*)prop;
+       EnumPropertyRNA *eprop = (EnumPropertyRNA *)prop;
 
        BLI_assert(RNA_property_type(prop) == PROP_ENUM);
 
@@ -2528,13 +2529,13 @@ void *RNA_property_enum_py_data_get(PropertyRNA *prop)
 
 PointerRNA RNA_property_pointer_get(PointerRNA *ptr, PropertyRNA *prop)
 {
-       PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+       PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_POINTER);
 
        if ((idprop = rna_idproperty_check(&prop, ptr))) {
-               pprop = (PointerPropertyRNA*)prop;
+               pprop = (PointerPropertyRNA *)prop;
 
                /* for groups, data is idprop itself */
                return rna_pointer_inherit_refine(ptr, pprop->type, idprop);
@@ -2564,12 +2565,12 @@ void RNA_property_pointer_set(PointerRNA *ptr, PropertyRNA *prop, PointerRNA ptr
                /* rna_idproperty_touch(idprop); */
        }
        else {
-               PointerPropertyRNA *pprop = (PointerPropertyRNA*)prop;
+               PointerPropertyRNA *pprop = (PointerPropertyRNA *)prop;
 
-               if (            pprop->set &&
-                               !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
-                               !((prop->flag & PROP_ID_SELF_CHECK) && ptr->id.data == ptr_value.id.data)
-               {
+               if (pprop->set &&
+                   !((prop->flag & PROP_NEVER_NULL) && ptr_value.data == NULL) &&
+                   !((prop->flag & PROP_ID_SELF_CHECK) && ptr->id.data == ptr_value.id.data))
+               {
                        pprop->set(ptr, ptr_value);
                }
        }
@@ -2590,7 +2591,7 @@ void RNA_property_pointer_add(PointerRNA *ptr, PropertyRNA *prop)
 
        BLI_assert(RNA_property_type(prop) == PROP_POINTER);
 
-       if ((/*idprop=*/rna_idproperty_check(&prop, ptr))) {
+       if ((/*idprop=*/ rna_idproperty_check(&prop, ptr))) {
                /* already exists */
        }
        else if (prop->flag & PROP_IDPROPERTY) {
@@ -2628,7 +2629,7 @@ void RNA_property_pointer_remove(PointerRNA *ptr, PropertyRNA *prop)
 
 static void rna_property_collection_get_idp(CollectionPropertyIterator *iter)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)iter->prop;
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)iter->prop;
 
        iter->ptr.data = rna_iterator_array_get(iter);
        iter->ptr.type = cprop->item_type;
@@ -2658,14 +2659,14 @@ void RNA_property_collection_begin(PointerRNA *ptr, PropertyRNA *prop, Collectio
                iter->idprop = 1;
        }
        else {
-               CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+               CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
                cprop->begin(iter, ptr);
        }
 }
 
 void RNA_property_collection_next(CollectionPropertyIterator *iter)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)rna_ensure_property(iter->prop);
 
        if (iter->idprop) {
                rna_iterator_array_next(iter);
@@ -2679,7 +2680,7 @@ void RNA_property_collection_next(CollectionPropertyIterator *iter)
 
 void RNA_property_collection_end(CollectionPropertyIterator *iter)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(iter->prop);
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)rna_ensure_property(iter->prop);
 
        if (iter->idprop)
                rna_iterator_array_end(iter);
@@ -2689,7 +2690,7 @@ void RNA_property_collection_end(CollectionPropertyIterator *iter)
 
 int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
        IDProperty *idprop;
 
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
@@ -2756,14 +2757,14 @@ void RNA_property_collection_add(PointerRNA *ptr, PropertyRNA *prop, PointerRNA
                }
        }
        /*else
-               printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);*/
+           printf("%s %s.%s: not implemented for this property.\n", __func__, ptr->type->identifier, prop->identifier);*/
 #endif
 
        if (r_ptr) {
                if (idprop) {
-                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)prop;
+                       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)prop;
 
-                       r_ptr->data = IDP_GetIndexArray(idprop, idprop->len-1);
+                       r_ptr->data = IDP_GetIndexArray(idprop, idprop->len - 1);
                        r_ptr->type = cprop->item_type;
                        rna_pointer_inherit_id(NULL, ptr, r_ptr);
                }
@@ -2787,14 +2788,14 @@ int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
                array = IDP_IDPArray(idprop);
 
                if (key >= 0 && key < len) {
-                       if (key+1 < len) {
+                       if (key + 1 < len) {
                                /* move element to be removed to the back */
                                memcpy(&tmp, &array[key], sizeof(IDProperty));
-                               memmove(array+key, array+key+1, sizeof(IDProperty)*(len-(key+1)));
-                               memcpy(&array[len-1], &tmp, sizeof(IDProperty));
+                               memmove(array + key, array + key + 1, sizeof(IDProperty) * (len - (key + 1)));
+                               memcpy(&array[len - 1], &tmp, sizeof(IDProperty));
                        }
 
-                       IDP_ResizeIDPArray(idprop, len-1);
+                       IDP_ResizeIDPArray(idprop, len - 1);
                }
 
                return 1;
@@ -2815,7 +2816,7 @@ int RNA_property_collection_remove(PointerRNA *ptr, PropertyRNA *prop, int key)
                return 0;
        }
        /*else
-               printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);*/
+           printf("%s %s.%s: only supported for id properties.\n", __func__, ptr->type->identifier, prop->identifier);*/
 #endif
        return 0;
 }
@@ -2836,9 +2837,9 @@ int RNA_property_collection_move(PointerRNA *ptr, PropertyRNA *prop, int key, in
                if (key >= 0 && key < len && pos >= 0 && pos < len && key != pos) {
                        memcpy(&tmp, &array[key], sizeof(IDProperty));
                        if (pos < key)
-                               memmove(array+pos+1, array+pos, sizeof(IDProperty)*(key - pos));
+                               memmove(array + pos + 1, array + pos, sizeof(IDProperty) * (key - pos));
                        else
-                               memmove(array+key, array+key+1, sizeof(IDProperty)*(pos - key));
+                               memmove(array + key, array + key + 1, sizeof(IDProperty) * (pos - key));
                        memcpy(&array[pos], &tmp, sizeof(IDProperty));
                }
 
@@ -2883,7 +2884,7 @@ int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, Poi
 
 int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)rna_ensure_property(prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
 
@@ -2914,7 +2915,7 @@ int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int k
 
 int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, const char *key, PointerRNA *r_ptr)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)rna_ensure_property(prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
 
@@ -2962,7 +2963,7 @@ int RNA_property_collection_lookup_string(PointerRNA *ptr, PropertyRNA *prop, co
 /* zero return is an assignment error */
 int RNA_property_collection_assign_int(PointerRNA *ptr, PropertyRNA *prop, const int key, const PointerRNA *assign_ptr)
 {
-       CollectionPropertyRNA *cprop = (CollectionPropertyRNA*)rna_ensure_property(prop);
+       CollectionPropertyRNA *cprop = (CollectionPropertyRNA *)rna_ensure_property(prop);
 
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
 
@@ -2979,7 +2980,7 @@ int RNA_property_collection_type_get(PointerRNA *ptr, PropertyRNA *prop, Pointer
        BLI_assert(RNA_property_type(prop) == PROP_COLLECTION);
 
        *r_ptr = *ptr;
-       return ((r_ptr->type = rna_ensure_property(prop)->srna) ? 1:0);
+       return ((r_ptr->type = rna_ensure_property(prop)->srna) ? 1 : 0);
 }
 
 int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, PropertyRNA *itemprop, RawArray *array)
@@ -2998,7 +2999,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
        if (iter.valid) {
                /* get data from array iterator and item property */
                internal = iter.internal;
-               arrayp = (iter.valid)? iter.ptr.data: NULL;
+               arrayp = (iter.valid) ? iter.ptr.data : NULL;
 
                if (internal->skip || !RNA_property_editable(&iter.ptr, itemprop)) {
                        /* we might skip some items, so it's not a proper array */
@@ -3008,7 +3009,7 @@ int RNA_property_collection_raw_array(PointerRNA *ptr, PropertyRNA *prop, Proper
 
                array->array = arrayp + itemprop->rawoffset;
                array->stride = internal->itemsize;
-               array->len = ((char*)internal->endptr - arrayp)/internal->itemsize;
+               array->len = ((char *)internal->endptr - arrayp) / internal->itemsize;
                array->type = itemprop->rawtype;
        }
        else
@@ -3095,7 +3096,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                /* try to access as raw array */
                if (RNA_property_collection_raw_array(ptr, prop, itemprop, &out)) {
                        int arraylen = (itemlen == 0) ? 1 : itemlen;
-                       if (in.len != arraylen*out.len) {
+                       if (in.len != arraylen * out.len) {
                                BKE_reportf(reports, RPT_ERROR, "Array length mismatch (expected %d, got %d)",
                                            out.len * arraylen, in.len);
                                return 0;
@@ -3109,12 +3110,12 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
 
                                size = RNA_raw_type_sizeof(out.type) * arraylen;
 
-                               for (a = 0; a<out.len; a++) {
+                               for (a = 0; a < out.len; a++) {
                                        if (set) memcpy(outp, inp, size);
                                        else memcpy(inp, outp, size);
 
-                                       inp = (char*)inp + size;
-                                       outp = (char*)outp + out.stride;
+                                       inp = (char *)inp + size;
+                                       outp = (char *)outp + out.stride;
                                }
 
                                return 1;
@@ -3132,14 +3133,14 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                int needconv = 1;
 
                if (((itemtype == PROP_BOOLEAN || itemtype == PROP_INT) && in.type == PROP_RAW_INT) ||
-                       (itemtype == PROP_FLOAT && in.type == PROP_RAW_FLOAT))
+                   (itemtype == PROP_FLOAT && in.type == PROP_RAW_FLOAT))
                {
                        /* avoid creating temporary buffer if the data type match */
                        needconv = 0;
                }
                /* no item property pointer, can still be id property, or
                 * property of a type derived from the collection pointer type */
-               RNA_PROP_BEGIN (ptr, itemptr, prop)
+               RNA_PROP_BEGIN(ptr, itemptr, prop)
                {
                        if (itemptr.data) {
                                if (itemprop) {
@@ -3169,7 +3170,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
 
                                /* editable check */
                                if (!set || RNA_property_editable(&itemptr, iprop)) {
-                                       if (a+itemlen > in.len) {
+                                       if (a + itemlen > in.len) {
                                                BKE_reportf(reports, RPT_ERROR, "Array length mismatch (got %d, expected more)", in.len);
                                                err = 1;
                                                break;
@@ -3231,7 +3232,7 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                        tmparray = NULL;
                                                }
                                                if (!tmparray) {
-                                                       tmparray = MEM_callocN(sizeof(float)*itemlen, "RNA tmparray\n");
+                                                       tmparray = MEM_callocN(sizeof(float) * itemlen, "RNA tmparray\n");
                                                        tmplen = itemlen;
                                                }
 
@@ -3239,20 +3240,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                if (set) {
                                                        switch (itemtype) {
                                                                case PROP_BOOLEAN: {
-                                                                       for (j = 0; j<itemlen; j++, a++)
-                                                                               RAW_GET(int, ((int*)tmparray)[j], in, a);
+                                                                       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: {
-                                                                       for (j = 0; j<itemlen; j++, a++)
-                                                                               RAW_GET(int, ((int*)tmparray)[j], in, a);
+                                                                       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: {
-                                                                       for (j = 0; j<itemlen; j++, a++)
-                                                                               RAW_GET(float, ((float*)tmparray)[j], in, a);
+                                                                       for (j = 0; j < itemlen; j++, a++)
+                                                                               RAW_GET(float, ((float *)tmparray)[j], in, a);
                                                                        RNA_property_float_set_array(&itemptr, iprop, tmparray);
                                                                        break;
                                                                }
@@ -3264,20 +3265,20 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                        switch (itemtype) {
                                                                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]);
+                                                                       for (j = 0; j < itemlen; j++, a++)
+                                                                               RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
                                                                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]);
+                                                                       for (j = 0; j < itemlen; j++, a++)
+                                                                               RAW_SET(int, in, a, ((int *)tmparray)[j]);
                                                                        break;
                                                                }
                                                                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]);
+                                                                       for (j = 0; j < itemlen; j++, a++)
+                                                                               RAW_SET(float, in, a, ((float *)tmparray)[j]);
                                                                        break;
                                                                }
                                                                default:
@@ -3289,17 +3290,17 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                if (set) {
                                                        switch (itemtype) {
                                                                case PROP_BOOLEAN: {
-                                                                       RNA_property_boolean_set_array(&itemptr, iprop, &((int*)in.array)[a]);
+                                                                       RNA_property_boolean_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                case PROP_INT: {
-                                                                       RNA_property_int_set_array(&itemptr, iprop, &((int*)in.array)[a]);
+                                                                       RNA_property_int_set_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                case PROP_FLOAT: {
-                                                                       RNA_property_float_set_array(&itemptr, iprop, &((float*)in.array)[a]);
+                                                                       RNA_property_float_set_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
@@ -3310,17 +3311,17 @@ static int rna_raw_access(ReportList *reports, PointerRNA *ptr, PropertyRNA *pro
                                                else {
                                                        switch (itemtype) {
                                                                case PROP_BOOLEAN: {
-                                                                       RNA_property_boolean_get_array(&itemptr, iprop, &((int*)in.array)[a]);
+                                                                       RNA_property_boolean_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                case PROP_INT: {
-                                                                       RNA_property_int_get_array(&itemptr, iprop, &((int*)in.array)[a]);
+                                                                       RNA_property_int_get_array(&itemptr, iprop, &((int *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
                                                                case PROP_FLOAT: {
-                                                                       RNA_property_float_get_array(&itemptr, iprop, &((float*)in.array)[a]);
+                                                                       RNA_property_float_get_array(&itemptr, iprop, &((float *)in.array)[a]);
                                                                        a += itemlen;
                                                                        break;
                                                                }
@@ -3346,16 +3347,16 @@ RawPropertyType RNA_property_raw_type(PropertyRNA *prop)
        if (prop->rawtype == PROP_RAW_UNSET) {
                /* this property has no raw access, yet we try to provide a raw type to help building the array */
                switch (prop->type) {
-               case PROP_BOOLEAN:
-                       return PROP_RAW_INT;
-               case PROP_INT:
-                       return PROP_RAW_INT;
-               case PROP_FLOAT:
-                       return PROP_RAW_FLOAT;
-               case PROP_ENUM:
-                       return PROP_RAW_INT;
-               default:
-                       break;
+                       case PROP_BOOLEAN:
+                               return PROP_RAW_INT;
+                       case PROP_INT:
+                               return PROP_RAW_INT;
+                       case PROP_FLOAT:
+                               return PROP_RAW_FLOAT;
+                       case PROP_ENUM:
+                               return PROP_RAW_INT;
+                       default:
+                               break;
                }
        }
        return prop->rawtype;
@@ -3380,7 +3381,7 @@ void rna_iterator_listbase_begin(CollectionPropertyIterator *iter, ListBase *lb,
        ListBaseIterator *internal;
 
        internal = MEM_callocN(sizeof(ListBaseIterator), "ListBaseIterator");
-       internal->link = (lb)? lb->first: NULL;
+       internal->link = (lb) ? lb->first : NULL;
        internal->skip = skip;
 
        iter->internal = internal;
@@ -3439,8 +3440,8 @@ void rna_iterator_array_begin(CollectionPropertyIterator *iter, void *ptr, int i
 
        internal = MEM_callocN(sizeof(ArrayIterator), "ArrayIterator");
        internal->ptr = ptr;
-       internal->free_ptr = free_ptr ? ptr:NULL;
-       internal->endptr = ((char*)ptr)+length*itemsize;
+       internal->free_ptr = free_ptr ? ptr : NULL;
+       internal->endptr = ((char *)ptr) + length * itemsize;
        internal->itemsize = itemsize;
        internal->skip = skip;
        internal->length = length;
@@ -3480,7 +3481,7 @@ void *rna_iterator_array_dereference_get(CollectionPropertyIterator *iter)
        ArrayIterator *internal = iter->internal;
 
        /* for ** arrays */
-       return *(void**)(internal->ptr);
+       return *(void **)(internal->ptr);
 }
 
 void rna_iterator_array_end(CollectionPropertyIterator *iter)
@@ -3500,7 +3501,7 @@ PointerRNA rna_array_lookup_int(PointerRNA *ptr, StructRNA *type, void *data, in
        if (index < 0 || index >= length)
                return PointerRNA_NULL;
 
-       return rna_pointer_inherit_refine(ptr, type, ((char*)data) + index*itemsize);
+       return rna_pointer_inherit_refine(ptr, type, ((char *)data) + index * itemsize);
 }
 
 /* RNA Path - Experiment */
@@ -3566,22 +3567,22 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
                return NULL;
        
        /* try to use fixed buffer if possible */
-       if (len+1 < fixedlen)
+       if (len + 1 < fixedlen)
                buf = fixedbuf;
        else
-               buf = MEM_callocN(sizeof(char)*(len+1), "rna_path_token");
+               buf = MEM_callocN(sizeof(char) * (len + 1), "rna_path_token");
 
        /* copy string, taking into account escaped ] */
        if (bracket) {
-               for (p = *path, i = 0, j = 0; i<len; i++, p++) {
-                       if (*p == '\\' && *(p+1) == quote);
+               for (p = *path, i = 0, j = 0; i < len; i++, p++) {
+                       if (*p == '\\' && *(p + 1) == quote) ;
                        else buf[j++] = *p;
                }
 
                buf[j] = 0;
        }
        else {
-               memcpy(buf, *path, sizeof(char)*len);
+               memcpy(buf, *path, sizeof(char) * len);
                buf[len] = '\0';
        }
 
@@ -3595,11 +3596,11 @@ static char *rna_path_token(const char **path, char *fixedbuf, int fixedlen, int
 
 static int rna_token_strip_quotes(char *token)
 {
-       if (token[0] =='"') {
+       if (token[0] == '"') {
                int len = strlen(token);
-               if (len >= 2 && token[len-1] =='"') {
+               if (len >= 2 && token[len - 1] == '"') {
                        /* strip away "" */
-                       token[len-1] = '\0';
+                       token[len - 1] = '\0';
                        return 1;
                }
        }
@@ -3622,11 +3623,11 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
        prop = NULL;
        curptr = *ptr;
 
-       if (path == NULL || *path =='\0')
+       if (path == NULL || *path == '\0')
                return 0;
 
        while (*path) {
-               int use_id_prop = (*path =='[') ? 1:0;
+               int use_id_prop = (*path == '[') ? 1 : 0;
                /* custom property lookup ?
                 * C.object["someprop"]
                 */
@@ -3640,7 +3641,7 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
                if (use_id_prop) { /* look up property name in current struct */
                        IDProperty *group = RNA_struct_idprops(&curptr, 0);
                        if (group && rna_token_strip_quotes(token))
-                               prop = (PropertyRNA *)IDP_GetPropertyFromGroup(group, token+1);
+                               prop = (PropertyRNA *)IDP_GetPropertyFromGroup(group, token + 1);
                }
                else {
                        prop = RNA_struct_find_property(&curptr, token);
@@ -3658,143 +3659,143 @@ int RNA_path_resolve_full(PointerRNA *ptr, const char *path, PointerRNA *r_ptr,
                 * collection, otherwise return the property rna so that the
                 * caller can read the value of the property itself */
                switch (type) {
-               case PROP_POINTER:
-                       nextptr = RNA_property_pointer_get(&curptr, prop);
-
-                       if (nextptr.data) {
-                               curptr = nextptr;
-                               prop = NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
-                               if (index) *index = -1;
-                       }
-                       else
-                               return 0;
-
-                       break;
-               case PROP_COLLECTION:
-                       if (*path) {
-                               if (*path == '[') {
-                                       /* resolve the lookup with [] brackets */
-                                       token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
-       
-                                       if (!token)
-                                               return 0;
-       
-                                       /* check for "" to see if it is a string */
-                                       if (rna_token_strip_quotes(token)) {
-                                               RNA_property_collection_lookup_string(&curptr, prop, token+1, &nextptr);
-                                       }
-                                       else {
-                                               /* otherwise do int lookup */
-                                               intkey = atoi(token);
-                                               if (intkey == 0 && (token[0] != '0' || token[1] != '\0')) {
-                                                       return 0; /* we can be sure the fixedbuf was used in this case */
-                                               }
-                                               RNA_property_collection_lookup_int(&curptr, prop, intkey, &nextptr);
-                                       }
-
-                                       if (token != fixedbuf) {
-                                               MEM_freeN(token);
-                                       }
-                               }
-                               else {
-                                       PointerRNA c_ptr;
-                                       
-                                       /* ensure we quit on invalid values */
-                                       nextptr.data = NULL;
-
-                                       if (RNA_property_collection_type_get(&curptr, prop, &c_ptr)) {
-                                               nextptr = c_ptr;
-                                       }
-                               }
+                       case PROP_POINTER:
+                               nextptr = RNA_property_pointer_get(&curptr, prop);
 
                                if (nextptr.data) {
                                        curptr = nextptr;
-                                       prop = NULL;  /* now we have a PointerRNA, the prop is our parent so forget it */
+                                       prop = NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
                                        if (index) *index = -1;
                                }
                                else
                                        return 0;
-                       }
                        
-                       break;
-               default:
-                       if (index == NULL)
                                break;
-
-                       *index = -1;
-
-                       if (*path) {
-                               int index_arr[RNA_MAX_ARRAY_DIMENSION] = {0};
-                               int len[RNA_MAX_ARRAY_DIMENSION];
-                               const int dim = RNA_property_array_dimension(&curptr, prop, len);
-                               int i, temp_index;
-
-                               for (i = 0; i<dim; i++) {
-                                       temp_index = -1;
-
-                                       /* multi index resolve */
-                                       if (*path =='[') {
+                       case PROP_COLLECTION:
+                               if (*path) {
+                                       if (*path == '[') {
+                                               /* resolve the lookup with [] brackets */
                                                token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
        
-                                               if (token == NULL) {
-                                                       /* invalid syntax blah[] */
+                                               if (!token)
                                                        return 0;
-                                               }
+
                                                /* check for "" to see if it is a string */
-                                               else if (rna_token_strip_quotes(token)) {
-                                                       temp_index = RNA_property_array_item_index(prop, *(token+1));
+                                               if (rna_token_strip_quotes(token)) {
+                                                       RNA_property_collection_lookup_string(&curptr, prop, token + 1, &nextptr);
                                                }
                                                else {
                                                        /* otherwise do int lookup */
-                                                       temp_index = atoi(token);
-
-                                                       if (temp_index == 0 && (token[0] != '0' || token[1] != '\0')) {
-                                                               if (token != fixedbuf) {
-                                                                       MEM_freeN(token);
-                                                               }
-
-                                                               return 0;
+                                                       intkey = atoi(token);
+                                                       if (intkey == 0 && (token[0] != '0' || token[1] != '\0')) {
+                                                               return 0; /* we can be sure the fixedbuf was used in this case */
                                                        }
+                                                       RNA_property_collection_lookup_int(&curptr, prop, intkey, &nextptr);
                                                }
-                                       }
-                                       else if (dim == 1) {
-                                               /* location.x || scale.X, single dimension arrays only */
-                                               token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
-                                               if (token == NULL) {
-                                                       /* invalid syntax blah.. */
-                                                       return 0;
+
+                                               if (token != fixedbuf) {
+                                                       MEM_freeN(token);
                                                }
-                                               temp_index = RNA_property_array_item_index(prop, *token);
                                        }
+                                       else {
+                                               PointerRNA c_ptr;
+
+                                               /* ensure we quit on invalid values */
+                                               nextptr.data = NULL;
        
-                                       if (token != fixedbuf) {
-                                               MEM_freeN(token);
+                                               if (RNA_property_collection_type_get(&curptr, prop, &c_ptr)) {
+                                                       nextptr = c_ptr;
+                                               }
                                        }
                                        
-                                       /* out of range */
-                                       if (temp_index < 0 || temp_index >= len[i])
+                                       if (nextptr.data) {
+                                               curptr = nextptr;
+                                               prop = NULL; /* now we have a PointerRNA, the prop is our parent so forget it */
+                                               if (index) *index = -1;
+                                       }
+                                       else
                                                return 0;
-
-                                       index_arr[i] = temp_index;
-                                       /* end multi index resolve */
                                }
 
-                               /* arrays always contain numbers so further values are not valid */
+                               break;
+                       default:
+                               if (index == NULL)
+                                       break;
+
+                               *index = -1;
+
                                if (*path) {
-                                       return 0;
-                               }
-                               else {
-                                       int totdim = 1;
-                                       int flat_index = 0;
+                                       int index_arr[RNA_MAX_ARRAY_DIMENSION] = {0};
+                                       int len[RNA_MAX_ARRAY_DIMENSION];
+                                       const int dim = RNA_property_array_dimension(&curptr, prop, len);
+                                       int i, temp_index;
+
+                                       for (i = 0; i < dim; i++) {
+                                               temp_index = -1;
+
+                                               /* multi index resolve */
+                                               if (*path == '[') {
+                                                       token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 1);
+
+                                                       if (token == NULL) {
+                                                               /* invalid syntax blah[] */
+                                                               return 0;
+                                                       }
+                                                       /* check for "" to see if it is a string */
+                                                       else if (rna_token_strip_quotes(token)) {
+                                                               temp_index = RNA_property_array_item_index(prop, *(token + 1));
+                                                       }
+                                                       else {
+                                                               /* otherwise do int lookup */
+                                                               temp_index = atoi(token);
 
-                                       for (i = dim-1; i >= 0; i--) {
-                                               flat_index += index_arr[i] * totdim;
-                                               totdim *= len[i];
+                                                               if (temp_index == 0 && (token[0] != '0' || token[1] != '\0')) {
+                                                                       if (token != fixedbuf) {
+                                                                               MEM_freeN(token);
+                                                                       }
+
+                                                                       return 0;
+                                                               }
+                                                       }
+                                               }
+                                               else if (dim == 1) {
+                                                       /* location.x || scale.X, single dimension arrays only */
+                                                       token = rna_path_token(&path, fixedbuf, sizeof(fixedbuf), 0);
+                                                       if (token == NULL) {
+                                                               /* invalid syntax blah.. */
+                                                               return 0;
+                                                       }
+                                                       temp_index = RNA_property_array_item_index(prop, *token);
+                                               }
+
+                                               if (token != fixedbuf) {
+                                                       MEM_freeN(token);
+                                               }
+
+                                               /* out of range */
+                                               if (temp_index < 0 || temp_index >= len[i])
+                                                       return 0;
+
+                                               index_arr[i] = temp_index;
+                                               /* end multi index resolve */
+                                       }
+
+                                       /* arrays always contain numbers so further values are not valid */
+                                       if (*path) {
+                                               return 0;
                                        }
+                                       else {
+                                               int totdim = 1;
+                                               int flat_index = 0;
 
-                                       *index = flat_index;
+                                               for (i = dim - 1; i >= 0; i--) {
+                                                       flat_index += index_arr[i] * totdim;
+                                                       totdim *= len[i];
+                                               }
+
+                                               *index = flat_index;
+                                       }
                                }
-                       }
                }
        }
 
@@ -3815,7 +3816,7 @@ char *RNA_path_append(const char *path, PointerRNA *UNUSED(ptr), PropertyRNA *pr
 
        /* add .identifier */
        if (path) {
-               BLI_dynstr_append(dynstr, (char*)path);
+               BLI_dynstr_append(dynstr, (char *)path);
                if (*path)
                        BLI_dynstr_append(dynstr, ".");
        }
@@ -3897,7 +3898,7 @@ char *RNA_path_back(const char *path)
        i = previous - path;
        result = BLI_strdup(path);
 
-       if (i > 0 && result[i-1] == '.') i--;
+       if (i > 0 && result[i - 1] == '.') i--;
        result[i] = 0;
 
        return result;
@@ -3948,7 +3949,7 @@ static char *rna_idp_path_create(IDP_Chain *child_link)
        path = BLI_dynstr_get_cstring(dynstr);
        BLI_dynstr_free(dynstr);
 
-       if (*path =='\0') {
+       if (*path == '\0') {
                MEM_freeN(path);
                path = NULL;
        }
@@ -4068,7 +4069,7 @@ char *RNA_path_from_ID_to_struct(PointerRNA *ptr)
                        if (userprop)
                                ptrpath = BLI_strdup(RNA_property_identifier(userprop));
                        else
-                               return NULL; /* can't do anything about this case yet... */
+                               return NULL;  /* can't do anything about this case yet... */
                }
                else if (RNA_struct_is_a(ptr->type, &RNA_PropertyGroup)) {
                        /* special case, easier to deal with here then in ptr->type->path() */
@@ -4096,7 +4097,7 @@ char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
        propname = RNA_property_identifier(prop);
 
        if (ptrpath) {
-               path = BLI_sprintfN(is_rna ? "%s.%s":"%s[\"%s\"]", ptrpath, propname);
+               path = BLI_sprintfN(is_rna ? "%s.%s" : "%s[\"%s\"]", ptrpath, propname);
                MEM_freeN(ptrpath);
        }
        else {
@@ -4306,7 +4307,7 @@ int RNA_enum_is_equal(bContext *C, PointerRNA *ptr, const char *name, const char
 
 int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *value)
 {
-       for ( ; item->identifier; item++) {
+       for (; item->identifier; item++) {
                if (strcmp(item->identifier, identifier) == 0) {
                        *value = item->value;
                        return 1;
@@ -4316,9 +4317,9 @@ int RNA_enum_value_from_id(EnumPropertyItem *item, const char *identifier, int *
        return 0;
 }
 
-int    RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier)
+int RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **identifier)
 {
-       for ( ; item->identifier; item++) {
+       for (; item->identifier; item++) {
                if (item->value == value) {
                        *identifier = item->identifier;
                        return 1;
@@ -4330,7 +4331,7 @@ int       RNA_enum_id_from_value(EnumPropertyItem *item, int value, const char **ident
 
 int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon)
 {
-       for ( ; item->identifier; item++) {
+       for (; item->identifier; item++) {
                if (item->value == value) {
                        *icon = item->icon;
                        return 1;
@@ -4342,8 +4343,8 @@ int RNA_enum_icon_from_value(EnumPropertyItem *item, int value, int *icon)
 
 int RNA_enum_name_from_value(EnumPropertyItem *item, int value, const char **name)
 {
-       for; item->identifier; item++) {
-               if(item->value==value) {
+       for (; item->identifier; item++) {
+               if (item->value == value) {
                        *name = item->name;
                        return 1;
                }
@@ -4523,7 +4524,7 @@ char *RNA_pointer_as_string(bContext *C, PointerRNA *ptr)
        
        BLI_dynstr_append(dynstr, "{");
        
-       RNA_STRUCT_BEGIN (ptr, prop)
+       RNA_STRUCT_BEGIN(ptr, prop)
        {
                propname = RNA_property_identifier(prop);
                
@@ -4567,7 +4568,7 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
        PropertyRNA *prop_default;
        char *buf_default;
 
-       RNA_PROP_BEGIN (ptr, propptr, iterprop)
+       RNA_PROP_BEGIN(ptr, propptr, iterprop)
        {
                prop = propptr.data;
 
@@ -4585,7 +4586,7 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
 
                if (as_function && (flag & PROP_REQUIRED)) {
                        /* required args don't have useful defaults */
-                       BLI_dynstr_appendf(dynstr, first_iter ? "%s":", %s", arg_name);
+                       BLI_dynstr_appendf(dynstr, first_iter ? "%s" : ", %s", arg_name);
                        first_iter = FALSE;
                }
                else {
@@ -4614,13 +4615,13 @@ char *RNA_pointer_as_string_keywords_ex(bContext *C, PointerRNA *ptr, PointerRNA
                                        buf_default = RNA_property_as_string(C, ptr_default, prop_default);
 
                                        if (strcmp(buf, buf_default) == 0)
-                                               ok = FALSE; /* values match, don't bother printing */
+                                               ok = FALSE;  /* values match, don't bother printing */
 
                                        MEM_freeN(buf_default);
                                }
                        }
                        if (ok) {
-                               BLI_dynstr_appendf(dynstr, first_iter ? "%s=%s":", %s=%s", arg_name, buf);
+                               BLI_dynstr_appendf(dynstr, first_iter ? "%s=%s" : ", %s=%s", arg_name, buf);
                                first_iter = FALSE;
                        }
 
@@ -4646,7 +4647,7 @@ char *RNA_pointer_as_string_keywords(bContext *C, PointerRNA *ptr, PointerRNA *p
 }
 
 char *RNA_function_as_string_keywords(bContext *C, FunctionRNA *func, PointerRNA *ptr_default,
-                                     const short as_function, const short all_args)
+                                      const short as_function, const short all_args)
 {
        PointerRNA funcptr;
        PropertyRNA *iterprop;
@@ -4673,144 +4674,144 @@ char *RNA_property_as_string(bContext *C, PointerRNA *ptr, PropertyRNA *prop)
 
        /* see if we can coorce into a python type - PropertyType */
        switch (type) {
-       case PROP_BOOLEAN:
-               if (len == 0) {
-                       BLI_dynstr_append(dynstr, RNA_property_boolean_get(ptr, prop) ? "True" : "False");
-               }
-               else {
-                       BLI_dynstr_append(dynstr, "(");
-                       for (i = 0; i<len; i++) {
-                               BLI_dynstr_appendf(dynstr, i ? ", %s" : "%s",
-                                                  RNA_property_boolean_get_index(ptr, prop, i) ? "True" : "False");
+               case PROP_BOOLEAN:
+                       if (len == 0) {
+                               BLI_dynstr_append(dynstr, RNA_property_boolean_get(ptr, prop) ? "True" : "False");
                        }
-                       if (len == 1)
-                               BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
-                       BLI_dynstr_append(dynstr, ")");
-               }
-               break;
-       case PROP_INT:
-               if (len == 0) {
-                       BLI_dynstr_appendf(dynstr, "%d", RNA_property_int_get(ptr, prop));
-               }
-               else {
-                       BLI_dynstr_append(dynstr, "(");
-                       for (i = 0; i<len; i++) {
-                               BLI_dynstr_appendf(dynstr, i?", %d":"%d", RNA_property_int_get_index(ptr, prop, i));
+                       else {
+                               BLI_dynstr_append(dynstr, "(");
+                               for (i = 0; i < len; i++) {
+                                       BLI_dynstr_appendf(dynstr, i ? ", %s" : "%s",
+                                                          RNA_property_boolean_get_index(ptr, prop, i) ? "True" : "False");
+                               }
+                               if (len == 1)
+                                       BLI_dynstr_append(dynstr, ",");  /* otherwise python wont see it as a tuple */
+                               BLI_dynstr_append(dynstr, ")");
                        }
-                       if (len == 1)
-                               BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
-                       BLI_dynstr_append(dynstr, ")");
-               }
-               break;
-       case PROP_FLOAT:
-               if (len == 0) {
-                       BLI_dynstr_appendf(dynstr, "%g", RNA_property_float_get(ptr, prop));
-               }
-               else {
-                       BLI_dynstr_append(dynstr, "(");
-                       for (i = 0; i<len; i++) {
-                               BLI_dynstr_appendf(dynstr, i?", %g":"%g", RNA_property_float_get_index(ptr, prop, i));
+                       break;
+               case PROP_INT:
+                       if (len == 0) {
+                               BLI_dynstr_appendf(dynstr, "%d", RNA_property_int_get(ptr, prop));
                        }
-                       if (len == 1)
-                               BLI_dynstr_append(dynstr, ","); /* otherwise python wont see it as a tuple */
-                       BLI_dynstr_append(dynstr, ")");
+                       else {
+                               BLI_dynstr_append(dynstr, "(");
+                               for (i = 0; i < len; i++) {
+                                       BLI_dynstr_appendf(dynstr, i ? ", %d" : "%d", RNA_property_int_get_index(ptr, prop, i));
+                               }
+                               if (len == 1)
+                                       BLI_dynstr_append(dynstr, ",");  /* otherwise python wont see it as a tuple */
+                               BLI_dynstr_append(dynstr, ")");
+                       }
+                       break;
+               case PROP_FLOAT:
+                       if (len == 0) {
+                               BLI_dynstr_appendf(dynstr, "%g", RNA_property_float_get(ptr, prop));
+                       }
+                       else {
+                               BLI_dynstr_append(dynstr, "(");
+                               for (i = 0; i < len; i++) {
+                                       BLI_dynstr_appendf(dynstr, i ? ", %g" : "%g", RNA_property_float_get_index(ptr, prop, i));
+                               }
+                               if (len == 1)
+                                       BLI_dynstr_append(dynstr, ",");  /* otherwise python wont see it as a tuple */
+                               BLI_dynstr_append(dynstr, ")");
+                       }
+                       break;
+               case PROP_STRING:
+               {
+                       char *buf_esc;
+                       char *buf;
+                       int length;
+
+                       length = RNA_property_string_length(ptr, prop);
+                       buf = MEM_mallocN(sizeof(char) * (length + 1), "RNA_property_as_string");
+                       buf_esc = MEM_mallocN(sizeof(char) * (length * 2 + 1), "RNA_property_as_string esc");
+                       RNA_property_string_get(ptr, prop, buf);
+                       BLI_strescape(buf_esc, buf, length * 2 + 1);
+                       MEM_freeN(buf);
+                       BLI_dynstr_appendf(dynstr, "\"%s\"", buf_esc);
+                       MEM_freeN(buf_esc);
+                       break;
                }
-               break;
-       case PROP_STRING:
-       {
-               char *buf_esc;
-               char *buf;
-               int length;
-
-               length = RNA_property_string_length(ptr, prop);
-               buf = MEM_mallocN(sizeof(char)*(length+1), "RNA_property_as_string");
-               buf_esc = MEM_mallocN(sizeof(char)*(length*2+1), "RNA_property_as_string esc");
-               RNA_property_string_get(ptr, prop, buf);
-               BLI_strescape(buf_esc, buf, length*2+1);
-               MEM_freeN(buf);
-               BLI_dynstr_appendf(dynstr, "\"%s\"", buf_esc);
-               MEM_freeN(buf_esc);
-               break;
-       }
-       case PROP_ENUM:
-       {
-               /* string arrays don't exist */
-               const char *identifier;
-               int val = RNA_property_enum_get(ptr, prop);
-
-               if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
-                       /* represent as a python set */
-                       if (val) {
-                               EnumPropertyItem *item = NULL;
-                               int free;
-
-                               BLI_dynstr_append(dynstr, "{");
-
-                               RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
-                               if (item) {
-                                       short is_first = TRUE;
-                                       for (; item->identifier; item++) {
-                                               if (item->identifier[0] && item->value & val) {
-                                                       BLI_dynstr_appendf(dynstr, is_first ? "'%s'" : ", '%s'", item->identifier);
-                                                       is_first = FALSE;
+               case PROP_ENUM:
+               {
+                       /* string arrays don't exist */
+                       const char *identifier;
+                       int val = RNA_property_enum_get(ptr, prop);
+
+                       if (RNA_property_flag(prop) & PROP_ENUM_FLAG) {
+                               /* represent as a python set */
+                               if (val) {
+                                       EnumPropertyItem *item = NULL;
+                                       int free;
+
+                                       BLI_dynstr_append(dynstr, "{");
+
+                                       RNA_property_enum_items(C, ptr, prop, &item, NULL, &free);
+                                       if (item) {
+                                               short is_first = TRUE;
+                                               for (; item->identifier; item++) {
+                                                       if (item->identifier[0] && item->value & val) {
+                                                               BLI_dynstr_appendf(dynstr, is_first ? "'%s'" : ", '%s'", item->identifier);
+                                                               is_first = FALSE;
+                                                       }
                                                }
-                                       }
 
-                                       if (free) {
-                                               MEM_freeN(item);
+                                               if (free) {
+                                                       MEM_freeN(item);
+                                               }
                                        }
-                               }
 
-                               BLI_dynstr_append(dynstr, "}");
+                                       BLI_dynstr_append(dynstr, "}");
+                               }
+                               else {
+                                       /* annoying exception, don't confuse with dictionary syntax above: {} */
+                                       BLI_dynstr_append(dynstr, "set()");
+                               }
+                       }
+                       else if (RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) {
+                               BLI_dynstr_appendf(dynstr, "'%s'", identifier);
                        }
                        else {
-                               /* annoying exception, don't confuse with dictionary syntax above: {} */
-                               BLI_dynstr_append(dynstr, "set()");
+                               BLI_dynstr_append(dynstr, "'<UNKNOWN ENUM>'");
                        }
+                       break;
                }
-               else if (RNA_property_enum_identifier(C, ptr, prop, val, &identifier)) {
-                       BLI_dynstr_appendf(dynstr, "'%s'", identifier);
-               }
-               else {
-                       BLI_dynstr_append(dynstr, "'<UNKNOWN ENUM>'");
-               }
-               break;
-       }
-       case PROP_POINTER:
-       {
-               PointerRNA tptr = RNA_property_pointer_get(ptr, prop);
-               cstring = RNA_pointer_as_string(C, &tptr);
-               BLI_dynstr_append(dynstr, cstring);
-               MEM_freeN(cstring);
-               break;
-       }
-       case PROP_COLLECTION:
-       {
-               int first_time = 1;
-               CollectionPropertyIterator collect_iter;
-               BLI_dynstr_append(dynstr, "[");
-               
-               for (RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid;
-                    RNA_property_collection_next(&collect_iter)) {
-                       PointerRNA itemptr = collect_iter.ptr;
-                       
-                       if (first_time == 0)
-                               BLI_dynstr_append(dynstr, ", ");
-                       first_time = 0;
-                       
-                       /* now get every prop of the collection */
-                       cstring = RNA_pointer_as_string(C, &itemptr);
+               case PROP_POINTER:
+               {
+                       PointerRNA tptr = RNA_property_pointer_get(ptr, prop);
+                       cstring = RNA_pointer_as_string(C, &tptr);
                        BLI_dynstr_append(dynstr, cstring);
                        MEM_freeN(cstring);
+                       break;
                }
+               case PROP_COLLECTION:
+               {
+                       int first_time = 1;
+                       CollectionPropertyIterator collect_iter;
+                       BLI_dynstr_append(dynstr, "[");
+
+                       for (RNA_property_collection_begin(ptr, prop, &collect_iter); collect_iter.valid;
+                            RNA_property_collection_next(&collect_iter)) {
+                               PointerRNA itemptr = collect_iter.ptr;
+
+                               if (first_time == 0)
+                                       BLI_dynstr_append(dynstr, ", ");
+                               first_time = 0;
+
+                               /* now get every prop of the collection */
+                               cstring = RNA_pointer_as_string(C, &itemptr);
+                               BLI_dynstr_append(dynstr, cstring);
+                               MEM_freeN(cstring);
+                       }
                
-               RNA_property_collection_end(&collect_iter);
-               BLI_dynstr_append(dynstr, "]");
-               break;
-       }
-       default:
-               BLI_dynstr_append(dynstr, "'<UNKNOWN TYPE>'"); /* TODO */
-               break;
+                       RNA_property_collection_end(&collect_iter);
+                       BLI_dynstr_append(dynstr, "]");
+                       break;
+               }
+               default:
+                       BLI_dynstr_append(dynstr, "'<UNKNOWN TYPE>'"); /* TODO */
+                       break;
        }
 
        cstring = BLI_dynstr_get_cstring(dynstr);
@@ -4850,8 +4851,7 @@ PropertyRNA *RNA_function_find_parameter(PointerRNA *UNUSED(ptr), FunctionRNA *f
        return BLI_findstring(&func->cont.properties, identifier, offsetof(PropertyRNA, identifier));
 }
 
-const struct ListBase *RNA_function_defined_parameters(FunctionRNA *func)
-{
+const struct ListBase *RNA_function_defined_parameters(FunctionRNA *func){
        return &func->cont.properties;
 }
 
@@ -4896,22 +4896,22 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
                if (!(parm->flag & PROP_REQUIRED) && !(parm->flag & PROP_DYNAMIC)) {
                        switch (parm->type) {
                                case PROP_BOOLEAN:
-                                       if (parm->arraydimension) memcpy(data, ((BoolPropertyRNA*)parm)->defaultarray, size);
-                                       else memcpy(data, &((BoolPropertyRNA*)parm)->defaultvalue, size);
+                                       if (parm->arraydimension) memcpy(data, ((BoolPropertyRNA *)parm)->defaultarray, size);
+                                       else memcpy(data, &((BoolPropertyRNA *)parm)->defaultvalue, size);
                                        break;
                                case PROP_INT:
-                                       if (parm->arraydimension) memcpy(data, ((IntPropertyRNA*)parm)->defaultarray, size);
-                                       else memcpy(data, &((IntPropertyRNA*)parm)->defaultvalue, size);
+                                       if (parm->arraydimension) memcpy(data, ((IntPropertyRNA *)parm)->defaultarray, size);
+                                       else memcpy(data, &((IntPropertyRNA *)parm)->defaultvalue, size);
                                        break;
                                case PROP_FLOAT:
-                                       if (parm->arraydimension) memcpy(data, ((FloatPropertyRNA*)parm)->defaultarray, size);
-                                       else memcpy(data, &((FloatPropertyRNA*)parm)->defaultvalue, size);
+                                       if (parm->arraydimension) memcpy(data, ((FloatPropertyRNA *)parm)->defaultarray, size);
+                                       else memcpy(data, &((FloatPropertyRNA *)parm)->defaultvalue, size);
                                        break;
                                case PROP_ENUM:
-                                       memcpy(data, &((EnumPropertyRNA*)parm)->defaultvalue, size);
+                                       memcpy(data, &((EnumPropertyRNA *)parm)->defaultvalue, size);
                                        break;
                                case PROP_STRING: {
-                                       const char *defvalue = ((StringPropertyRNA*)parm)->defaultvalue;
+                                       const char *defvalue = ((StringPropertyRNA *)parm)->defaultvalue;
                                        if (defvalue && defvalue[0]) {
                                                /* causes bug [#29988], possibly this is only correct for thick wrapped
                                                 * need to look further into it - campbell */
@@ -4929,7 +4929,7 @@ ParameterList *RNA_parameter_list_create(ParameterList *parms, PointerRNA *UNUSE
                        }
                }
 
-               data = ((char*)data) + rna_parameter_size_alloc(parm);
+               data = ((char *)data) + rna_parameter_size_alloc(parm);
        }
 
        return parms;
@@ -4943,7 +4943,7 @@ void RNA_parameter_list_free(ParameterList *parms)
        parm = parms->func->cont.properties.first;
        for (tot = 0; parm; parm = parm->next) {
                if (parm->type == PROP_COLLECTION)
-                       BLI_freelistN((ListBase*)((char*)parms->data+tot));
+                       BLI_freelistN((ListBase *)((char *)parms->data + tot));
                else if (parm->flag & PROP_DYNAMIC) {
                        /* for dynamic arrays and strings, data is a pointer to an array */
                        ParameterDynAlloc *data_alloc = (void *)(((char *)parms->data) + tot);
@@ -4987,7 +4987,7 @@ void RNA_parameter_list_begin(ParameterList *parms, ParameterIterator *iter)
 
        if (iter->valid) {
                iter->size = rna_parameter_size_alloc(iter->parm);
-               iter->data = (((char*)iter->parms->data)); /* +iter->offset, always 0 */
+               iter->data = (((char *)iter->parms->data)); /* +iter->offset, always 0 */
        }
 }
 
@@ -4999,7 +4999,7 @@ void RNA_parameter_list_next(ParameterIterator *iter)
 
        if (iter->valid) {
                iter->size = rna_parameter_size_alloc(iter->parm);
-               iter->data = (((char*)iter->parms->data)+iter->offset);
+               iter->data = (((char *)iter->parms->data) + iter->offset);
        }
 }
 
@@ -5180,11 +5180,11 @@ static int rna_function_format_array_length(const char *format, int ofs, int fle
        char lenbuf[16];
        int idx = 0;
 
-       if (format[ofs++] =='[')
-               for (; ofs<flen && format[ofs] !=']' && idx<sizeof(*lenbuf)-1; idx++, ofs++)
+       if (format[ofs++] == '[')
+               for (; ofs < flen && format[ofs] != ']' && idx < sizeof(*lenbuf) - 1; idx++, ofs++)
                        lenbuf[idx] = format[ofs];
 
-       if (ofs<flen && format[ofs+1] ==']') {
+       if (ofs < flen && format[ofs + 1] == ']') {
                /* XXX put better error reporting for ofs>=flen or idx over lenbuf capacity */
                lenbuf[idx] = '\0';
                return atoi(lenbuf);
@@ -5200,75 +5200,75 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
        /* ptr is always a function pointer, prop always a parameter */
 
        switch (type) {
-       case PROP_BOOLEAN:
+               case PROP_BOOLEAN:
                {
-                       if (ftype !='b') {
+                       if (ftype != 'b') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, a boolean was expected\n", tid, fid, pid);
                                return -1;
                        }
 
                        if (len == 0)
-                               *((int*)dest) = *((int*)src);
+                               *((int *)dest) = *((int *)src);
                        else
-                               memcpy(dest, src, len*sizeof(int));
+                               memcpy(dest, src, len * sizeof(int));
 
                        break;
                }
-       case PROP_INT:
+               case PROP_INT:
                {
-                       if (ftype !='i') {
+                       if (ftype != 'i') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, an integer was expected\n", tid, fid, pid);
                                return -1;
                        }
 
                        if (len == 0)
-                               *((int*)dest) = *((int*)src);
+                               *((int *)dest) = *((int *)src);
                        else
-                               memcpy(dest, src, len*sizeof(int));
+                               memcpy(dest, src, len * sizeof(int));
 
                        break;
                }
-       case PROP_FLOAT:
+               case PROP_FLOAT:
                {
-                       if (ftype !='f') {
+                       if (ftype != 'f') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, a float was expected\n", tid, fid, pid);
                                return -1;
                        }
 
                        if (len == 0)
-                               *((float*)dest) = *((float*)src);
+                               *((float *)dest) = *((float *)src);
                        else
-                               memcpy(dest, src, len*sizeof(float));
+                               memcpy(dest, src, len * sizeof(float));
 
                        break;
                }
-       case PROP_STRING:
+               case PROP_STRING:
                {
-                       if (ftype !='s') {
+                       if (ftype != 's') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, a string was expected\n", tid, fid, pid);
                                return -1;
                        }
 
-                       *((char**)dest) = *((char**)src);
+                       *((char **)dest) = *((char **)src);
 
                        break;
                }
-       case PROP_ENUM:
+               case PROP_ENUM:
                {
-                       if (ftype !='e') {
+                       if (ftype != 'e') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, an enum was expected\n", tid, fid, pid);
                                return -1;
                        }
 
-                       *((int*)dest) = *((int*)src);
+                       *((int *)dest) = *((int *)src);
 
                        break;
                }
-       case PROP_POINTER:
+               case PROP_POINTER:
                {
                        StructRNA *ptype;
 
-                       if (ftype !='O') {
+                       if (ftype != 'O') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, an object was expected\n", tid, fid, pid);
                                return -1;
                        }
@@ -5276,9 +5276,9 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
                        ptype = RNA_property_pointer_type(ptr, prop);
 
                        if (prop->flag & PROP_RNAPTR) {
-                               *((PointerRNA*)dest) = *((PointerRNA*)src);
+                               *((PointerRNA *)dest) = *((PointerRNA *)src);
                                break;
-                        }
+                       }
                        
                        if (ptype != srna && !RNA_struct_is_a(srna, ptype)) {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, "
@@ -5287,18 +5287,18 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
                                return -1;
                        }
  
-                       *((void**)dest) = *((void**)src);
+                       *((void **)dest) = *((void **)src);
 
                        break;
                }
-       case PROP_COLLECTION:
+               case PROP_COLLECTION:
                {
                        StructRNA *ptype;
                        ListBase *lb, *clb;
                        Link *link;
                        CollectionPointerLink *clink;
 
-                       if (ftype !='C') {
+                       if (ftype != 'C') {
                                fprintf(stderr, "%s.%s: wrong type for parameter %s, a collection was expected\n", tid, fid, pid);
                                return -1;
                        }
@@ -5323,7 +5323,7 @@ static int rna_function_parameter_parse(PointerRNA *ptr, PropertyRNA *prop, Prop
 
                        break;
                }
-       default:
+               default:
                {
                        if (len == 0)
                                fprintf(stderr, "%s.%s: unknown type for parameter %s\n", tid, fid, pid);
@@ -5374,7 +5374,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
 
                pid = RNA_property_identifier(parm);
 
-               if (ofs >= flen || format[ofs] =='N') {
+               if (ofs >= flen || format[ofs] == 'N') {
                        if (flag & PROP_REQUIRED) {
                                err = -1;
                                fprintf(stderr, "%s.%s: missing required parameter %s\n", tid, fid, pid);
@@ -5399,46 +5399,46 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
                }
 
                switch (type) {
-               case PROP_BOOLEAN:
-               case PROP_INT:
-               case PROP_ENUM:
+                       case PROP_BOOLEAN:
+                       case PROP_INT:
+                       case PROP_ENUM:
                        {
                                int arg = va_arg(args, int);
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg,
                                                                   NULL, tid, fid, pid);
                                break;
                        }
-               case PROP_FLOAT:
+                       case PROP_FLOAT:
                        {
                                double arg = va_arg(args, double);
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg,
                                                                   NULL, tid, fid, pid);
                                break;
                        }
-               case PROP_STRING:
+                       case PROP_STRING:
                        {
-                               char *arg = va_arg(args, char*);
+                               char *arg = va_arg(args, char *);
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg,
                                                                   NULL, tid, fid, pid);
                                break;
                        }
-               case PROP_POINTER:
+                       case PROP_POINTER:
                        {
-                               StructRNA *srna = va_arg(args, StructRNA*);
-                               void *arg = va_arg(args, void*);
+                               StructRNA *srna = va_arg(args, StructRNA *);
+                               void *arg = va_arg(args, void *);
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg,
                                                                   srna, tid, fid, pid);
                                break;
                        }
-               case PROP_COLLECTION:
+                       case PROP_COLLECTION:
                        {
-                               StructRNA *srna = va_arg(args, StructRNA*);
-                               ListBase *arg = va_arg(args, ListBase*);
+                               StructRNA *srna = va_arg(args, StructRNA *);
+                               ListBase *arg = va_arg(args, ListBase *);
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, &arg,
                                                                   srna, tid, fid, pid);
                                break;
                        }
-               default:
+                       default:
                        {
                                /* handle errors */
                                err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, iter.data, NULL,
@@ -5455,7 +5455,7 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
                err = RNA_function_call(C, reports, ptr, func, &parms);
 
        /* XXX throw error when more parameters than those needed are passed or leave silent? */
-       if (err == 0 && pret && ofs<flen && format[ofs++] =='R') {
+       if (err == 0 && pret && ofs < flen && format[ofs++] == 'R') {
                parm = pret;
 
                type = RNA_property_type(parm);
@@ -5471,46 +5471,46 @@ int RNA_function_call_direct_va(bContext *C, ReportList *reports, PointerRNA *pt
                }
                else {
                        switch (type) {
-                       case PROP_BOOLEAN:
-                       case PROP_INT:
-                       case PROP_ENUM:
+                               case PROP_BOOLEAN:
+                               case PROP_INT:
+                               case PROP_ENUM:
                                {
-                                       int *arg = va_arg(args, int*);
+                                       int *arg = va_arg(args, int *);
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
                                                                           NULL, tid, fid, pid);
                                        break;
                                }
-                       case PROP_FLOAT:
+                               case PROP_FLOAT:
                                {
-                                       float *arg = va_arg(args, float*);
+                                       float *arg = va_arg(args, float *);
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
                                                                           NULL, tid, fid, pid);
                                        break;
                                }
-                       case PROP_STRING:
+                               case PROP_STRING:
                                {
-                                       char **arg = va_arg(args, char**);
+                                       char **arg = va_arg(args, char **);
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
                                                                           NULL, tid, fid, pid);
                                        break;
                                }
-                       case PROP_POINTER:
+                               case PROP_POINTER:
                                {
-                                       StructRNA *srna = va_arg(args, StructRNA*);
-                                       void **arg = va_arg(args, void**);
+                                       StructRNA *srna = va_arg(args, StructRNA *);
+                                       void **arg = va_arg(args, void **);
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
                                                                           srna, tid, fid, pid);
                                        break;
                                }
-                       case PROP_COLLECTION:
+                               case PROP_COLLECTION:
                                {
-                                       StructRNA *srna = va_arg(args, StructRNA*);
-                                       ListBase **arg = va_arg(args, ListBase**);
+                                       StructRNA *srna = va_arg(args, StructRNA *);
+                                       ListBase **arg = va_arg(args, ListBase * *);
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, arg, retdata,
                                                                           srna, tid, fid, pid);
                                        break;
                                }
-                       default:
+                               default:
                                {
                                        /* handle errors */
                                        err = rna_function_parameter_parse(&funcptr, parm, type, ftype, len, NULL, NULL,
@@ -5552,7 +5552,7 @@ int RNA_property_reset(PointerRNA *ptr, PropertyRNA *prop, int index)
                case PROP_BOOLEAN:
                        if (len)