whitespace only, no functional change mixed tabs/spaces --> tabs.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 21 Apr 2011 13:11:51 +0000 (13:11 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 21 Apr 2011 13:11:51 +0000 (13:11 +0000)
87 files changed:
intern/guardedalloc/intern/mallocn.c
intern/guardedalloc/intern/mmap_win.c
release/plugins/sequence/color-correction-hsv.c
release/plugins/sequence/color-correction-yuv.c
release/plugins/sequence/dnr.c
release/plugins/sequence/scatter.c
release/windows/contrib/vfapi/vfapi-plugin.c
source/blender/avi/intern/avi.c
source/blender/avi/intern/codecs.c
source/blender/blenkernel/intern/brush.c
source/blender/blenkernel/intern/colortools.c
source/blender/blenkernel/intern/deform.c
source/blender/blenkernel/intern/depsgraph.c
source/blender/blenkernel/intern/exotic.c
source/blender/blenkernel/intern/image_gen.c
source/blender/blenkernel/intern/material.c
source/blender/blenkernel/intern/mball.c
source/blender/blenkernel/intern/mesh.c
source/blender/blenkernel/intern/particle.c
source/blender/blenkernel/intern/particle_system.c
source/blender/blenkernel/intern/pointcache.c
source/blender/blenkernel/intern/report.c
source/blender/blenkernel/intern/sca.c
source/blender/blenkernel/intern/scene.c
source/blender/blenkernel/intern/subsurf_ccg.c
source/blender/blenlib/intern/math_color.c
source/blender/blenlib/intern/math_geom.c
source/blender/blenlib/intern/pbvh.c
source/blender/blenlib/intern/string.c
source/blender/blenloader/intern/readfile.c
source/blender/editors/animation/keyframes_general.c
source/blender/editors/armature/meshlaplacian.c
source/blender/editors/curve/editcurve.c
source/blender/editors/interface/interface.c
source/blender/editors/interface/interface_layout.c
source/blender/editors/object/object_group.c
source/blender/editors/object/object_vgroup.c
source/blender/editors/physics/particle_edit.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_console/space_console.c
source/blender/editors/space_file/file_ops.c
source/blender/editors/space_file/filesel.c
source/blender/editors/space_logic/logic_window.c
source/blender/editors/space_node/drawnode.c
source/blender/editors/space_node/node_edit.c
source/blender/editors/space_sequencer/sequencer_edit.c
source/blender/editors/space_view3d/view3d_draw.c
source/blender/editors/space_view3d/view3d_edit.c
source/blender/editors/space_view3d/view3d_fly.c
source/blender/editors/space_view3d/view3d_select.c
source/blender/editors/transform/transform_conversions.c
source/blender/editors/uvedit/uvedit_ops.c
source/blender/editors/uvedit/uvedit_parametrizer.c
source/blender/editors/uvedit/uvedit_unwrap_ops.c
source/blender/gpu/intern/gpu_draw.c
source/blender/gpu/intern/gpu_extensions.c
source/blender/imbuf/intern/anim_movie.c
source/blender/imbuf/intern/scaling.c
source/blender/makesdna/intern/makesdna.c
source/blender/makesrna/intern/rna_actuator.c
source/blender/makesrna/intern/rna_constraint.c
source/blender/makesrna/intern/rna_fcurve.c
source/blender/makesrna/intern/rna_object.c
source/blender/makesrna/intern/rna_object_force.c
source/blender/makesrna/intern/rna_sensor.c
source/blender/makesrna/intern/rna_space.c
source/blender/makesrna/intern/rna_userdef.c
source/blender/makesrna/intern/rna_wm.c
source/blender/nodes/intern/CMP_nodes/CMP_chromaMatte.c
source/blender/nodes/intern/CMP_nodes/CMP_crop.c
source/blender/nodes/intern/CMP_nodes/CMP_math.c
source/blender/nodes/intern/CMP_nodes/CMP_rotate.c
source/blender/nodes/intern/CMP_nodes/CMP_sepcombHSVA.c
source/blender/nodes/intern/TEX_nodes/TEX_math.c
source/blender/nodes/intern/TEX_util.c
source/blender/python/generic/bgl.c
source/blender/python/intern/bpy.c
source/blender/python/intern/bpy_driver.c
source/blender/python/intern/bpy_interface.c
source/blender/python/intern/bpy_traceback.c
source/blender/render/intern/source/convertblender.c
source/blender/render/intern/source/pixelblending.c
source/blender/render/intern/source/render_texture.c
source/blender/render/intern/source/shadeinput.c
source/blender/render/intern/source/sunsky.c
source/blender/render/intern/source/volume_precache.c
source/creator/creator.c

index f1c9f9e636309eb98299a637a7c1b3dbee7226c5..caf551c84d829dd3410332219092152ae16aa3c7 100644 (file)
@@ -373,7 +373,7 @@ void *MEM_mapallocN(size_t len, const char *str)
          fd = open("/dev/zero", O_RDWR);
 
          memh= mmap(0, len+sizeof(MemHead)+sizeof(MemTail),
-                    PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
+                       PROT_READ|PROT_WRITE, MAP_SHARED, fd, 0);
          close(fd);
        }
 #else
@@ -698,26 +698,26 @@ static void remlink(volatile localListBase *listbase, void *vlink)
 
 static void rem_memblock(MemHead *memh)
 {
-    remlink(membase,&memh->next);
-    if (memh->prev) {
-        if (memh->next) 
+       remlink(membase,&memh->next);
+       if (memh->prev) {
+               if (memh->next)
                        MEMNEXT(memh->prev)->nextname = MEMNEXT(memh->next)->name;
-        else 
+               else
                        MEMNEXT(memh->prev)->nextname = NULL;
-    }
-
-    totblock--;
-    mem_in_use -= memh->len;
-   
-    if(memh->mmap) {
-        mmap_in_use -= memh->len;
-        if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
-            printf("Couldn't unmap memory %s\n", memh->name);
-    }  
+       }
+
+       totblock--;
+       mem_in_use -= memh->len;
+
+       if(memh->mmap) {
+               mmap_in_use -= memh->len;
+               if (munmap(memh, memh->len + sizeof(MemHead) + sizeof(MemTail)))
+                       printf("Couldn't unmap memory %s\n", memh->name);
+       }
        else {
                if(malloc_debug_memset && memh->len)
                        memset(memh+1, 255, memh->len);
-        free(memh);
+               free(memh);
        }
 }
 
index 3b366ae76747e04a694bce438105c80aaa92c640..24b48d713efbc27132c875711e8f2e8df4a71b26 100644 (file)
@@ -114,7 +114,7 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
        /*
        if ( fd == -1 ) {
                _set_errno( EBADF );
-        return MAP_FAILED;
+               return MAP_FAILED;
        }
        */
 
@@ -128,16 +128,16 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
                }
        } else {
                if ( !DuplicateHandle( GetCurrentProcess(), fhandle, GetCurrentProcess(),
-                                                       &fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
+               &fhandle, 0, FALSE, DUPLICATE_SAME_ACCESS ) ) {
                        return MAP_FAILED;
                }
        }
 
        maphandle = CreateFileMapping(fhandle, NULL, prot_flags, 0, len, NULL);
        if ( maphandle == 0 ) {
-        errno = EBADF;
+               errno = EBADF;
                return MAP_FAILED;
-    }
+       }
 
        ptr = MapViewOfFile(maphandle, access_flags, 0, offset, 0);
        if ( ptr == NULL ) {
@@ -159,7 +159,7 @@ void *mmap(void *UNUSED(start), size_t len, int prot, int flags, int fd, off_t o
        mm->mmap = ptr;
        mmap_addtail(mmapbase, mm);
 
-    return ptr;
+       return ptr;
 }
 
 /* munmap for windows */
@@ -168,14 +168,14 @@ intptr_t munmap(void *ptr, intptr_t UNUSED(size))
        MemMap *mm = mmap_findlink(mmapbase, ptr);
        if (!mm) {
                errno=EINVAL;
-        return -1; 
+               return -1;
        }
        UnmapViewOfFile( mm->mmap );
        CloseHandle( mm->maphandle );
        CloseHandle( mm->fhandle);
        mmap_remlink(mmapbase, mm);
        free(mm);
-    return 0;
+       return 0;
 }
 
 /* --------------------------------------------------------------------- */
@@ -233,16 +233,16 @@ static int mmap_get_prot_flags (int flags)
        int prot = PAGE_NOACCESS;
 
        if ( ( flags & PROT_READ ) == PROT_READ ) {
-        if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
-            prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
+               if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+                       prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READWRITE : PAGE_READWRITE;
                } else {
                        prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_READONLY;
                }
-    } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+       } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
                prot = (flags & PROT_EXEC) ? PAGE_EXECUTE_READ : PAGE_WRITECOPY;
-    } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
-        prot = PAGE_EXECUTE_READ;
-    }
+       } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
+               prot = PAGE_EXECUTE_READ;
+       }
        return prot;
 }
 
@@ -251,16 +251,16 @@ static int mmap_get_access_flags (int flags)
        int access = 0;
 
        if ( ( flags & PROT_READ ) == PROT_READ ) {
-        if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
-            access = FILE_MAP_WRITE;
+               if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+                       access = FILE_MAP_WRITE;
                } else {
                        access = (flags & PROT_EXEC) ? FILE_MAP_EXECUTE : FILE_MAP_READ;
                }
-    } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
+       } else if ( ( flags & PROT_WRITE ) == PROT_WRITE ) {
                access = FILE_MAP_COPY;
-    } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
-        access = FILE_MAP_EXECUTE;
-    }
+       } else if ( ( flags & PROT_EXEC ) == PROT_EXEC ) {
+               access = FILE_MAP_EXECUTE;
+       }
        return access;
 }
 
index cff2f1aad82cb0cf05c78461d086a4a673abc3f8..1ee58e256d22e418be3524ff7e4d5c0099cac0bf 100644 (file)
@@ -196,7 +196,7 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
        src1f= ibuf1->rect_float;
 
        for (y = 0; y < 256; y++) {
-               float v = 1.0 * y / 255;
+               float v = 1.0 * y / 255;
                v += cast->setup_y;
                v *= cast->gain_y;
                v = pow(v, cast->gamma_y);
index b80489f3b0bbf5f95bcb142e46d73a51b5300a46..1a78fc7d4b6beb4280a5476a91a1d25bb3d0e55f 100644 (file)
@@ -129,7 +129,7 @@ void plugin_seq_doit(Cast *cast, float facf0, float facf1, int width,
        src1f= ibuf1->rect_float;
 
        for (y = 0; y < 256; y++) {
-               float v = 1.0 * y / 255;
+               float v = 1.0 * y / 255;
                v += cast->setup_y;
                v *= cast->gain_y;
                v = pow(v, cast->gamma_y);
index b6a99de0622fc315e5d6874984f22b1d5c7707b2..606ec19ef417391b1c4f1afbfb71813693bf0b69 100644 (file)
@@ -66,7 +66,7 @@ static void precalculate(unsigned char * table, int level)
                        }
                
                        *table++ = ap;
-                }
+               }
        }
 }
 
index ac4346c1a448dd154cc5951b36668a1af1ee442e..4741b33ce0ee1aad461f05b9ec67ed72490c4971 100644 (file)
@@ -193,9 +193,9 @@ static void fill_out(ImBuf *out, float r, float g, float b, float a)
        } else {
                for (x=0;x < tot;x++) {
                        rect[0] = (int)(r * 255);
-                       rect[1] = (int)(g * 255);
-                               rect[2] = (int)(b * 255);
-                               rect[3] = (int)(a * 255);
+                       rect[1] = (int)(g * 255);
+                       rect[2] = (int)(b * 255);
+                       rect[3] = (int)(a * 255);
                        rect += 4;
                }
        }
index c54f8234d2d86a009c01379634859381af442f5e..81547b8bb1a4551c69c8fdaaaf3c5fbbb8a9d55e 100644 (file)
@@ -114,17 +114,17 @@ __declspec(dllexport) HRESULT vfGetPluginInfo(
 
 static unsigned long getipaddress(const char * ipaddr)
 {
-        struct hostent  *host;
-        unsigned long   ip;
+       struct hostent  *host;
+       unsigned long   ip;
 
-        if (((ip = inet_addr(ipaddr)) == INADDR_NONE)
-            && strcmp(ipaddr, "255.255.255.255") != 0) {
-                if ((host = gethostbyname(ipaddr)) != NULL) {
-                        memcpy(&ip, host->h_addr, sizeof(ip));
-                }
-        }
+       if (((ip = inet_addr(ipaddr)) == INADDR_NONE)
+       && strcmp(ipaddr, "255.255.255.255") != 0) {
+               if ((host = gethostbyname(ipaddr)) != NULL) {
+                       memcpy(&ip, host->h_addr, sizeof(ip));
+               }
+       }
 
-        return (ip);
+       return (ip);
 }
 
 static void my_send(SOCKET sock, char * str)
@@ -363,12 +363,12 @@ HRESULT __stdcall VF_ReadDataFunc_Blen(
        } while (strcmp(buf, "P6\n") != 0);
 
        do {
-                rval = my_gets(s_in, buf, 256); 
-        } while ( (buf[0] == '#' || buf[0] == '\n') && rval >= 0);
+               rval = my_gets(s_in, buf, 256);
+       } while ( (buf[0] == '#' || buf[0] == '\n') && rval >= 0);
 
-        if (sscanf(buf, "%d %d\n", &width, &height) != 2) {
+       if (sscanf(buf, "%d %d\n", &width, &height) != 2) {
                goto errout;
-        }
+       }
 
        if (width != c->width || height != c->height) {
                goto errout;
index ce414cd15fe054c4710a8d383b2db24048921bda..82bf3a3d21b76b9edc1a4190c059b24bdb0a783e 100644 (file)
@@ -402,7 +402,7 @@ int AVI_is_avi (const char *name) {
 
        /* at least one video track is needed */
        return (movie_tracks != 0); 
-                                      
+
 }
 
 AviError AVI_open_movie (const char *name, AviMovie *movie) {
index 47a5fc192fdabc07cdb2d0237bb7a0b5d3852de4..9d3da333957611ca994e0ce7f223d98d5d5a1ae8 100644 (file)
 #include "rgb32.h"
 
 void *avi_format_convert (AviMovie *movie, int stream, void *buffer, AviFormat from, AviFormat to, int *size) {
-  if (from == to)
-       return buffer;
-    
-  if (from != AVI_FORMAT_RGB24 &&
-         to != AVI_FORMAT_RGB24)
-       return avi_format_convert(movie, stream, 
-                                 avi_format_convert (movie, stream, buffer, from, AVI_FORMAT_RGB24, size), 
-                                 AVI_FORMAT_RGB24, to, size);
-  
-  switch (to) {
-  case AVI_FORMAT_RGB24:
-       switch (from) {
+       if (from == to)
+               return buffer;
+
+       if (from != AVI_FORMAT_RGB24 &&
+       to != AVI_FORMAT_RGB24)
+               return avi_format_convert(movie, stream,
+               avi_format_convert (movie, stream, buffer, from, AVI_FORMAT_RGB24, size),
+               AVI_FORMAT_RGB24, to, size);
+
+       switch (to) {
+       case AVI_FORMAT_RGB24:
+               switch (from) {
+               case AVI_FORMAT_AVI_RGB:
+                       buffer = avi_converter_from_avi_rgb (movie, stream, buffer, size);
+                       break;
+               case AVI_FORMAT_MJPEG:
+                       buffer = avi_converter_from_mjpeg (movie, stream, buffer, size);
+                       break;
+               case AVI_FORMAT_RGB32:
+                       buffer = avi_converter_from_rgb32 (movie, stream, buffer, size);
+                       break;
+               default:
+                       break;
+               }
+               break;
        case AVI_FORMAT_AVI_RGB:
-         buffer = avi_converter_from_avi_rgb (movie, stream, buffer, size);
-         break;
+               buffer = avi_converter_to_avi_rgb (movie, stream, buffer, size);
+               break;
        case AVI_FORMAT_MJPEG:
-         buffer = avi_converter_from_mjpeg (movie, stream, buffer, size);
-         break;
+               buffer = avi_converter_to_mjpeg (movie, stream, buffer, size);
+               break;
        case AVI_FORMAT_RGB32:
-         buffer = avi_converter_from_rgb32 (movie, stream, buffer, size);
-         break;
+               buffer = avi_converter_to_rgb32 (movie, stream, buffer, size);
+               break;
        default:
-         break;
+               break;
        }
-       break;
-  case AVI_FORMAT_AVI_RGB:
-       buffer = avi_converter_to_avi_rgb (movie, stream, buffer, size);
-       break;
-  case AVI_FORMAT_MJPEG:
-       buffer = avi_converter_to_mjpeg (movie, stream, buffer, size);
-       break;
-  case AVI_FORMAT_RGB32:
-       buffer = avi_converter_to_rgb32 (movie, stream, buffer, size);
-       break;
-  default:
-       break;
-  }
 
-  return buffer;
+       return buffer;
 }
 
 int avi_get_data_id (AviFormat format, int stream) {
-  char fcc[5];
+       char fcc[5];
 
-  if (avi_get_format_type (format) == FCC("vids"))
-       sprintf (fcc,"%2.2ddc",stream);
-  else if (avi_get_format_type (format) == FCC("auds"))
-       sprintf (fcc,"%2.2ddc",stream);
-  else
-       return 0;
+       if (avi_get_format_type (format) == FCC("vids"))
+               sprintf (fcc,"%2.2ddc",stream);
+       else if (avi_get_format_type (format) == FCC("auds"))
+               sprintf (fcc,"%2.2ddc",stream);
+       else
+               return 0;
 
-  return FCC(fcc);
+       return FCC(fcc);
 }
 
 int avi_get_format_type (AviFormat format) {
-  switch (format) {
-  case AVI_FORMAT_RGB24:
-  case AVI_FORMAT_RGB32:
-  case AVI_FORMAT_AVI_RGB:
-  case AVI_FORMAT_MJPEG:
-       return FCC("vids");
-       break;
-  default:
-       return 0;
-       break;
-  }
+       switch (format) {
+       case AVI_FORMAT_RGB24:
+       case AVI_FORMAT_RGB32:
+       case AVI_FORMAT_AVI_RGB:
+       case AVI_FORMAT_MJPEG:
+               return FCC("vids");
+               break;
+       default:
+               return 0;
+               break;
+       }
 }
 
 int avi_get_format_fcc (AviFormat format) {
-  switch (format) {
-  case AVI_FORMAT_RGB24:
-  case AVI_FORMAT_RGB32:
-  case AVI_FORMAT_AVI_RGB:
-       return FCC("DIB ");
-       break;
-  case AVI_FORMAT_MJPEG:
-       return FCC("MJPG");
-       break;
-  default:
-       return 0;
-       break;
-  }
+       switch (format) {
+       case AVI_FORMAT_RGB24:
+       case AVI_FORMAT_RGB32:
+       case AVI_FORMAT_AVI_RGB:
+               return FCC("DIB ");
+               break;
+       case AVI_FORMAT_MJPEG:
+               return FCC("MJPG");
+               break;
+       default:
+               return 0;
+               break;
+       }
 }
 
 int avi_get_format_compression (AviFormat format) {
-  switch (format) {
-  case AVI_FORMAT_RGB24:
-  case AVI_FORMAT_RGB32:
-  case AVI_FORMAT_AVI_RGB:
-       return 0;
-       break;
-  case AVI_FORMAT_MJPEG:
-       return FCC("MJPG");
-       break;
-  default:
-       return 0;
-       break;
-  }
+       switch (format) {
+       case AVI_FORMAT_RGB24:
+       case AVI_FORMAT_RGB32:
+       case AVI_FORMAT_AVI_RGB:
+               return 0;
+               break;
+       case AVI_FORMAT_MJPEG:
+               return FCC("MJPG");
+               break;
+       default:
+               return 0;
+               break;
+       }
 }
index 96b6ec357f9c3fe3efcb63032cd4c947624eaaf5..ac532cca7c6039df165ae1974a8cfdfe9ee6f8eb 100644 (file)
@@ -1119,12 +1119,12 @@ float brush_curve_strength_clamp(Brush *br, float p, const float len)
  * used for sculpt only */
 float brush_curve_strength(Brush *br, float p, const float len)
 {
-    if(p >= len)
-        p= 1.0f;
-    else
-        p= p/len;
+       if(p >= len)
+               p= 1.0f;
+       else
+               p= p/len;
 
-    return curvemapping_evaluateF(br->curve, 0, p);
+       return curvemapping_evaluateF(br->curve, 0, p);
 }
 
 /* TODO: should probably be unified with BrushPainter stuff? */
index 46f3e124bcc4f412d931df579ccd1d9cc5198fc9..1d7481b365a472601a391f229741926e985c7876 100644 (file)
@@ -793,7 +793,7 @@ void curvemapping_evaluate_premulRGBF(CurveMapping *cumap, float *vecout, const
 /* basic error handler, if we dont do this blender will exit */
 static int ErrorReportingFunction(int ErrorCode, const char *ErrorText)
 {
-    fprintf(stderr, "%s:%d\n", ErrorText, ErrorCode);
+       fprintf(stderr, "%s:%d\n", ErrorText, ErrorCode);
        return 1;
 }
 #endif
index a81dcfb990f3a2e7d059205b0cbe081788d32a48..884d6313c26b767369e0de8d41b47e269cf11891 100644 (file)
@@ -254,7 +254,6 @@ int defgroup_find_index (Object *ob, bDeformGroup *dg)
        if (eg == NULL) return -1;
        
        return def_nr;
-    
 }
 
 /* note, must be freed */
index ff49c64ebf41e5c0001d069af8c9ced68645dfc5..170b4c234466663922a74f688f645bc500dd13a9 100644 (file)
@@ -492,7 +492,7 @@ static void build_dag_object(DagForest *dag, DagNode *scenenode, Scene *scene, O
                        }
                }
        }
-    
+
        /* softbody collision  */
        if ((ob->type==OB_MESH) || (ob->type==OB_CURVE) || (ob->type==OB_LATTICE)) {
                if(modifiers_isSoftbodyEnabled(ob) || modifiers_isClothEnabled(ob) || ob->particlesystem.first)
index 7cb3adf96bfcdb50c3731e1ce2bc97a69ecd020a..16f47f3cc59e9de3bdcb81198d7a650f5c137132 100644 (file)
@@ -889,7 +889,7 @@ void write_dxf(struct Scene *scene, char *str)
        write_group(0, "SECTION");
        write_group(2, "BLOCKS");
 
-    
+
        /* only write meshes we're using in this scene */
        flag_listbase_ids(&G.main->mesh, LIB_DOIT, 0);
        
@@ -1608,7 +1608,7 @@ static void dxf_read_arc(Scene *scene, int noob)
                dia = (float) atof(val);
          } else if (id==62) {
                int colorid= atoi(val);
-           
+
                CLAMP(colorid, 1, 255);
                dxf_col_to_rgb(colorid, &color[0], &color[1], &color[2]);
          } else if (id==67) {
index 8f6408f1939f5a3be0736d923e59b05045b3a770..5b2376652908229e8c0753286afd39c53646c3e8 100644 (file)
@@ -80,10 +80,10 @@ void BKE_image_buf_fill_checker(unsigned char *rect, float *rect_float, int widt
  
        int checkerwidth= 32, dark= 1;
        int x, y;
-    
+
        unsigned char *rect_orig= rect;
        float *rect_float_orig= rect_float;
-    
+
        
        float h=0.0, hoffs=0.0, hue=0.0, s=0.9, v=0.9, r, g, b;
 
@@ -191,7 +191,7 @@ static void checker_board_color_fill(unsigned char *rect, float *rect_float, int
 
        for(y= 0; y < height; y++)
        {
-        
+
                val= 0.1 + (y * (0.4 / height)); /* use a number lower then 1.0 else its too bright */
                for(x= 0; x < width; x++)
                {
@@ -316,17 +316,17 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
        BLF_size(mono, 54, 72); /* hard coded size! */
 
        BLF_buffer(mono, rect_float, rect, width, height, 4);
-    
+
        for(y= 0; y < height; y+=step)
        {
                text[1]= '1';
-        
+
                for(x= 0; x < width; x+=step)
                {
                        /* hard coded offset */
                        pen_x = x + 33;
                        pen_y = y + 44;
-            
+
                        /* terribly crappy outline font! */
                        BLF_buffer_col(mono, 1.0, 1.0, 1.0, 1.0);
 
@@ -338,7 +338,7 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
                        BLF_draw_buffer(mono, text);
                        BLF_position(mono, pen_x, pen_y+outline, 0.0);
                        BLF_draw_buffer(mono, text);
-            
+
                        BLF_position(mono, pen_x-outline, pen_y-outline, 0.0);
                        BLF_draw_buffer(mono, text);
                        BLF_position(mono, pen_x+outline, pen_y+outline, 0.0);
@@ -351,12 +351,12 @@ static void checker_board_text(unsigned char *rect, float *rect_float, int width
                        BLF_buffer_col(mono, 0.0, 0.0, 0.0, 1.0);
                        BLF_position(mono, pen_x, pen_y, 0.0);
                        BLF_draw_buffer(mono, text);
-            
+
                        text[1]++;
                }
                text[0]++;
        }
-    
+
        /* cleanup the buffer. */
        BLF_buffer(mono, NULL, NULL, 0, 0, 0);
 }
index fa7709e3b332b50357936046942cefc1748183c9..130bc798ff19701802466769d93e5395563263de 100644 (file)
@@ -1314,12 +1314,12 @@ void ramp_blend(int type, float *r, float *g, float *b, float fac, float *col)
                case MA_RAMP_SOFT: 
                        if (g){ 
                                float scr, scg, scb; 
-                 
+
                                /* first calculate non-fac based Screen mix */ 
                                scr = 1.0f - (1.0f - col[0]) * (1.0f - *r); 
                                scg = 1.0f - (1.0f - col[1]) * (1.0f - *g); 
                                scb = 1.0f - (1.0f - col[2]) * (1.0f - *b); 
-                 
+
                                *r = facm*(*r) + fac*(((1.0f - *r) * col[0] * (*r)) + (*r * scr)); 
                                *g = facm*(*g) + fac*(((1.0f - *g) * col[1] * (*g)) + (*g * scg)); 
                                *b = facm*(*b) + fac*(((1.0f - *b) * col[2] * (*b)) + (*b * scb)); 
index 6fe9e3782902681c8637429fe4de60eea0372b78..e19a508658e58a23ab868e60cd7713ca1f5ad8a5 100644 (file)
@@ -1376,7 +1376,7 @@ void converge (MB_POINT *p1, MB_POINT *p2, float v1, float v2,
                p->x = 0.5f*(pos.x + neg.x);
                p->y = 0.5f*(pos.y + neg.y);
                p->z = 0.5f*(pos.z + neg.z);
-    
+
                if (i++ == RES) return;
    
                if ((function(p->x, p->y, p->z)) > 0.0f){
@@ -1691,11 +1691,11 @@ float init_meta(Scene *scene, Object *ob)       /* return totsize */
                                        mul_m4_m4m4(temp2, bob->obmat, obinv);
                                        /* MetaBall transformation */
                                        mul_m4_m4m4(mat, temp1, temp2);
-        
+
                                        invert_m4_m4(imat,mat);                         
-        
+
                                        mainb[a]->rad2= ml->rad*ml->rad;
-        
+
                                        mainb[a]->mat= (float*) mat;
                                        mainb[a]->imat= (float*) imat;
 
index ebbc18cdce95478cd2b1883e12e163bff10cfb53..532e96f303157459289bc85e115882c09d460c34 100644 (file)
@@ -1465,7 +1465,7 @@ void create_vert_edge_map(ListBase **map, IndexNode **mem, const MEdge *medge, c
        (*map) = MEM_callocN(sizeof(ListBase) * totvert, "vert edge map");
        (*mem) = MEM_callocN(sizeof(IndexNode) * totedge * 2, "vert edge map mem");
        node = *mem;
-       
+
        /* Find the users */
        for(i = 0; i < totedge; ++i){
                for(j = 0; j < 2; ++j, ++node) {
index 927f4863e2def81366325bc6a7e4a048e07c4be8..e80289c75ae71c65ee88b9fb2a76636cfbf7216b 100644 (file)
@@ -4424,22 +4424,22 @@ void psys_make_billboard(ParticleBillboardData *bb, float xvec[3], float yvec[3]
        xvec[0] = 1.0f; xvec[1] = 0.0f; xvec[2] = 0.0f;
        yvec[0] = 0.0f; yvec[1] = 1.0f; yvec[2] = 0.0f;
 
-    /* can happen with bad pointcache or physics calculation
-     * since this becomes geometry, nan's and inf's crash raytrace code.
-     * better not allow this. */
-    if( !finite(bb->vec[0]) || !finite(bb->vec[1]) || !finite(bb->vec[2]) ||
-        !finite(bb->vel[0]) || !finite(bb->vel[1]) || !finite(bb->vel[2]) )
-    {
-        zero_v3(bb->vec);
-        zero_v3(bb->vel);
-        
-        zero_v3(xvec);
-        zero_v3(yvec);
-        zero_v3(zvec);
-        zero_v3(center);
-
-        return;
-    }
+       /* can happen with bad pointcache or physics calculation
+        * since this becomes geometry, nan's and inf's crash raytrace code.
+        * better not allow this. */
+       if( !finite(bb->vec[0]) || !finite(bb->vec[1]) || !finite(bb->vec[2]) ||
+           !finite(bb->vel[0]) || !finite(bb->vel[1]) || !finite(bb->vel[2]) )
+       {
+               zero_v3(bb->vec);
+               zero_v3(bb->vel);
+
+               zero_v3(xvec);
+               zero_v3(yvec);
+               zero_v3(zvec);
+               zero_v3(center);
+
+               return;
+       }
 
        if(bb->align < PART_BB_VIEW)
                onevec[bb->align]=1.0f;
index 1c05b854ef79357ec497f0fef44956645a3dd4b2..666ba31faed8d3a90b6f316eb3d76c9076a5e9d3 100644 (file)
@@ -644,7 +644,7 @@ static void hammersley_create(float *out, int n, int seed, float amount)
                for (p = 0.5, kk = k; kk; p *= 0.5, kk >>= 1)
                        if (kk & 1) /* kk mod 2 = 1 */
                                t += p;
-    
+
                out[2*k + 0]= fmod((double)k/(double)n + offs[0], 1.0);
                out[2*k + 1]= fmod(t + offs[1], 1.0);
        }
index a8447e2a12ac9c43099834c77a10fdff0cb91912..45cb62548874106858bc810f74bf8d30fc80b8e2 100644 (file)
@@ -1308,8 +1308,8 @@ static void ptcache_data_copy(void *from[], void *to[])
 {
        int i;
        for(i=0; i<BPHYS_TOT_DATA; i++) {
-        /* note, durian file 03.4b_comp crashes if to[i] is not tested
-         * its NULL, not sure if this should be fixed elsewhere but for now its needed */
+       /* note, durian file 03.4b_comp crashes if to[i] is not tested
+        * its NULL, not sure if this should be fixed elsewhere but for now its needed */
                if(from[i] && to[i])
                        memcpy(to[i], from[i], ptcache_data_size[i]);
        }
index ed3739e897dc4aa821d1818d9375e5d83c72372c..f84d98a31b47d59bdf99dc3fef032d2c371ff56b 100644 (file)
@@ -101,7 +101,7 @@ void BKE_report(ReportList *reports, ReportType type, const char *message)
        Report *report;
        int len;
 
-    /* in background mode always print otherwise there are cases the errors wont be displayed,
+       /* in background mode always print otherwise there are cases the errors wont be displayed,
         * but still add to the report list since this is used for python exception handling */
        if(G.background || !reports || ((reports->flag & RPT_PRINT) && (type >= reports->printlevel))) {
                printf("%s: %s\n", report_type_str(type), message);
index 38dc7fd51061b2a8ccda4f603e2036621a4f8c7b..16cef67ea6d2c098c67435e2a193ff573cf9864f 100644 (file)
@@ -333,12 +333,12 @@ void free_actuator(bActuator *act)
 
        if(act->data) {
                switch (act->type) {
-                       case ACT_SOUND:
-                               sa = (bSoundActuator *) act->data;
-                               if(sa->sound)
-                                       id_us_min((ID *) sa->sound);
-                               break;
-               }
+               case ACT_SOUND:
+                       sa = (bSoundActuator *) act->data;
+                       if(sa->sound)
+                               id_us_min((ID *) sa->sound);
+                       break;
+               }
 
                MEM_freeN(act->data);
        }
index c4eefb16348e249ad1ec399742e2277fa50361c8..791d572d385930384c91035f971353f8dab9bb24 100644 (file)
@@ -1080,23 +1080,23 @@ float get_render_aosss_error(RenderData *r, float error)
 /* helper function for the SETLOOPER macro */
 Base *_setlooper_base_step(Scene **sce_iter, Base *base)
 {
-    if(base && base->next) {
-        /* common case, step to the next */
-        return base->next;
-    }
+       if(base && base->next) {
+               /* common case, step to the next */
+               return base->next;
+       }
        else if(base==NULL && (*sce_iter)->base.first) {
-        /* first time looping, return the scenes first base */
+               /* first time looping, return the scenes first base */
                return (Base *)(*sce_iter)->base.first;
-    }
-    else {
-        /* reached the end, get the next base in the set */
+       }
+       else {
+               /* reached the end, get the next base in the set */
                while((*sce_iter= (*sce_iter)->set)) {
                        base= (Base *)(*sce_iter)->base.first;
-            if(base) {
-                return base;
-            }
-        }
-    }
+                       if(base) {
+                               return base;
+                       }
+               }
+       }
 
-    return NULL;
+       return NULL;
 }
index 3041a4c59e69c7f99d74b1097a9231dc9722cc86..b9bf10bdf3922f829a2da28382bfe4b93a1a9477 100644 (file)
@@ -2696,7 +2696,7 @@ void subsurf_calculate_limit_positions(Mesh *me, float (*positions_r)[3])
                int numFaces = ccgSubSurf_getVertNumFaces(v);
                float *co;
                int i;
-                
+
                edge_sum[0]= edge_sum[1]= edge_sum[2]= 0.0;
                face_sum[0]= face_sum[1]= face_sum[2]= 0.0;
 
index 85636d23f6fc83d5e555e41b36ee022d3929ce5a..512086f0e17939e9c7991cdec4edd14ff2d43746 100644 (file)
@@ -463,14 +463,14 @@ int constrain_rgb(float *r, float *g, float *b)
        float w;
 
        /* Amount of white needed is w = - min(0, *r, *g, *b) */
-    
+
        w = (0 < *r) ? 0 : *r;
        w = (w < *g) ? w : *g;
        w = (w < *b) ? w : *b;
        w = -w;
 
        /* Add just enough white to make r, g, b all positive. */
-    
+
        if (w > 0) {
                *r += w;  *g += w; *b += w;
                return 1;                     /* Color modified to fit RGB gamut */
index 744a15f4711dbcff33d256a87eb3be2ffba142bf..42a9587596e0ff401a9c23183ad8735124756ed9 100644 (file)
@@ -473,7 +473,7 @@ int isect_line_tri_v3(const float p1[3], const float p2[3], const float v0[3], c
        
        cross_v3_v3v3(q, s, e1);
        
-        v = f * dot_v3v3(d, q);
+       v = f * dot_v3v3(d, q);
        if ((v < 0.0f)||((u + v) > 1.0f)) return 0;
 
        *lambda = f * dot_v3v3(e2, q);
@@ -519,7 +519,7 @@ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], con
        *lambda = f * dot_v3v3(e2, q);
        if ((*lambda < 0.0f)) return 0;
 
-        if(uv) {
+       if(uv) {
                uv[0]= u;
                uv[1]= v;
        }
@@ -529,36 +529,36 @@ int isect_ray_tri_v3(const float p1[3], const float d[3], const float v0[3], con
 
 int isect_ray_tri_epsilon_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *lambda, float uv[2], const float epsilon)
 {
-    float p[3], s[3], e1[3], e2[3], q[3];
-    float a, f, u, v;
+       float p[3], s[3], e1[3], e2[3], q[3];
+       float a, f, u, v;
 
-    sub_v3_v3v3(e1, v1, v0);
-    sub_v3_v3v3(e2, v2, v0);
+       sub_v3_v3v3(e1, v1, v0);
+       sub_v3_v3v3(e2, v2, v0);
 
-    cross_v3_v3v3(p, d, e2);
-    a = dot_v3v3(e1, p);
-    if (a == 0.0f) return 0;
-    f = 1.0f/a;
+       cross_v3_v3v3(p, d, e2);
+       a = dot_v3v3(e1, p);
+       if (a == 0.0f) return 0;
+       f = 1.0f/a;
 
-    sub_v3_v3v3(s, p1, v0);
+       sub_v3_v3v3(s, p1, v0);
 
-    u = f * dot_v3v3(s, p);
-    if ((u < -epsilon)||(u > 1.0f+epsilon)) return 0;
+       u = f * dot_v3v3(s, p);
+       if ((u < -epsilon)||(u > 1.0f+epsilon)) return 0;
 
-    cross_v3_v3v3(q, s, e1);
+       cross_v3_v3v3(q, s, e1);
 
-    v = f * dot_v3v3(d, q);
-    if ((v < -epsilon)||((u + v) > 1.0f+epsilon)) return 0;
+       v = f * dot_v3v3(d, q);
+       if ((v < -epsilon)||((u + v) > 1.0f+epsilon)) return 0;
 
-    *lambda = f * dot_v3v3(e2, q);
-    if ((*lambda < 0.0f)) return 0;
+       *lambda = f * dot_v3v3(e2, q);
+       if ((*lambda < 0.0f)) return 0;
 
-    if(uv) {
-        uv[0]= u;
-        uv[1]= v;
-    }
+       if(uv) {
+               uv[0]= u;
+               uv[1]= v;
+       }
 
-    return 1;
+       return 1;
 }
 
 int isect_ray_tri_threshold_v3(const float p1[3], const float d[3], const float v0[3], const float v1[3], const float v2[3], float *lambda, float *uv, const float threshold)
@@ -2604,7 +2604,7 @@ static float ff_quad_form_factor(float *p, float *n, float *q0, float *q1, float
        aresult = (_mm_set_ps1(n[0])*gx + _mm_set_ps1(n[1])*gy + _mm_set_ps1(n[2])*gz)*angle;
 
        /* sum together */
-    result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI);
+       result= (fresult[0] + fresult[1] + fresult[2] + fresult[3])*(0.5f/(float)M_PI);
        result= MAX2(result, 0.0f);
 
        return result;
index a2fa69bfcd9382f4d2c1432a42d8551fda51dab2..95a43a998d36f5183f3eed9f92f420c33cc961e2 100644 (file)
@@ -672,7 +672,7 @@ static PBVHNode *pbvh_iter_next(PBVHIter *iter)
           parents, this order is necessary for e.g. computing bounding boxes */
 
        while(iter->stacksize) {
-                /* pop node */
+               /* pop node */
                iter->stacksize--;
                node= iter->stack[iter->stacksize].node;
 
@@ -709,30 +709,30 @@ static PBVHNode *pbvh_iter_next(PBVHIter *iter)
 
 static PBVHNode *pbvh_iter_next_occluded(PBVHIter *iter)
 {
-    PBVHNode *node;
-
-    while(iter->stacksize) {
-        /* pop node */
-        iter->stacksize--;
-        node= iter->stack[iter->stacksize].node;
-
-        /* on a mesh with no faces this can happen
-        * can remove this check if we know meshes have at least 1 face */
-        if(node==NULL) return NULL;
-
-        if(iter->scb && !iter->scb(node, iter->search_data)) continue; /* don't traverse, outside of search zone */
-
-        if(node->flag & PBVH_Leaf) {
-            /* immediately hit leaf node */
-            return node;
-        }
-        else {
-            pbvh_stack_push(iter, iter->bvh->nodes+node->children_offset+1, 0);
-            pbvh_stack_push(iter, iter->bvh->nodes+node->children_offset, 0);
-        }
-    }
-
-    return NULL;
+       PBVHNode *node;
+
+       while(iter->stacksize) {
+               /* pop node */
+               iter->stacksize--;
+               node= iter->stack[iter->stacksize].node;
+
+               /* on a mesh with no faces this can happen
+                * can remove this check if we know meshes have at least 1 face */
+               if(node==NULL) return NULL;
+
+               if(iter->scb && !iter->scb(node, iter->search_data)) continue; /* don't traverse, outside of search zone */
+
+               if(node->flag & PBVH_Leaf) {
+                       /* immediately hit leaf node */
+                       return node;
+               }
+               else {
+                       pbvh_stack_push(iter, iter->bvh->nodes+node->children_offset+1, 0);
+                       pbvh_stack_push(iter, iter->bvh->nodes+node->children_offset, 0);
+               }
+       }
+
+       return NULL;
 }
 
 void BLI_pbvh_search_gather(PBVH *bvh,
@@ -793,59 +793,59 @@ void BLI_pbvh_search_callback(PBVH *bvh,
 }
 
 typedef struct node_tree {
-    PBVHNode* data;
+       PBVHNode* data;
 
-    struct node_tree* left;
-    struct node_tree* right;
+       struct node_tree* left;
+       struct node_tree* right;
 } node_tree;
 
 static void node_tree_insert(node_tree* tree, node_tree* new_node)
 {
-    if (new_node->data->tmin < tree->data->tmin) {
-        if (tree->left) {
-            node_tree_insert(tree->left, new_node);
-        }
-        else {
-            tree->left = new_node;
-        }
-    }
-    else {
-        if (tree->right) {
-            node_tree_insert(tree->right, new_node);
-        }
-        else {
-            tree->right = new_node;
-        }
-    }
+       if (new_node->data->tmin < tree->data->tmin) {
+               if (tree->left) {
+                       node_tree_insert(tree->left, new_node);
+               }
+               else {
+                       tree->left = new_node;
+               }
+       }
+       else {
+               if (tree->right) {
+                       node_tree_insert(tree->right, new_node);
+               }
+               else {
+                       tree->right = new_node;
+               }
+       }
 }
 
 static void traverse_tree(node_tree* tree, BLI_pbvh_HitOccludedCallback hcb, void* hit_data, float* tmin)
 {
-    if (tree->left) traverse_tree(tree->left, hcb, hit_data, tmin);
+       if (tree->left) traverse_tree(tree->left, hcb, hit_data, tmin);
 
-    hcb(tree->data, hit_data, tmin);
+       hcb(tree->data, hit_data, tmin);
 
-    if (tree->right) traverse_tree(tree->right, hcb, hit_data, tmin);
+       if (tree->right) traverse_tree(tree->right, hcb, hit_data, tmin);
 }
 
 static void free_tree(node_tree* tree)
 {
-    if (tree->left) {
-        free_tree(tree->left);
-        tree->left = 0;
-    }
+       if (tree->left) {
+               free_tree(tree->left);
+               tree->left = 0;
+       }
 
-    if (tree->right) {
-        free_tree(tree->right);
-        tree->right = 0;
-    }
+       if (tree->right) {
+               free_tree(tree->right);
+               tree->right = 0;
+       }
 
-    free(tree);
+       free(tree);
 }
 
 float BLI_pbvh_node_get_tmin(PBVHNode* node)
 {
-    return node->tmin;
+       return node->tmin;
 }
 
 static void BLI_pbvh_search_callback_occluded(PBVH *bvh,
@@ -1129,7 +1129,7 @@ void BLI_pbvh_get_grid_updates(PBVH *bvh, int clear, void ***gridfaces, int *tot
        GHash *map;
        void *face, **faces;
        unsigned i;
-        int tot;
+       int tot;
 
        map = BLI_ghash_new(BLI_ghashutil_ptrhash, BLI_ghashutil_ptrcmp, "pbvh_get_grid_updates gh");
 
@@ -1318,17 +1318,17 @@ static int ray_face_intersection(float ray_start[3], float ray_normal[3],
                                 float *t0, float *t1, float *t2, float *t3,
                                 float *fdist)
 {
-    float dist;
-
-    if ((isect_ray_tri_epsilon_v3(ray_start, ray_normal, t0, t1, t2, &dist, NULL, 0.1f) && dist < *fdist) ||
-        (t3 && isect_ray_tri_epsilon_v3(ray_start, ray_normal, t0, t2, t3, &dist, NULL, 0.1f) && dist < *fdist))
-    {
-        *fdist = dist;
-        return 1;
-    }
-    else {
-        return 0;
-    }
+       float dist;
+
+       if ((isect_ray_tri_epsilon_v3(ray_start, ray_normal, t0, t1, t2, &dist, NULL, 0.1f) && dist < *fdist) ||
+          (t3 && isect_ray_tri_epsilon_v3(ray_start, ray_normal, t0, t2, t3, &dist, NULL, 0.1f) && dist < *fdist))
+       {
+               *fdist = dist;
+               return 1;
+       }
+       else {
+               return 0;
+       }
 }
 
 int BLI_pbvh_node_raycast(PBVH *bvh, PBVHNode *node, float (*origco)[3],
index d626ca4bf0964d8e18cf990a6eaccde7a0b69d26..ee5bd17c901665bf75a238cf6b815cfc912428b3 100644 (file)
@@ -381,64 +381,64 @@ static const char trailingBytesForUTF8[256] = {
 
 int BLI_utf8_invalid_byte(const char *str, int length)
 {
-    const unsigned char *p, *pend = (unsigned char*)str + length;
-    unsigned char c;
-    int ab;
-
-    for (p = (unsigned char*)str; p < pend; p++) {
-        c = *p;
-        if (c < 128)
-            continue;
-        if ((c & 0xc0) != 0xc0)
-            goto utf8_error;
-        ab = trailingBytesForUTF8[c];
-        if (length < ab)
-            goto utf8_error;
-        length -= ab;
-
-        p++;
-        /* Check top bits in the second byte */
-        if ((*p & 0xc0) != 0x80)
-            goto utf8_error;
-
-        /* Check for overlong sequences for each different length */
-        switch (ab) {
-            /* Check for xx00 000x */
-        case 1:
-            if ((c & 0x3e) == 0) goto utf8_error;
-            continue;   /* We know there aren't any more bytes to check */
-
-            /* Check for 1110 0000, xx0x xxxx */
-        case 2:
-            if (c == 0xe0 && (*p & 0x20) == 0) goto utf8_error;
-            break;
-
-            /* Check for 1111 0000, xx00 xxxx */
-        case 3:
-            if (c == 0xf0 && (*p & 0x30) == 0) goto utf8_error;
-            break;
-
-            /* Check for 1111 1000, xx00 0xxx */
-        case 4:
-            if (c == 0xf8 && (*p & 0x38) == 0) goto utf8_error;
-            break;
-
-            /* Check for leading 0xfe or 0xff,
-               and then for 1111 1100, xx00 00xx */
-        case 5:
-            if (c == 0xfe || c == 0xff ||
-                (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error;
-            break;
-        }
-
-        /* Check for valid bytes after the 2nd, if any; all must start 10 */
-        while (--ab > 0) {
-            if ((*(p+1) & 0xc0) != 0x80) goto utf8_error;
+       const unsigned char *p, *pend = (unsigned char*)str + length;
+       unsigned char c;
+       int ab;
+
+       for (p = (unsigned char*)str; p < pend; p++) {
+               c = *p;
+               if (c < 128)
+                       continue;
+               if ((c & 0xc0) != 0xc0)
+                       goto utf8_error;
+               ab = trailingBytesForUTF8[c];
+               if (length < ab)
+                       goto utf8_error;
+               length -= ab;
+
+               p++;
+               /* Check top bits in the second byte */
+               if ((*p & 0xc0) != 0x80)
+                       goto utf8_error;
+
+               /* Check for overlong sequences for each different length */
+               switch (ab) {
+                       /* Check for xx00 000x */
+               case 1:
+                       if ((c & 0x3e) == 0) goto utf8_error;
+                       continue;   /* We know there aren't any more bytes to check */
+
+                       /* Check for 1110 0000, xx0x xxxx */
+               case 2:
+                       if (c == 0xe0 && (*p & 0x20) == 0) goto utf8_error;
+                       break;
+
+                       /* Check for 1111 0000, xx00 xxxx */
+               case 3:
+                       if (c == 0xf0 && (*p & 0x30) == 0) goto utf8_error;
+                       break;
+
+                       /* Check for 1111 1000, xx00 0xxx */
+               case 4:
+                       if (c == 0xf8 && (*p & 0x38) == 0) goto utf8_error;
+                       break;
+
+                       /* Check for leading 0xfe or 0xff,
+                          and then for 1111 1100, xx00 00xx */
+               case 5:
+                       if (c == 0xfe || c == 0xff ||
+                               (c == 0xfc && (*p & 0x3c) == 0)) goto utf8_error;
+                       break;
+               }
+
+               /* Check for valid bytes after the 2nd, if any; all must start 10 */
+               while (--ab > 0) {
+                       if ((*(p+1) & 0xc0) != 0x80) goto utf8_error;
                        p++; /* do this after so we get usable offset - campbell */
-        }
-    }
+               }
+       }
 
-    return -1;
+       return -1;
 
 utf8_error:
 
index 93d266668e27a1b84634b57fe46a30b9c2a1649b..e4e61e49e90ee5d032a03e89344ce92290792eb3 100644 (file)
@@ -3694,7 +3694,7 @@ static void lib_link_object(FileData *fd, Main *main)
 
                        ob->gpd= newlibadr_us(fd, ob->id.lib, ob->gpd);
                        ob->duplilist= NULL;
-            
+
                        ob->id.flag -= LIB_NEEDLINK;
                        /* if id.us==0 a new base will be created later on */
                        
index 07069a69c4093d8c8b48fe6c84554d7ea3577c00..f111339b96380b5ecfeca63361c7c267e55e6d14 100644 (file)
@@ -113,7 +113,7 @@ void delete_fcurve_keys(FCurve *fcu)
        
        if(fcu->bezt==NULL) /* ignore baked curves */
                return;
-    
+
        /* Delete selected BezTriples */
        for (i=0; i < fcu->totvert; i++) {
                if (fcu->bezt[i].f2 & SELECT) {
index 67773d358d027d9d7d9e9acf6253b651c9fc419a..566ccd7cd3f1837ce8ba2245e6030dfb91f5cdd1 100644 (file)
@@ -471,7 +471,7 @@ static void heat_ray_tree_create(LaplacianSystem *sys)
 
 static int heat_ray_source_visible(LaplacianSystem *sys, int vertex, int source)
 {
-    BVHTreeRayHit hit;
+       BVHTreeRayHit hit;
        BVHCallbackUserData data;
        MFace *mface;
        float end[3];
index 08f8496eb8a0838aead35cefc0f308714e76877f..68f45c5fdb4f8e3a33c3fd179f5adb0c9fc124d2 100644 (file)
@@ -3031,7 +3031,7 @@ static void subdividenurb(Object *obedit, int number_cuts)
                /* This is a very strange test ... */
                /** 
                   Subdivide NURB surfaces - nzc 30-5-'00 -
-           
+
                         Subdivision of a NURB curve can be effected by adding a 
                   control point (insertion of a knot), or by raising the
                   degree of the functions used to build the NURB. The
index 1495d2b00ba269184b519e8ca2088ee728c38173..b07baf45d236d0209dfd3ff5f1b8a24c2c5bf945 100644 (file)
@@ -370,7 +370,7 @@ static void ui_popup_bounds_block(const bContext *C, uiBlock *block, int bounds_
        /* and we adjust the position to fit within window */
        width= block->maxx - block->minx;
        height= block->maxy - block->miny;
-    
+
        /* avoid divide by zero below, caused by calling with no UI, but better not crash */
        oldwidth= oldwidth > 0 ? oldwidth : MAX2(1, width);
        oldheight= oldheight > 0 ? oldheight : MAX2(1, height);
@@ -1284,7 +1284,7 @@ double ui_get_but_val(uiBut *but)
        else if( but->pointype == FLO ) {
                value= *(float *)but->poin;
        }
-    
+
        return value;
 }
 
index a208eee16490a2c293e1f4fe27a0970481366da5..7dc27805b40ea5f9a3704af99378a8942d9be09b 100644 (file)
@@ -1196,10 +1196,10 @@ static void rna_search_cb(const struct bContext *C, void *arg_but, const char *s
 #endif
                        name= BLI_strdup(name_ui);
                        iconid= ui_id_icon_get((bContext*)C, id, 1);
-        }
+               }
                else {
                        name= RNA_struct_name_get_alloc(&itemptr, NULL, 0);
-            iconid = 0;
+                       iconid = 0;
                }
 
                if(name) {
index 1fa17c34dd0715424e6aea03dff4df4b35e3a29d..b1ab68ff087f011d9d942697231fc272d8f086c1 100644 (file)
@@ -238,8 +238,8 @@ static int group_add_exec(bContext *C, wmOperator *UNUSED(op))
        if(ob == NULL)
                return OPERATOR_CANCELLED;
 
-    group= add_group("Group");
-    add_to_group(group, ob, scene, NULL);
+       group= add_group("Group");
+       add_to_group(group, ob, scene, NULL);
 
        WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
 
@@ -264,12 +264,12 @@ static int group_link_exec(bContext *C, wmOperator *op)
 {
        Scene *scene= CTX_data_scene(C);
        Object *ob= CTX_data_pointer_get_type(C, "object", &RNA_Object).data;
-    Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
+       Group *group= BLI_findlink(&CTX_data_main(C)->group, RNA_enum_get(op->ptr, "group"));
 
        if(ELEM(NULL, ob, group))
                return OPERATOR_CANCELLED;
 
-    add_to_group(group, ob, scene, NULL);
+       add_to_group(group, ob, scene, NULL);
 
        WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob);
 
index 76c917291a85db9b902cc8fbf1101a1c54c678ab..d1315001f9e814a35aa49b5deaa9f6bc6ff9ff5a 100644 (file)
@@ -348,7 +348,7 @@ static void ED_vgroup_nr_vert_remove(Object *ob, int def_nr, int vertnum)
                 */
                if(dvert->dw[i].def_nr == def_nr) {
                        dvert->totweight--;
-        
+
                        /* if there are still other deform weights
                         * attached to this vert then remove this
                         * deform weight, and reshuffle the others
@@ -457,10 +457,10 @@ static void ED_vgroup_nr_vert_add(Object *ob, int def_nr, int vertnum, float wei
                        MEM_freeN(dv->dw);
                }
                dv->dw=newdw;
-    
+
                dv->dw[dv->totweight].weight=weight;
                dv->dw[dv->totweight].def_nr=def_nr;
-    
+
                dv->totweight++;
                break;
        }
index 3f2fcaab94ad4f5b22be0c6abb3cdda2926a1a77..d7df329816dd989b90622f4c84245f1d96991956 100644 (file)
@@ -2445,7 +2445,7 @@ static int weight_set_exec(bContext *C, wmOperator *op)
        HairKey *hkey;
        float weight;
        ParticleBrushData *brush= &pset->brush[pset->brushtype];
-    float factor= RNA_float_get(op->ptr, "factor");
+       float factor= RNA_float_get(op->ptr, "factor");
 
        weight= brush->strength;
        edit= psys->edit;
@@ -2477,8 +2477,8 @@ void PARTICLE_OT_weight_set(wmOperatorType *ot)
 
        /* flags */
        ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-    
-    RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor", "", 0, 1);
+
+       RNA_def_float(ot->srna, "factor", 1, 0, 1, "Factor", "", 0, 1);
 }
 
 /************************ cursor drawing *******************************/
index ad1d55c336b2345500c8c9443b0a632fb70f42c9..05e60fe8f9c0b25d8b9127bfbe8eb40a2be6b28b 100644 (file)
@@ -1882,9 +1882,9 @@ static void calc_sculpt_plane(Sculpt *sd, Object *ob, PBVHNode **nodes, int totn
 /* Projects a point onto a plane along the plane's normal */
 static void point_plane_project(float intr[3], float co[3], float plane_normal[3], float plane_center[3])
 {
-    sub_v3_v3v3(intr, co, plane_center);
-    mul_v3_v3fl(intr, plane_normal, dot_v3v3(plane_normal, intr));
-    sub_v3_v3v3(intr, co, intr); 
+       sub_v3_v3v3(intr, co, plane_center);
+       mul_v3_v3fl(intr, plane_normal, dot_v3v3(plane_normal, intr));
+       sub_v3_v3v3(intr, co, intr);
 }
 
 static int plane_trim(StrokeCache *cache, Brush *brush, float val[3])
@@ -1894,23 +1894,23 @@ static int plane_trim(StrokeCache *cache, Brush *brush, float val[3])
 
 static int plane_point_side_flip(float co[3], float plane_normal[3], float plane_center[3], int flip)
 {
-    float delta[3];
-    float d;
+       float delta[3];
+       float d;
 
-    sub_v3_v3v3(delta, co, plane_center);
-    d = dot_v3v3(plane_normal, delta);
+       sub_v3_v3v3(delta, co, plane_center);
+       d = dot_v3v3(plane_normal, delta);
 
-    if (flip) d = -d;
+       if (flip) d = -d;
 
-    return d <= 0.0f;
+       return d <= 0.0f;
 }
 
 static int plane_point_side(float co[3], float plane_normal[3], float plane_center[3])
 {
-    float delta[3];
+       float delta[3];
 
-    sub_v3_v3v3(delta, co, plane_center);
-    return  dot_v3v3(plane_normal, delta) <= 0.0f;
+       sub_v3_v3v3(delta, co, plane_center);
+       return  dot_v3v3(plane_normal, delta) <= 0.0f;
 }
 
 static float get_offset(Sculpt *sd, SculptSession *ss)
index 22170bb439f7a6da7a45b23f26507df9436b09de..890a6cf545ae4941d185b9a1d1e339699ce62337 100644 (file)
@@ -182,8 +182,8 @@ static int path_drop_poll(bContext *UNUSED(C), wmDrag *drag, wmEvent *UNUSED(eve
 
 static void path_drop_copy(wmDrag *drag, wmDropBox *drop)
 {
-    char pathname[FILE_MAXDIR+FILE_MAXFILE+2];
-    snprintf(pathname, sizeof(pathname), "\"%s\"", drag->path);
+       char pathname[FILE_MAXDIR+FILE_MAXFILE+2];
+       snprintf(pathname, sizeof(pathname), "\"%s\"", drag->path);
        RNA_string_set(drop->ptr, "text", pathname);
 }
 
index 775f06ea7a42d4850405d965e0ced5e56fd45d88..4eddeaaaf9f6352776ccb35d3ac0d5c701aaa7f9 100644 (file)
@@ -363,7 +363,7 @@ static int file_select_all_exec(bContext *C, wmOperator *UNUSED(op))
        int numfiles = filelist_numfiles(sfile->files);
        int i;
        int is_selected = 0;
-    
+
        sel.first = 0; 
        sel.last = numfiles-1;
 
index ea3512b456d7687b93cb8c8ac560c117180158c1..04fe2ebf828d76b6f14f9e4c3d48ce1903eee0f5 100644 (file)
@@ -493,7 +493,7 @@ void ED_fileselect_init_layout(struct SpaceFile *sfile, struct ARegion *ar)
                layout->tile_h = textheight*3/2;
                layout->height= (int)(v2d->cur.ymax - v2d->cur.ymin - 2*layout->tile_border_y);
                layout->rows = layout->height / (layout->tile_h + 2*layout->tile_border_y);
-        
+
                column_widths(sfile->files, layout);
 
                if (params->display == FILE_SHORTDISPLAY) {
index 66e19cf04003ef487a3d171a59c4bb179d494551..db8eff11498beee40c312e61418f9375a380cc82 100644 (file)
@@ -2201,12 +2201,12 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
        case ACT_CAMERA:
 
                 ysize= 48;
-        
+
                 glRects(xco, yco-ysize, xco+width, yco);
                 uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
                
                 ca= act->data;
-        
+
                 uiDefIDPoinBut(block, test_obpoin_but, ID_OB, 1, "OB:",                xco+10, yco-24, (width-20)/2, 19, &(ca->ob), "Look at this Object");
                 uiDefButF(block, NUM, 0, "Height:",    xco+10+(width-20)/2, yco-24, (width-20)/2, 19, &ca->height, 0.0, 20.0, 0, 0, "");
                
@@ -2219,7 +2219,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                 uiDefButF(block, NUM, 0, "Max:",       xco+20+(width)/2, yco-44, (width-60)/2, 19, &ca->max, 0.0, 20.0, 0, 0, "");
 
                 yco-= ysize;
-        
+
                 break;
                                
        case ACT_EDIT_OBJECT:
@@ -2311,7 +2311,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
                uiDefButS(block, MENU, B_REDR, str,             xco+40, yco-24, (width-80), 19, &eoa->type, 0.0, 0.0, 0, 0, "");
 
                 yco-= ysize;
-        
+
                break;
  
         case ACT_CONSTRAINT:
@@ -2319,7 +2319,7 @@ static short draw_actuatorbuttons(Main *bmain, Object *ob, bActuator *act, uiBlo
        
                if (coa->type == ACT_CONST_TYPE_LOC) {
                        ysize= 69;
-        
+
                        glRects(xco, yco-ysize, xco+width, yco);
                        uiEmboss((float)xco, (float)yco-ysize, (float)xco+width, (float)yco, 1);
                        
index db6e4640d5f7d6f6d652326a930121efcc813363..a310b309d846b2f0bf9d317547fb84781eb4e6b0 100644 (file)
@@ -730,22 +730,22 @@ static void node_composit_buts_flip(uiLayout *layout, bContext *UNUSED(C), Point
 static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
 {
        uiLayout *col;
-       
+
        uiItemR(layout, ptr, "use_crop_size", 0, NULL, ICON_NONE);
-   uiItemR(layout, ptr, "relative", 0, NULL, ICON_NONE);
+       uiItemR(layout, ptr, "relative", 0, NULL, ICON_NONE);
 
        col= uiLayoutColumn(layout, 1);
-   if (RNA_boolean_get(ptr, "relative")){
-      uiItemR(col, ptr, "rel_min_x", 0, "Left", ICON_NONE);
-      uiItemR(col, ptr, "rel_max_x", 0, "Right", ICON_NONE);
-      uiItemR(col, ptr, "rel_min_y", 0, "Up", ICON_NONE);
-      uiItemR(col, ptr, "rel_max_y", 0, "Down", ICON_NONE);
-   } else {
-      uiItemR(col, ptr, "min_x", 0, "Left", ICON_NONE);
-      uiItemR(col, ptr, "max_x", 0, "Right", ICON_NONE);
-      uiItemR(col, ptr, "min_y", 0, "Up", ICON_NONE);
-      uiItemR(col, ptr, "max_y", 0, "Down", ICON_NONE);
-   }
+       if (RNA_boolean_get(ptr, "relative")){
+               uiItemR(col, ptr, "rel_min_x", 0, "Left", ICON_NONE);
+               uiItemR(col, ptr, "rel_max_x", 0, "Right", ICON_NONE);
+               uiItemR(col, ptr, "rel_min_y", 0, "Up", ICON_NONE);
+               uiItemR(col, ptr, "rel_max_y", 0, "Down", ICON_NONE);
+       } else {
+               uiItemR(col, ptr, "min_x", 0, "Left", ICON_NONE);
+               uiItemR(col, ptr, "max_x", 0, "Right", ICON_NONE);
+               uiItemR(col, ptr, "min_y", 0, "Up", ICON_NONE);
+               uiItemR(col, ptr, "max_y", 0, "Down", ICON_NONE);
+       }
 }
 
 static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
index 4b1930114678aa4fdc34d78a2e68739fc3a4a51e..ed70e2b05f1e4807f42aa41fc52753c808066e87 100644 (file)
@@ -1035,7 +1035,7 @@ static int snode_bg_viewmove_modal(bContext *C, wmOperator *op, wmEvent *event)
                        
                        MEM_freeN(nvm);
                        op->customdata= NULL;
-            
+
                        WM_event_add_notifier(C, NC_SPACE|ND_SPACE_NODE, NULL);
                        
                        return OPERATOR_FINISHED;
index d1b23dced26af84d7460676eb299a3a10c4db177..88d83b55788d951214e562957be3ebe40407505d 100644 (file)
@@ -614,7 +614,7 @@ int seq_effect_find_selected(Scene *scene, Sequence *activeseq, int type, Sequen
                        }
                }
        }
-       
+
        /* make sequence selection a little bit more intuitive
           for 3 strips: the last-strip should be sequence3 */
        if (seq3 != NULL && seq2 != NULL) {
index 1c830b7022a45598c0d3aa41a79044f5d8e2486f..345b3746100a8fdad44fc13d49195e2e305edad6 100644 (file)
@@ -993,7 +993,7 @@ static void drawviewborder(Scene *scene, ARegion *ar, View3D *v3d)
                cpack(0x4040FF);
                glRectf(x3,  y3,  x4,  y4); 
        }
-    
+
        /* safety border */
        if (ca && (ca->flag & CAM_SHOWTITLESAFE)) {
                fac= 0.1;
index 7cbb56e2fd6b75e508a5e55349302eb62947912b..98742bd0c7ce86af3c8304f305ff20954c510b7d 100644 (file)
@@ -2565,10 +2565,10 @@ void VIEW3D_OT_cursor3d(wmOperatorType *ot)
        ot->invoke= set_3dcursor_invoke;
 
        ot->poll= ED_operator_view3d_active;
-    
+
        /* flags */
 //     ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-    
+
        /* rna later */
 
 }
index 7d84a47bddf3bd328e5fab95739e8cc9ab7998e6..ce770aaae6a2f72d85bbcd0876897fa7a4351123 100644 (file)
@@ -793,7 +793,7 @@ static int flyApply(bContext *C, FlyInfo *fly)
                                /* transform the parent or the camera? */
                                if(fly->root_parent) {
                                        Object *ob_update;
-                    
+
                                        float view_mat[4][4];
                                        float prev_view_imat[4][4];
                                        float diff_mat[4][4];
index bd19112f924d81214349f84b2c4eb534259033f6..39a18d31d7e8f0a84b76f7d1bfb87fcaa21ac43f 100644 (file)
@@ -2234,7 +2234,7 @@ static int view3d_circle_select_exec(bContext *C, wmOperator *op)
        int select;
        
        select= (gesture_mode==GESTURE_MODAL_SELECT);
-    
+
        if( CTX_data_edit_object(C) || paint_facesel_test(obact) ||
                (obact && (obact->mode & (OB_MODE_PARTICLE_EDIT|OB_MODE_POSE))) )
        {
index 04783cce634d8653e665609c9b56f4cbda0de3b4..5e960593bd730bd059040c1f4dfac6272f23ad03 100644 (file)
@@ -3745,7 +3745,7 @@ static void SeqTransInfo(TransInfo *t, Sequence *seq, int *recursive, int *count
                }
        }
 #endif
-    
+
        /* for extend we need to do some tricks */
        if (t->mode == TFM_TIME_EXTEND) {
 
index b38f84125242ab8868a8cc98b5506aa58871f9ce..494cf7dee8365bb0f3d4afe4ca3da8d55c149639 100644 (file)
@@ -2331,7 +2331,7 @@ static int circle_select_exec(bContext *C, wmOperator *op)
        int x, y, radius, width, height, select;
        float zoomx, zoomy, offset[2], ellipse[2];
        int gesture_mode= RNA_int_get(op->ptr, "gesture_mode");
-    
+
        /* get operator properties */
        select= (gesture_mode == GESTURE_MODAL_SELECT);
        x= RNA_int_get(op->ptr, "x");
index 23af1eafdb7db53d8255ad7da20c2e4345f15ef2..7ba85d30763ee63b6c0b05740aa4488f3d6727a8 100644 (file)
@@ -1142,7 +1142,7 @@ static void p_chart_boundaries(PChart *chart, int *nboundaries, PEdge **outer)
                        (*nboundaries)++;
 
                len = 0.0f;
-    
+
                be = e;
                do {
                        be->flag |= PEDGE_DONE;
index cc5efd9a6ca5b6170875f2d6d36d6586aadb0e3e..eece7fba91c62ba8c1d82d752c2bb61f2f106e75 100644 (file)
@@ -629,7 +629,7 @@ static void uv_map_rotation_matrix(float result[][4], RegionView3D *rv3d, Object
        rotside[1][0]= (float)sin(sideangle);
        rotside[1][1]= (float)cos(sideangle);
        rotside[2][2]= 1.0f;
-      
+
        upangle= (float)M_PI*upangledeg/180.0f;
        rotup[1][1]= (float)cos(upangle)/radius;
        rotup[1][2]= -(float)sin(upangle)/radius;
index d87fe865826525d3f4ffd69fa2f3bb475d68d707..323ca6ab78bbace9a1a59b222c6053d6c15899c9 100644 (file)
@@ -793,7 +793,7 @@ static ListBase image_free_queue = {NULL, NULL};
 
 static void gpu_queue_image_for_free(Image *ima)
 {
-    Image *cpy = MEM_dupallocN(ima);
+       Image *cpy = MEM_dupallocN(ima);
 
        BLI_lock_thread(LOCK_OPENGL);
        BLI_addtail(&image_free_queue, cpy);
index 453eb99511311cf4aaa45883c7233d0299bc94d5..c0bed18d89bf2ce2062f536fe2c4acf535d5fe59 100644 (file)
@@ -119,8 +119,8 @@ void GPU_extensions_init(void)
        glGetIntegerv(GL_RED_BITS, &r);
        glGetIntegerv(GL_GREEN_BITS, &g);
        glGetIntegerv(GL_BLUE_BITS, &b);
-    GG.colordepth = r+g+b; /* assumes same depth for RGB */
-    
+       GG.colordepth = r+g+b; /* assumes same depth for RGB */
+
        vendor = (const char*)glGetString(GL_VENDOR);
        renderer = (const char*)glGetString(GL_RENDERER);
 
@@ -141,7 +141,7 @@ void GPU_extensions_init(void)
        else if(strstr(vendor, "Intel") ||
                /* src/mesa/drivers/dri/intel/intel_context.c */
                strstr(renderer, "Mesa DRI Intel") ||
-               strstr(renderer, "Mesa DRI Mobile Intel")) {
+               strstr(renderer, "Mesa DRI Mobile Intel")) {
                GG.device = GPU_DEVICE_INTEL;
                GG.driver = GPU_DRIVER_OFFICIAL;
        }
@@ -210,7 +210,7 @@ int GPU_non_power_of_two_support(void)
 
 int GPU_color_depth(void)
 {
-    return GG.colordepth;
+       return GG.colordepth;
 }
 
 int GPU_print_error(const char *str)
@@ -1223,10 +1223,10 @@ void GPU_pixelbuffer_texture(GPUTexture *tex, GPUPixelBuffer *pb)
                glBindBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, pb->bindcode[pb->current]);
                glBufferDataARB(GL_PIXEL_UNPACK_BUFFER_EXT, pb->datasize, NULL,
                        GL_STREAM_DRAW_ARB);
-    
+
                pixels = glMapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT, GL_WRITE_ONLY);
                /*memcpy(pixels, _oImage.data(), pb->datasize);*/
-    
+
                if (!glUnmapBufferARB(GL_PIXEL_UNPACK_BUFFER_EXT)) {
                        fprintf(stderr, "Could not unmap opengl PBO\n");
                        break;
index a964f345b2b3457d2ebe00badb3f0f10c1a98b0e..4de96bb17bca11bf6395910e6a42b04b174e456a 100644 (file)
@@ -185,7 +185,7 @@ static ImBuf * movie_fetchibuf(struct anim * anim, int position) {
        if (anim->interlacing == DM_IMAGE_INTERLACED_EVEN) {
                rect1 = ibuf->rect + (ibuf->x * ibuf->y) - 1;
                rect2 = rect1 - ibuf->x;
-    
+
                for (size = ibuf->x * (ibuf->y - 1); size > 0; size--){
                        *rect1-- = *rect2--;
                }
index 6ebb86f646d166b21cafaf44fdca8d64225f6a91..e59cf77a8715be49b6aa4ddf1c550c6849bec7e6 100644 (file)
@@ -74,7 +74,7 @@ struct ImBuf *IMB_half_x(struct ImBuf *ibuf1)
 
        _p1 = (uchar *) ibuf1->rect;
        dest=(uchar *) ibuf2->rect;
-         
+
        _p1f = ibuf1->rect_float;
        destf= ibuf2->rect_float;
 
@@ -600,7 +600,7 @@ static void enlarge_picture_float(
                if ((int) y_src == src_height - 1) {
                        line2 = line1;
                }
-                      
+
                x_src = 0;
                for (x_dst = 0; x_dst < dst_width; x_dst++) {
                        const float weight1x = (float)(1.0 - (x_src - (int) x_src));
index 15f63883191ea4f50aef18379a43a66113868139..07ee084f9762bed711c95244bb1d83a8b7ed98c6 100644 (file)
@@ -1065,7 +1065,7 @@ int make_structDNA(char *baseDirectory, FILE *file)
        MEM_freeN(names);
        MEM_freeN(types);
        MEM_freeN(typelens);
-    MEM_freeN(alphalens);
+       MEM_freeN(alphalens);
        MEM_freeN(structs);
 
        if (debugSDNA > -1) printf("done.\n");
index 863c30f8ef22ef44d07facbcb0c6487ed6db7c95..2afba954be3790652fb063d1714aece7c75a836b 100644 (file)
@@ -497,18 +497,18 @@ static void rna_Actuator_Armature_update(Main *bmain, Scene *scene, PointerRNA *
 /* note: the following set functions exists only to avoid id refcounting */
 static void rna_Actuator_editobject_mesh_set(PointerRNA *ptr, PointerRNA value)
 {
-        bActuator *act = (bActuator *)ptr->data;
-        bEditObjectActuator *eoa = (bEditObjectActuator *) act->data;
+       bActuator *act = (bActuator *)ptr->data;
+       bEditObjectActuator *eoa = (bEditObjectActuator *) act->data;
 
-        eoa->me = value.data;
+       eoa->me = value.data;
 }
 
 static void rna_Actuator_action_action_set(PointerRNA *ptr, PointerRNA value)
 {
-        bActuator *act = (bActuator *)ptr->data;
-        bActionActuator *aa = (bActionActuator *) act->data;
+       bActuator *act = (bActuator *)ptr->data;
+       bActionActuator *aa = (bActionActuator *) act->data;
 
-        aa->act = value.data;
+       aa->act = value.data;
 }
 
 #else
@@ -579,8 +579,8 @@ static void rna_def_action_actuator(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Action");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Action", "");
-        /* note: custom set function is ONLY to avoid rna setting a user for this. */
-        RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
+       /* note: custom set function is ONLY to avoid rna setting a user for this. */
+       RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
        prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
@@ -1811,8 +1811,8 @@ static void rna_def_shape_action_actuator(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "Action");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_ui_text(prop, "Action", "");
-        /* note: custom set function is ONLY to avoid rna setting a user for this. */
-        RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
+       /* note: custom set function is ONLY to avoid rna setting a user for this. */
+       RNA_def_property_pointer_funcs(prop, NULL, "rna_Actuator_action_action_set", NULL, NULL);
        RNA_def_property_update(prop, NC_LOGIC, NULL);
 
        prop= RNA_def_property(srna, "use_continue_last_frame", PROP_BOOLEAN, PROP_NONE);
index d8f0abfd7e2e3116fe00aa19b8eb8debb2ab2aca..e57491dc36d7a9d8370362767644e028661e0248 100644 (file)
@@ -1329,7 +1329,7 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 4);
        RNA_def_property_ui_text(prop, "Limit Z", "Use minimum/maximum z limit");
        RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-    
+
        prop= RNA_def_property(srna, "use_angular_limit_x", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 8);
        RNA_def_property_ui_text(prop, "Angular X Limit", "Use minimum/maximum x angular limit");
@@ -1344,7 +1344,6 @@ static void rna_def_constraint_rigid_body_joint(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", 32);
        RNA_def_property_ui_text(prop, "Angular Z Limit", "Use minimum/maximum z angular limit");
        RNA_def_property_update(prop, NC_OBJECT|ND_CONSTRAINT, "rna_Constraint_update");
-    
 }
 
 static void rna_def_constraint_clamp_to(BlenderRNA *brna)
index efb5bf0244c63a5b211010b6b0428368ba1cd1de..1b18f88efcc1589fcc4a4cb4f40cce41ccf29a1f 100644 (file)
@@ -164,8 +164,8 @@ static void rna_DriverTarget_update_name(Main *bmain, Scene *scene, PointerRNA *
 /* note: this function exists only to avoid id refcounting */
 static void rna_DriverTarget_id_set(PointerRNA *ptr, PointerRNA value)
 {
-    DriverTarget *dtar= (DriverTarget*)ptr->data;
-    dtar->id= value.data;
+       DriverTarget *dtar= (DriverTarget*)ptr->data;
+       dtar->id= value.data;
 }
 
 static StructRNA *rna_DriverTarget_id_typef(PointerRNA *ptr)
@@ -1044,7 +1044,7 @@ static void rna_def_drivertarget(BlenderRNA *brna)
        RNA_def_property_struct_type(prop, "ID");
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_editable_func(prop, "rna_DriverTarget_id_editable");
-    /* note: custom set function is ONLY to avoid rna setting a user for this. */
+       /* note: custom set function is ONLY to avoid rna setting a user for this. */
        RNA_def_property_pointer_funcs(prop, NULL, "rna_DriverTarget_id_set", "rna_DriverTarget_id_typef", NULL);
        RNA_def_property_ui_text(prop, "ID", "ID-block that the specific property used can be found from (id_type property must be set first)");
        RNA_def_property_update(prop, 0, "rna_DriverTarget_update_data");
index a30b5d4eb051eaf2ace0d71a07058be99747aa25..436418324e26a9a0e054762159110243fed875b3 100644 (file)
@@ -101,7 +101,7 @@ EnumPropertyItem metaelem_type_items[] = {
 #define OBTYPE_CU_CURVE {OB_CURVE, "CURVE", 0, "Curve", ""}
 #define OBTYPE_CU_SURF {OB_SURF, "SURFACE", 0, "Surface", ""}
 #define OBTYPE_CU_FONT {OB_FONT, "FONT", 0, "Font", ""}
-    
+
 EnumPropertyItem object_type_items[] = {
        {OB_MESH, "MESH", 0, "Mesh", ""},
        OBTYPE_CU_CURVE,
index 13fac68bf9f592cedf69a10e4120f4adabf8edb1..0619f5e19b6442a1c07fcee62e0980735b46788d 100644 (file)
@@ -820,7 +820,7 @@ static void rna_def_pointcache(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "flag", PTCACHE_EXTERNAL);
        RNA_def_property_ui_text(prop, "External", "Read cache from an external location");
        RNA_def_property_update(prop, NC_OBJECT, "rna_Cache_idname_change");
-    
+
        prop= RNA_def_property(srna, "use_library_path", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", PTCACHE_IGNORE_LIBPATH);
        RNA_def_property_ui_text(prop, "Library Path", "Use this files path when library linked into another file.");
index e19816a42f65274e5e3f38c5973859369c5acfa4..5bf398ae3a7e1973f7bff6c0845334e4a11469c0 100644 (file)
@@ -243,10 +243,10 @@ static void rna_Sensor_Armature_update(Main *bmain, Scene *scene, PointerRNA *pt
 /* note: the following set functions exists only to avoid id refcounting */
 static void rna_Sensor_touch_material_set(PointerRNA *ptr, PointerRNA value)
 {
-        bSensor *sens = (bSensor *)ptr->data;
-        bTouchSensor *ts = (bTouchSensor *) sens->data;
+       bSensor *sens = (bSensor *)ptr->data;
+       bTouchSensor *ts = (bTouchSensor *) sens->data;
 
-        ts->ma = value.data;
+       ts->ma = value.data;
 }
 #else
 
index 52fae14a0239949874da43cfc4aa08ac715b779e..2e947039c166cddd067df4237c91bb7476e617d8 100644 (file)
@@ -544,8 +544,8 @@ static void rna_SpaceTextEditor_text_set(PointerRNA *ptr, PointerRNA value)
 /* note: this function exists only to avoid id refcounting */
 static void rna_SpaceProperties_pin_id_set(PointerRNA *ptr, PointerRNA value)
 {
-    SpaceButs *sbuts= (SpaceButs*)(ptr->data);
-    sbuts->pinid= value.data;
+       SpaceButs *sbuts= (SpaceButs*)(ptr->data);
+       sbuts->pinid= value.data;
 }
 
 static StructRNA *rna_SpaceProperties_pin_id_typef(PointerRNA *ptr)
@@ -1443,7 +1443,7 @@ static void rna_def_space_buttons(BlenderRNA *brna)
        prop= RNA_def_property(srna, "pin_id", PROP_POINTER, PROP_NONE);
        RNA_def_property_pointer_sdna(prop, NULL, "pinid");
        RNA_def_property_struct_type(prop, "ID");
-    /* note: custom set function is ONLY to avoid rna setting a user for this. */
+       /* note: custom set function is ONLY to avoid rna setting a user for this. */
        RNA_def_property_pointer_funcs(prop, NULL, "rna_SpaceProperties_pin_id_set", "rna_SpaceProperties_pin_id_typef", NULL);
        RNA_def_property_flag(prop, PROP_EDITABLE);
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_PROPERTIES, "rna_SpaceProperties_pin_id_update");
@@ -2380,7 +2380,7 @@ static void rna_def_space_node(BlenderRNA *brna)
        RNA_def_property_float_sdna(prop, NULL, "zoom");
        RNA_def_property_float_default(prop, 1.0f);
        RNA_def_property_range(prop, 0.01f, FLT_MAX);
-    RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
+       RNA_def_property_ui_range(prop, 0.01, 100, 1, 2);
        RNA_def_property_ui_text(prop, "Backdrop Zoom", "Backdrop zoom factor");
        RNA_def_property_update(prop, NC_SPACE|ND_SPACE_NODE_VIEW, NULL);
        
index 84a6725807a7a2fec8011a6edda79ce745d79007..c21feead18f0665eae0d624756b76cb6e2c76331 100644 (file)
@@ -1988,7 +1988,7 @@ static void rna_def_userdef_view(BlenderRNA *brna)
        RNA_def_property_boolean_sdna(prop, NULL, "uiflag", USER_SHOW_VIEWPORTNAME);
        RNA_def_property_ui_text(prop, "Show View Name", "Show the name of the view's direction in each 3D View");
        RNA_def_property_update(prop, 0, "rna_userdef_update");
-    
+
        prop= RNA_def_property(srna, "show_splash", PROP_BOOLEAN, PROP_NONE);
        RNA_def_property_boolean_negative_sdna(prop, NULL, "uiflag", USER_SPLASH_DISABLE);
        RNA_def_property_ui_text(prop, "Show Splash", "Display splash screen on startup");
index a6b6ae26ca51e1454c88eab6b579a3710b550e31..4c79c27e0de30342f98151dcace4087b31f889cf 100644 (file)
@@ -1232,7 +1232,7 @@ static void rna_def_macro_operator(BlenderRNA *brna)
 #ifdef WITH_PYTHON
        RNA_def_struct_register_funcs(srna, "rna_MacroOperator_register", "rna_Operator_unregister");
 #endif
-    
+
        prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
        RNA_def_property_clear_flag(prop, PROP_EDITABLE);
        RNA_def_property_string_funcs(prop, "rna_Operator_name_get", "rna_Operator_name_length", NULL);
index fc0e9b3ee4bc72ab89af671cbd271201f9781216..94b086f1ba049f2ed02dba38aefd02a6737e6500 100644 (file)
@@ -88,41 +88,41 @@ static void do_ycca_to_rgba_normalized(bNode *UNUSED(node), float *out, float *i
 static void do_chroma_key(bNode *node, float *out, float *in)
 {
        NodeChroma *c;
-   float x, z, alpha;
-   float theta, beta, angle, angle2;
-   float kfg;
+       float x, z, alpha;
+       float theta, beta, angle, angle2;
+       float kfg;
 
        c=node->storage;
 
-   /* Algorithm from book "Video Demistified," does not include the spill reduction part */
+       /* Algorithm from book "Video Demistified," does not include the spill reduction part */
 
        /* find theta, the angle that the color space should be rotated based on key*/
-   theta=atan2(c->key[2], c->key[1]);
+       theta=atan2(c->key[2], c->key[1]);
 
        /*rotate the cb and cr into x/z space */
-   x=in[1]*cos(theta)+in[2]*sin(theta);
-   z=in[2]*cos(theta)-in[1]*sin(theta);
+       x=in[1]*cos(theta)+in[2]*sin(theta);
+       z=in[2]*cos(theta)-in[1]*sin(theta);
 
-   /*if within the acceptance angle */
-   angle=c->t1*M_PI/180.0; /* convert to radians */
-       
-   /* if kfg is <0 then the pixel is outside of the key color */
-   kfg=x-(fabs(z)/tan(angle/2.0));
+       /*if within the acceptance angle */
+       angle=c->t1*M_PI/180.0; /* convert to radians */
+
+       /* if kfg is <0 then the pixel is outside of the key color */
+       kfg=x-(fabs(z)/tan(angle/2.0));
 
-   out[0]=in[0];
-   out[1]=in[1];
-   out[2]=in[2];
+       out[0]=in[0];
+       out[1]=in[1];
+       out[2]=in[2];
 
-   if(kfg>0.0) {  /* found a pixel that is within key color */
-      alpha=(1.0-kfg)*(c->fstrength);
+       if(kfg>0.0) {  /* found a pixel that is within key color */
+               alpha=(1.0-kfg)*(c->fstrength);
 
-      beta=atan2(z,x);
-      angle2=c->t2*M_PI/180.0;
+               beta=atan2(z,x);
+               angle2=c->t2*M_PI/180.0;
 
-      /* if beta is within the cutoff angle */
-      if(fabs(beta)<(angle2/2.0)) {
-         alpha=0.0;
-      }
+               /* if beta is within the cutoff angle */
+               if(fabs(beta)<(angle2/2.0)) {
+                       alpha=0.0;
+               }
 
                /* don't make something that was more transparent less transparent */
                if (alpha<in[3]) {
index 5a0e2047ed793994c47cd59e27aac0c2438ffad6..08913575fcf61e0b1e07f57d2d05d2c521524443 100644 (file)
@@ -53,14 +53,14 @@ static void node_composit_exec_crop(void *UNUSED(data), bNode *node, bNodeStack
                CompBuf *stackbuf;
                int x, y;
                float *srcfp, *outfp;
-      rcti outputrect;
-
-      if(node->custom2) {
-         ntxy->x1= cbuf->x* ntxy->fac_x1;
-         ntxy->x2= cbuf->x* ntxy->fac_x2;
-         ntxy->y1= cbuf->y* ntxy->fac_y1;
-         ntxy->y2= cbuf->y* ntxy->fac_y2;
-      }
+               rcti outputrect;
+
+               if(node->custom2) {
+                       ntxy->x1= cbuf->x* ntxy->fac_x1;
+                       ntxy->x2= cbuf->x* ntxy->fac_x2;
+                       ntxy->y1= cbuf->y* ntxy->fac_y1;
+                       ntxy->y2= cbuf->y* ntxy->fac_y2;
+               }
 
                /* check input image size */
                if(cbuf->x <= ntxy->x1 + 1)
index 039f7e6fab145fab3581e3628af97814623d900a..4348fd18759d25664afe3b87a3cbab1671b5483c 100644 (file)
@@ -102,15 +102,15 @@ static void do_math(bNode *node, float *out, float *in, float *in2)
                        /* Only raise negative numbers by full integers */
                        if( in[0] >= 0 ) {
                                out[0]= pow(in[0], in2[0]);
-            } else {
-                float y_mod_1 = fmod(in2[0], 1);
+                       } else {
+                               float y_mod_1 = fmod(in2[0], 1);
                                /* if input value is not nearly an integer, fall back to zero, nicer than straight rounding */
-                if (y_mod_1 > 0.999 || y_mod_1 < 0.001) {
-                    out[0]= pow(in[0], floor(in2[0] + 0.5));
-                } else {
-                    out[0] = 0.0;
-                }
-            }
+                               if (y_mod_1 > 0.999 || y_mod_1 < 0.001) {
+                                       out[0]= pow(in[0], floor(in2[0] + 0.5));
+                               } else {
+                                       out[0] = 0.0;
+                               }
+                       }
                }
                break;
        case 11: /* Logarithm */
index 14f25aa442bd393c8d1586725c20495954c69c2e..b6b1764ff0f80717087f14b060a2f71273dba0a8 100644 (file)
@@ -49,80 +49,81 @@ static bNodeSocketType cmp_node_rotate_out[]= {
 /* only supports RGBA nodes now */
 static void node_composit_exec_rotate(void *UNUSED(data), bNode *node, bNodeStack **in, bNodeStack **out)
 {
-       
+
        if(out[0]->hasoutput==0)
                return;
-       
+
        if(in[0]->data) {
                CompBuf *cbuf= typecheck_compbuf(in[0]->data, CB_RGBA);
                CompBuf *stackbuf= alloc_compbuf(cbuf->x, cbuf->y, CB_RGBA, 1); /* note, this returns zero'd image */
                float rad, u, v, s, c, centx, centy, miny, maxy, minx, maxx;
                int x, y, yo, xo;
-         ImBuf *ibuf, *obuf;
-       
+               ImBuf *ibuf, *obuf;
+
                rad= (M_PI*in[1]->vec[0])/180.0f;
-               
+
                s= sin(rad);
                c= cos(rad);
                centx= cbuf->x/2;
                centy= cbuf->y/2;
-               
+
                minx= -centx;
                maxx= -centx + (float)cbuf->x;
                miny= -centy;
                maxy= -centy + (float)cbuf->y;
-               
-
-         ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
-         obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0);
-
-         if(ibuf && obuf){
-                ibuf->rect_float=cbuf->rect;
-                obuf->rect_float=stackbuf->rect;
-
-                  for(y=miny; y<maxy; y++) {
-                          yo= y+(int)centy;
-                     
-                       for(x=minx; x<maxx;x++) {
-                          u=c*x + y*s + centx;
-                          v=-s*x + c*y + centy;
-                          xo= x+(int)centx;
-
-                          switch(node->custom1) {
-                                 case 0:
-                                        neareast_interpolation(ibuf, obuf, u, v, xo, yo);
-                                        break ;
-                                 case 1:
-                                        bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
-                                        break;
-                                 case 2:
-                                        bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
-                          }
-               
-                       }
+
+
+               ibuf=IMB_allocImBuf(cbuf->x, cbuf->y, 32, 0);
+               obuf=IMB_allocImBuf(stackbuf->x, stackbuf->y, 32, 0);
+
+               if(ibuf && obuf){
+                       ibuf->rect_float=cbuf->rect;
+                       obuf->rect_float=stackbuf->rect;
+
+                       for(y=miny; y<maxy; y++) {
+                               yo= y+(int)centy;
+
+                               for(x=minx; x<maxx;x++) {
+                                       u=c*x + y*s + centx;
+                                       v=-s*x + c*y + centy;
+                                       xo= x+(int)centx;
+
+                                       switch(node->custom1) {
+                                       case 0:
+                                               neareast_interpolation(ibuf, obuf, u, v, xo, yo);
+                                               break ;
+                                       case 1:
+                                               bilinear_interpolation(ibuf, obuf, u, v, xo, yo);
+                                               break;
+                                       case 2:
+                                               bicubic_interpolation(ibuf, obuf, u, v, xo, yo);
+                                       }
+
+                               }
                        }
-        
-                /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
-                  s= sin(-rad);
-                  c= cos(-rad);
-                  centx= (float)cbuf->xof; centy= (float)cbuf->yof;
-                  stackbuf->xof= (int)( c*centx + s*centy);
-                  stackbuf->yof= (int)(-s*centx + c*centy);
+
+                       /* rotate offset vector too, but why negative rad, ehh?? Has to be replaced with [3][3] matrix once (ton) */
+                       s= sin(-rad);
+                       c= cos(-rad);
+                       centx= (float)cbuf->xof; centy= (float)cbuf->yof;
+                       stackbuf->xof= (int)( c*centx + s*centy);
+                       stackbuf->yof= (int)(-s*centx + c*centy);
 
                        IMB_freeImBuf(ibuf);
                        IMB_freeImBuf(obuf);
                }
-               
+
                /* pass on output and free */
                out[0]->data= stackbuf;
-               if(cbuf!=in[0]->data)
+               if(cbuf!=in[0]->data) {
                        free_compbuf(cbuf);
+               }
        }
 }
 
 static void node_composit_init_rotate(bNode *node)
 {
-   node->custom1= 1; /* Bilinear Filter*/
+       node->custom1= 1; /* Bilinear Filter*/
 }
 
 void register_node_type_cmp_rotate(ListBase *lb)
index 4e338c73c39560cceb35089785d22b1ba7a4c51c..653e3f4211b31f4f75c199f20d11055fa66f3c45 100644 (file)
@@ -69,7 +69,7 @@ static void node_composit_exec_sephsva(void *UNUSED(data), bNode *node, bNodeSta
        if(in[0]->data==NULL) {
                float h, s, v;
        
-      rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v);
+       rgb_to_hsv(in[0]->vec[0], in[0]->vec[1], in[0]->vec[2], &h, &s, &v);
                
                out[0]->vec[0] = h;
                out[1]->vec[0] = s;
index e00781741a0c7879716d8b837968c5d963b22252..18468bdd55c17237edd6e9e4f7f201ea141ba3a8 100644 (file)
@@ -114,14 +114,14 @@ static void valuefn(float *out, TexParams *p, bNode *node, bNodeStack **in, shor
                        /* Only raise negative numbers by full integers */
                        if( in0 >= 0 ) {
                                out[0]= pow(in0, in1);
-            } else {
-                float y_mod_1 = fmod(in1, 1);
+                       } else {
+                               float y_mod_1 = fmod(in1, 1);
                                if (y_mod_1 > 0.999f || y_mod_1 < 0.001f) {
                                        *out = pow(in0, floor(in1 + 0.5f));
-                } else {
-                    *out = 0.0;
-                }
-            }
+                               } else {
+                                       *out = 0.0;
+                               }
+                       }
                }
                break;
        case 11: /* Logarithm */
index 51b3c6d909f1108069d500d67f66a8d549fe0c37..b5e27ca2ccb7ec15b7cc2e5dcd239dea24e47b0b 100644 (file)
@@ -41,7 +41,7 @@
        retrieve the color from the delegate.
  
        comments: (ton)
-    
+
        This system needs recode, a node system should rely on the stack, and 
        callbacks for nodes only should evaluate own node, not recursively go
        over other previous ones.
index 2c15755a6427a5ae9fe3493fa3df3e4a33ce7649..5be3282d6e6282adc23ee9cf2171021afcb15574 100644 (file)
@@ -293,7 +293,7 @@ static PyObject *Buffer_item(PyObject *self, int i)
                size= BGL_typeSize(buf->type);
 
                newbuf= (Buffer *) PyObject_NEW(Buffer, &BGL_bufferType);
-    
+
                Py_INCREF(self);
                newbuf->parent= self;
 
@@ -1641,7 +1641,7 @@ PyObject *BPyInit_bgl(void)
        EXPP_ADDCONST(GL_TEXTURE_RESIDENT);
        EXPP_ADDCONST(GL_TEXTURE_BINDING_1D);
        EXPP_ADDCONST(GL_TEXTURE_BINDING_2D);
-      
+
        return submodule;
 }
 
index 7a7fd2b23b6c5794b5827263b36f8b7db1856bf0..340e3f4ac571d60345b06c3c23e3e6857d354c89 100644 (file)
@@ -76,12 +76,12 @@ static PyObject *bpy_script_paths(PyObject *UNUSED(self))
 {
        PyObject *ret= PyTuple_New(2);
        char *path;
-    
+
        path= BLI_get_folder(BLENDER_USER_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 0, PyUnicode_FromString(path?path:""));
        path= BLI_get_folder(BLENDER_SYSTEM_SCRIPTS, NULL);
        PyTuple_SET_ITEM(ret, 1, PyUnicode_FromString(path?path:""));
-    
+
        return ret;
 }
 
index 27260aed8d268dda9b8b2d8d2e67b905a336b701..df31fab6bde4f3e5c5b516d1e4df59b1e15f4c23 100644 (file)
@@ -255,7 +255,7 @@ float BPY_driver_exec(ChannelDriver *driver)
 
        if(use_gil)
                PyGILState_Release(gilstate);
-    
+
        if(finite(result)) {
                return (float)result;
        }
index 0afbe9a7003ad1fa42725343ef482de6251c56f2..284686048d36484a3b7ac99dfbac8169a9ebe7f0 100644 (file)
@@ -668,8 +668,8 @@ static struct PyModuleDef bpy_proxy_def= {
 };     
 
 typedef struct {
-    PyObject_HEAD
-    /* Type-specific fields go here. */
+       PyObject_HEAD
+       /* Type-specific fields go here. */
        PyObject *mod;
 } dealloc_obj;
 
index b5dec7205a6b30bacba08722a863cca81d968030..1a6caa02b0c1280f6349ce121a13144e461a8eba 100644 (file)
@@ -38,68 +38,68 @@ static const char *traceback_filepath(PyTracebackObject *tb)
 /* copied from pythonrun.c, 3.2.0 */
 static int
 parse_syntax_error(PyObject *err, PyObject **message, const char **filename,
-                   int *lineno, int *offset, const char **text)
+                                  int *lineno, int *offset, const char **text)
 {
-    long hold;
-    PyObject *v;
-
-    /* old style errors */
-    if (PyTuple_Check(err))
-        return PyArg_ParseTuple(err, "O(ziiz)", message, filename,
-                                lineno, offset, text);
-
-    /* new style errors.  `err' is an instance */
-
-    if (! (v = PyObject_GetAttrString(err, "msg")))
-        goto finally;
-    *message = v;
-
-    if (!(v = PyObject_GetAttrString(err, "filename")))
-        goto finally;
-    if (v == Py_None)
-        *filename = NULL;
-    else if (! (*filename = _PyUnicode_AsString(v)))
-        goto finally;
-
-    Py_DECREF(v);
-    if (!(v = PyObject_GetAttrString(err, "lineno")))
-        goto finally;
-    hold = PyLong_AsLong(v);
-    Py_DECREF(v);
-    v = NULL;
-    if (hold < 0 && PyErr_Occurred())
-        goto finally;
-    *lineno = (int)hold;
-
-    if (!(v = PyObject_GetAttrString(err, "offset")))
-        goto finally;
-    if (v == Py_None) {
-        *offset = -1;
-        Py_DECREF(v);
-        v = NULL;
+       long hold;
+       PyObject *v;
+
+       /* old style errors */
+       if (PyTuple_Check(err))
+               return PyArg_ParseTuple(err, "O(ziiz)", message, filename,
+                                                               lineno, offset, text);
+
+       /* new style errors.  `err' is an instance */
+
+       if (! (v = PyObject_GetAttrString(err, "msg")))
+               goto finally;
+       *message = v;
+
+       if (!(v = PyObject_GetAttrString(err, "filename")))
+               goto finally;
+       if (v == Py_None)
+               *filename = NULL;
+       else if (! (*filename = _PyUnicode_AsString(v)))
+               goto finally;
+
+       Py_DECREF(v);
+       if (!(v = PyObject_GetAttrString(err, "lineno")))
+               goto finally;
+       hold = PyLong_AsLong(v);
+       Py_DECREF(v);
+       v = NULL;
+       if (hold < 0 && PyErr_Occurred())
+               goto finally;
+       *lineno = (int)hold;
+
+       if (!(v = PyObject_GetAttrString(err, "offset")))
+               goto finally;
+       if (v == Py_None) {
+               *offset = -1;
+               Py_DECREF(v);
+               v = NULL;
        }
        else {
-        hold = PyLong_AsLong(v);
-        Py_DECREF(v);
-        v = NULL;
-        if (hold < 0 && PyErr_Occurred())
-            goto finally;
-        *offset = (int)hold;
-    }
-
-    if (!(v = PyObject_GetAttrString(err, "text")))
-        goto finally;
-    if (v == Py_None)
-        *text = NULL;
-    else if (!PyUnicode_Check(v) ||
-             !(*text = _PyUnicode_AsString(v)))
-        goto finally;
-    Py_DECREF(v);
-    return 1;
+               hold = PyLong_AsLong(v);
+               Py_DECREF(v);
+               v = NULL;
+               if (hold < 0 && PyErr_Occurred())
+                       goto finally;
+               *offset = (int)hold;
+       }
+
+       if (!(v = PyObject_GetAttrString(err, "text")))
+               goto finally;
+       if (v == Py_None)
+               *text = NULL;
+       else if (!PyUnicode_Check(v) ||
+                        !(*text = _PyUnicode_AsString(v)))
+               goto finally;
+       Py_DECREF(v);
+       return 1;
 
 finally:
-    Py_XDECREF(v);
-    return 0;
+       Py_XDECREF(v);
+       return 0;
 }
 /* end copied function! */
 
@@ -122,7 +122,7 @@ void python_script_error_jump(const char *filepath, int *lineno, int *offset)
 
                if(value) { /* should always be true */
                        PyObject *message;
-               const char *filename, *text;
+                       const char *filename, *text;
 
                        if(parse_syntax_error(value, &message, &filename, lineno, offset, &text)) {
                                /* python adds a '/', prefix, so check for both */
index c1aea4c90fcf26337f2400496c2d579e15669412..93062bfb59a8f5b93db7933ab099164c3a6f5475 100644 (file)
@@ -3726,7 +3726,7 @@ static GroupObject *add_render_lamp(Render *re, Object *ob)
                
                        VECCOPY(vec,ob->obmat[2]);
                        normalize_v3(vec);
-                   
+
                        InitSunSky(lar->sunsky, la->atm_turbidity, vec, la->horizon_brightness, 
                                        la->spread, la->sun_brightness, la->sun_size, la->backscattered_light,
                                           la->skyblendfac, la->skyblendtype, la->sky_exposure, la->sky_colorspace);
index a22680c708531ec194e256fe1740cabd95d15670..d66f40225fa47ab7dc1673e6d3fcd7dc6c9fa849 100644 (file)
@@ -81,7 +81,7 @@ void addAlphaOverFloat(float *dest, float *source)
 {
        /* d = s + (1-alpha_s)d*/
        float mul;
-    
+
        mul= 1.0 - source[3];
 
        dest[0]= (mul*dest[0]) + source[0];
@@ -131,7 +131,7 @@ void addalphaAddfacFloat(float *dest, float *source, char addfac)
        else 
 #endif
                dest[1]= c;
-    
+
        c= (m * dest[2]) + source[2];
 #ifdef RE_FLOAT_COLOR_CLIPPING
        if(c >= RE_FULL_COLOR_FLOAT) dest[2] = RE_FULL_COLOR_FLOAT; 
index 2b98e7a3f96d4444508344be51e8f5d5c8201546..f7bf370c0bece530b550faf657d53a432f2e16f5 100644 (file)
@@ -3198,7 +3198,7 @@ void do_lamp_tex(LampRen *la, float *lavec, ShadeInput *shi, float *colf, int ef
                                if(la->type==LA_SPOT) {
                                        tempvec[0]*= la->spottexfac;
                                        tempvec[1]*= la->spottexfac;
-                    /* project from 3d to 2d */
+                               /* project from 3d to 2d */
                                        tempvec[0] /= -tempvec[2];
                                        tempvec[1] /= -tempvec[2];
                                }
index d34ef85baa429a0a3400db2a017bdd65ae0fa28a..e575776ec79329d0f8583e1c48d409d11ac2db82 100644 (file)
@@ -138,7 +138,7 @@ void shade_material_loop(ShadeInput *shi, ShadeResult *shr)
        /* depth >= 1 when ray-shading */
        if(shi->depth==0 || shi->volume_depth > 0) {
                if(R.r.mode & R_RAYTRACE) {
-                   if(shi->ray_mirror!=0.0f || ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f)) {
+                       if(shi->ray_mirror!=0.0f || ((shi->mode & MA_TRANSP) && (shi->mode & MA_RAYTRANSP) && shr->alpha!=1.0f)) {
                                /* ray trace works on combined, but gives pass info */
                                ray_trace(shi, shr);
                        }
index f10398388c1448015226cd735529623cad5c721b..919c06d81f769b7ae9ae808643b2eefb6ed7caaa 100644 (file)
@@ -142,13 +142,12 @@ void InitSunSky(struct SunSky *sunsky, float turb, float *toSun, float horizon_b
                                float spread,float sun_brightness, float sun_size, float back_scatter,
                                float skyblendfac, short skyblendtype, float sky_exposure, float sky_colorspace)
 {
-    
-          float theta2;
+       float theta2;
        float theta3;
        float T;
        float T2;
        float chi;
-        
+
        sunsky->turbidity = turb;
 
        sunsky->horizon_brightness = horizon_brightness;
@@ -247,8 +246,8 @@ void GetSkyXYZRadiance(struct SunSky* sunsky, float theta, float phi, float colo
        float gamma;
        float x,y,Y,X,Z;
        float hfade=1, nfade=1;
-    
-    
+
+
        if (theta>(0.5*M_PI)) {
                hfade = 1.0-(theta*M_1_PI-0.5)*2.0;
                hfade = hfade*hfade*(3.0-2.0*hfade);
@@ -320,7 +319,7 @@ void ComputeAttenuatedSunlight(float theta, int turbidity, float fTau[3])
        float fTauR, fTauA;
        float m ;
        float fAlpha;
-    
+
        int i;
        float fLambda[3]; 
        fLambda[0] = 0.65f;     
index 54a8ba99db5262b5e94ac65a592cbb21d3d9b5d5..e75ee6ed469213b992f304a27a6b120267eb2b38 100644 (file)
@@ -414,7 +414,7 @@ void multiple_scattering_diffusion(Render *re, VolumePrecache *vp, Material *ma)
                SWAP(float *,sr,sr0);
                SWAP(float *,sg,sg0);
                SWAP(float *,sb,sb0);
-               
+
                /* main diffusion simulation */
                ms_diffuse(sr0, sr, diff, n);
                ms_diffuse(sg0, sg, diff, n);
index cb2214ee42dbe2af53d7e9249200c3c3c981c2cc..b7d1a30048ff2a9c603805c28881b922b6539ac2 100644 (file)
@@ -186,13 +186,13 @@ static void blender_esc(int sig)
 #ifdef BUILD_DATE
 static void strip_quotes(char *str)
 {
-    if(str[0] == '"') {
-        int len= strlen(str) - 1;
-        memmove(str, str+1, len);
-        if(str[len-1] == '"') {
-            str[len-1]= '\0';
-        }
-    }
+       if(str[0] == '"') {
+               int len= strlen(str) - 1;
+               memmove(str, str+1, len);
+               if(str[len-1] == '"') {
+                       str[len-1]= '\0';
+               }
+       }
 }
 #endif