style cleanup: pep8, indentation
authorCampbell Barton <ideasman42@gmail.com>
Sat, 24 Mar 2012 07:36:32 +0000 (07:36 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 24 Mar 2012 07:36:32 +0000 (07:36 +0000)
30 files changed:
doc/python_api/sphinx_doc_gen.py
release/scripts/startup/bl_operators/add_mesh_torus.py
release/scripts/startup/bl_operators/presets.py
release/scripts/startup/bl_ui/space_sequencer.py
release/scripts/startup/bl_ui/space_view3d.py
source/blender/blenkernel/intern/customdata.c
source/blender/blenkernel/intern/node.c
source/blender/blenlib/intern/freetypefont.c
source/blender/blenlib/intern/math_matrix.c
source/blender/blenlib/intern/string_utf8.c
source/blender/bmesh/intern/bmesh_marking.c
source/blender/bmesh/intern/bmesh_walkers_impl.c
source/blender/bmesh/operators/bmo_mirror.c
source/blender/collada/ArmatureImporter.cpp
source/blender/editors/interface/interface_regions.c
source/blender/editors/sculpt_paint/sculpt.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_node/node_edit.c
source/blender/gpu/intern/gpu_buffers.c
source/blender/ikplugin/intern/itasc_plugin.cpp
source/blender/imbuf/intern/dds/BlockDXT.cpp
source/blender/imbuf/intern/dds/ColorBlock.cpp
source/blender/makesrna/intern/rna_scene.c
source/blender/makesrna/intern/rna_tracking.c
source/blender/python/generic/py_capi_utils.c
source/gameengine/Expressions/ErrorValue.cpp
source/gameengine/Expressions/Operator2Expr.cpp
source/gameengine/GameLogic/SCA_IInputDevice.cpp
source/gameengine/GameLogic/SCA_KeyboardManager.cpp
source/gameengine/VideoTexture/ImageRender.cpp

index 9ff82e8fd16fc210d39290605c14a425fb1d894c..60ec027a8c77a207b914393f326604f5b5e14dc7 100644 (file)
@@ -131,7 +131,7 @@ def handle_args():
                         dest="sphinx_theme",
                         type=str,
                         default='default',
-                        help=
+                        help =
                         # see SPHINX_THEMES below
                         "Sphinx theme (default='default')\n"
                         "Available themes\n"
@@ -448,6 +448,7 @@ else:
 def is_struct_seq(value):
     return isinstance(value, tuple) and type(tuple) != tuple and hasattr(value, "n_fields")
 
+
 def undocumented_message(module_name, type_name, identifier):
     if str(type_name).startswith('<module'):
         preloadtitle = '%s.%s' % (module_name, identifier)
@@ -503,7 +504,7 @@ def example_extract_docstring(filepath):
 
 def title_string(text, heading_char, double=False):
     filler = len(text) * heading_char
-    
+
     if double:
         return "%s\n%s\n%s\n\n" % (filler, text, filler)
     else:
@@ -692,6 +693,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
     # TODO - currently only used for classes
     # grouping support
     module_grouping = MODULE_GROUPING.get(module_name)
+
     def module_grouping_index(name):
         if module_grouping is not None:
             try:
@@ -706,11 +708,10 @@ def pymodule2sphinx(basepath, module_name, module, title):
             if i >= 0 and type(module_grouping[i]) == tuple:
                 return module_grouping[i]
         return None, None
-        
+
     def module_grouping_sort_key(name):
         return module_grouping_index(name)
     # done grouping support
-    
 
     file = open(filepath, "w", encoding="utf-8")
 
@@ -866,7 +867,7 @@ def pymodule2sphinx(basepath, module_name, module, title):
 
     # write collected classes now
     for (type_name, value) in classes:
-        
+
         if module_grouping is not None:
             heading, heading_char = module_grouping_heading(type_name)
             if heading:
@@ -1778,7 +1779,7 @@ def main():
         bpy_logfilehandler = logging.FileHandler(bpy_logfile, mode="w")
         bpy_logfilehandler.setLevel(logging.DEBUG)
         BPY_LOGGER.addHandler(bpy_logfilehandler)
-    
+
         # using a FileHandler seems to disable the stdout, so we add a StreamHandler
         bpy_log_stdout_handler = logging.StreamHandler(stream=sys.stdout)
         bpy_log_stdout_handler.setLevel(logging.DEBUG)
@@ -1872,7 +1873,7 @@ def main():
             # zip REFERENCE_PATH
             basename = os.path.join(ARGS.output_dir, REFERENCE_NAME)
             tmp_path = shutil.make_archive(basename, 'zip',
-                                           root_dir=ARGS.output_dir, 
+                                           root_dir=ARGS.output_dir,
                                            base_dir=REFERENCE_NAME)
             final_path = os.path.join(REFERENCE_PATH, BLENDER_ZIP_FILENAME)
             os.rename(tmp_path, final_path)
index c8085a915f3e21024ec01e13057aa17171a225fb..74f7b9c0f780eada7bbec45567df294c8fd41065 100644 (file)
@@ -147,7 +147,7 @@ class AddTorus(Operator, object_utils.AddObjectHelper):
         mesh = bpy.data.meshes.new("Torus")
 
         mesh.vertices.add(len(verts_loc) // 3)
-        
+
         # BMESH_TODO, use polygons
         mesh.faces.add(len(faces) // 4)
 
index abd940e06f96ef2d24992043c06b18874aa89936..da6ef7483f242c12a8d1b253d06125d20b4f805a 100644 (file)
@@ -22,6 +22,7 @@ import bpy
 from bpy.types import Menu, Operator
 from bpy.props import StringProperty, BoolProperty
 
+
 class AddPresetBase():
     '''Base preset class, only for subclassing
     subclasses must define
index 4640e82b53f19323059b17dbc4da77284feb4ca6..d3618d752dc119e35aab42c235e70356ecd6484e 100644 (file)
@@ -728,7 +728,7 @@ class SEQUENCER_PT_filter(SequencerButtonsPanel, Panel):
             col = layout.column()
             col.label(text="Distortion:")
             col.prop(strip, "undistort")
-   
+
         row = layout.row()
         row.label(text="Flip:")
         row.prop(strip, "use_flip_x", text="X")
index 838f2cd961bcb15f09e88fca3df06e947d447490..b56df9fd7b0724bf4ac8c85ab4d193271d6b7337 100644 (file)
@@ -1050,7 +1050,7 @@ class VIEW3D_MT_brush(Menu):
         layout.prop(ups, "use_unified_size", text="Unified Size")
         layout.prop(ups, "use_unified_strength", text="Unified Strength")
         layout.separator()
-        
+
         # brush paint modes
         layout.menu("VIEW3D_MT_brush_paint_modes")
 
@@ -1088,6 +1088,7 @@ class VIEW3D_MT_brush(Menu):
                     layout.prop(brush, "use_persistent")
                     layout.operator("sculpt.set_persistent_base")
 
+
 class VIEW3D_MT_brush_paint_modes(Menu):
     bl_label = "Enabled Modes"
 
@@ -1242,7 +1243,7 @@ class VIEW3D_MT_hide(Menu):
         op = layout.operator("paint.hide_show", text="Show Bounding Box")
         op.action = 'SHOW'
         op.area = 'INSIDE'
-    
+
 
 # ********** Particle menu **********
 
index a48f2550b48aaba3e3ab721ec8221a6ce6df8e45..301ba282cbd907b2eec7580461737cd413a88ea5 100644 (file)
@@ -1828,11 +1828,11 @@ void CustomData_copy_data(const CustomData *source, CustomData *dest,
                        dest_offset = dest_index * typeInfo->size;
                        
                        if (!src_data || !dest_data) {
-                if (src_data != NULL && dest_data != NULL) {
-                    printf("%s: warning null data for %s type (%p --> %p), skipping\n",
-                           __func__, layerType_getName(source->layers[src_i].type),
-                           (void *)src_data, (void *)dest_data);
-                }
+                               if (src_data != NULL && dest_data != NULL) {
+                                       printf("%s: warning null data for %s type (%p --> %p), skipping\n",
+                                              __func__, layerType_getName(source->layers[src_i].type),
+                                              (void *)src_data, (void *)dest_data);
+                               }
                                continue;
                        }
                        
index a1ea201bd7a3c337ad9792712b5887d83a70aaaa..cbdbf0317b4774ac395a8dd2196c5d308d2c82af 100644 (file)
@@ -1913,7 +1913,7 @@ static void registerCompositNodes(bNodeTreeType *ttype)
        register_node_type_cmp_channel_matte(ttype);
        register_node_type_cmp_color_spill(ttype);
        register_node_type_cmp_luma_matte(ttype);
-    register_node_type_cmp_doubleedgemask(ttype);
+       register_node_type_cmp_doubleedgemask(ttype);
 
        register_node_type_cmp_translate(ttype);
        register_node_type_cmp_rotate(ttype);
index 019915b31284d49012ec9bb8b0f7c122322b3d5c..a9a1f2bc57e8ef0b794da228c093f18f677850af 100644 (file)
@@ -538,8 +538,7 @@ typedef struct  FT_Outline_
        short*      contours;        /* the contour end points             */
 
        int         flags;           /* outline masks                      */
-
-  } FT_Outline;
+} FT_Outline;
 
 #endif
 
index b32c5b833aee361fee17d1ccebffbbaa5cd634fe..fd49012491e14ac8b7d2d731114a26ded81b589b 100644 (file)
@@ -811,36 +811,36 @@ void orthogonalize_m4(float mat[][4], int axis)
 
 int is_orthogonal_m3(float m[][3])
 {
-    int i, j;
+       int i, j;
 
-    for (i = 0; i < 3; i++) {
-        for (j = 0; j < i; j++) {
-            if (fabsf(dot_v3v3(m[i], m[j])) > 1.5f * FLT_EPSILON)
-                return 0;
-        }
+       for (i = 0; i < 3; i++) {
+               for (j = 0; j < i; j++) {
+                       if (fabsf(dot_v3v3(m[i], m[j])) > 1.5f * FLT_EPSILON)
+                               return 0;
+               }
 
-        if (fabsf(dot_v3v3(m[i], m[i]) - 1) > 1.5f * FLT_EPSILON)
-            return 0;
-    }
+               if (fabsf(dot_v3v3(m[i], m[i]) - 1) > 1.5f * FLT_EPSILON)
+                       return 0;
+       }
 
-    return 1;
+       return 1;
 }
 
 int is_orthogonal_m4(float m[][4])
 {
-    int i, j;
+       int i, j;
 
-    for (i = 0; i < 4; i++) {
-        for (j = 0; j < i; j++) {
-            if (fabsf(dot_vn_vn(m[i], m[j], 4)) > 1.5f * FLT_EPSILON)
-                return 0;
-        }
+       for (i = 0; i < 4; i++) {
+               for (j = 0; j < i; j++) {
+                       if (fabsf(dot_vn_vn(m[i], m[j], 4)) > 1.5f * FLT_EPSILON)
+                               return 0;
+               }
 
-        if (fabsf(dot_vn_vn(m[i], m[i], 4) - 1) > 1.5f * FLT_EPSILON)
-            return 0;
-    }
+               if (fabsf(dot_vn_vn(m[i], m[i], 4) - 1) > 1.5f * FLT_EPSILON)
+                       return 0;
+       }
 
-    return 1;
+       return 1;
 }
 
 void normalize_m3(float mat[][3])
index 6f181c1ee6e7e9a060b60f8327819155bdc6efeb..aede08be7f936d979622ab9e4d7de1dd2c0d753c 100644 (file)
@@ -359,16 +359,16 @@ int BLI_str_utf8_size(const char *p)
  **/
 unsigned int BLI_str_utf8_as_unicode(const char *p)
 {
-  int i, mask = 0, len;
-  unsigned int result;
-  unsigned char c = (unsigned char) *p;
+       int i, mask = 0, len;
+       unsigned int result;
+       unsigned char c = (unsigned char) *p;
 
-  UTF8_COMPUTE (c, mask, len);
-  if (len == -1)
-    return BLI_UTF8_ERR;
-  UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
+       UTF8_COMPUTE (c, mask, len);
+       if (len == -1)
+               return BLI_UTF8_ERR;
+       UTF8_GET (result, p, i, mask, len, BLI_UTF8_ERR);
 
-  return result;
+       return result;
 }
 
 /* variant that increments the length */
index b5e8b42c30c4546c77dd21e1b8a1ae6bb58ac9c7..0318fd94b9223330cbfcf694d8b79652f48f65f7 100644 (file)
@@ -288,9 +288,9 @@ void BM_edge_select_set(BMesh *bm, BMEdge *e, int select)
                if (BM_elem_flag_test(e, BM_ELEM_SELECT)) bm->totedgesel -= 1;
                BM_elem_flag_disable(e, BM_ELEM_SELECT);
 
-               if ( bm->selectmode == SCE_SELECT_EDGE ||
-                    bm->selectmode == SCE_SELECT_FACE ||
-                    bm->selectmode == (SCE_SELECT_EDGE | SCE_SELECT_FACE))
+               if (bm->selectmode == SCE_SELECT_EDGE ||
+                   bm->selectmode == SCE_SELECT_FACE ||
+                   bm->selectmode == (SCE_SELECT_EDGE | SCE_SELECT_FACE))
                {
 
                        BMIter iter;
@@ -312,9 +312,9 @@ void BM_edge_select_set(BMesh *bm, BMEdge *e, int select)
                                        }
                                }
 
-                if (deselect) {
-                    BM_vert_select_set(bm, verts[i], FALSE);
-                }
+                               if (deselect) {
+                                       BM_vert_select_set(bm, verts[i], FALSE);
+                               }
                        }
                }
                else {
index d996d756bdc2ba8fbf29e2bda77ba313c0bdd47f..493be46c9764c4ee17b021e7a53444eab6ea5a56 100644 (file)
@@ -475,17 +475,17 @@ static void *bmw_LoopWalker_step(BMWalker *walker)
                        l = BM_face_other_vert_loop(owalk.f_hub, lwalk->lastv, v);
                        nexte = BM_edge_exists(v, l->v);
 
-            if (!BLI_ghash_haskey(walker->visithash, nexte)) {
-                lwalk = BMW_state_add(walker);
-                lwalk->cur = nexte;
-                lwalk->lastv = v;
+                       if (!BLI_ghash_haskey(walker->visithash, nexte)) {
+                               lwalk = BMW_state_add(walker);
+                               lwalk->cur = nexte;
+                               lwalk->lastv = v;
 
-                lwalk->is_boundary = owalk.is_boundary;
-                lwalk->is_single = owalk.is_single;
-                lwalk->f_hub = owalk.f_hub;
+                               lwalk->is_boundary = owalk.is_boundary;
+                               lwalk->is_single = owalk.is_single;
+                               lwalk->f_hub = owalk.f_hub;
 
-                BLI_ghash_insert(walker->visithash, nexte, NULL);
-            }
+                               BLI_ghash_insert(walker->visithash, nexte, NULL);
+                       }
                }
        }
        else if (l) { /* NORMAL EDGE WITH FACES */
index e36a8636b9b0a9b449c43e82e32c82679dee2de3..268009dc9affca26ab50638b77a4bf80114fa2be 100644 (file)
@@ -48,7 +48,7 @@ void bmo_mirror_exec(BMesh *bm, BMOperator *op)
        float scale[3] = {1.0f, 1.0f, 1.0f};
        float dist = BMO_slot_float_get(op, "mergedist");
        int i, ototvert /*, ototedge */;
-    int axis = BMO_slot_int_get(op, "axis");
+       int axis = BMO_slot_int_get(op, "axis");
        int mirroru = BMO_slot_bool_get(op, "mirror_u");
        int mirrorv = BMO_slot_bool_get(op, "mirror_v");
 
index 11a48fd3cfdb059ace922063023af0bb43856a08..8a5461710f628226b4189988ae590f0f75ccaaf5 100644 (file)
@@ -574,7 +574,7 @@ void ArmatureImporter::set_pose ( Object * ob_arm ,  COLLADAFW::Node * root_node
 { 
        char * bone_name = (char *) bc_get_joint_name ( root_node);
        float mat[4][4];
-   float obmat[4][4];
+       float obmat[4][4];
 
        float ax[3];
        float angle = 0.0f;
index ef6cbc9ae4850bdb644a0203fa330fc4ab2160f0..ff72c13aa34e90054bd5ccf6f6163351f775f34c 100644 (file)
@@ -449,7 +449,7 @@ ARegion *ui_tooltip_create(bContext *C, ARegion *butregion, uiBut *but)
                                if (item[i].identifier[0] && item[i].value == value) {
                                        if (item[i].description && item[i].description[0]) {
                                                BLI_snprintf(data->lines[data->totline], sizeof(data->lines[0]), "%s: %s", item[i].name, item[i].description);
-                        data->color_id[data->totline] = UI_TIP_LC_SUBMENU;
+                                               data->color_id[data->totline] = UI_TIP_LC_SUBMENU;
                                                data->totline++;
                                        }
                                        break;
index 319570cf65ed5e886f7a63800ee0c24a05fa858b..e91f26fc9ba38942b5f0262f3a809aff0d862e05 100644 (file)
@@ -2960,7 +2960,7 @@ static void sculpt_update_brush_delta(Sculpt *sd, Object *ob, Brush *brush)
 
                /* compute 3d coordinate at same z from original location + mouse */
                mul_v3_m4v3(loc, ob->obmat, cache->orig_grab_location);
-               initgrabz(cache->vc->rv3d, loc[0], loc[1], loc[2]);
+               initgrabz(cache->vc->rv3d, loc[0], loc[1], loc[2]);
 
                ED_view3d_win_to_3d(cache->vc->ar, loc, mouse, grab_location);
 
index 2fa7f447f3841a387d7bc69c326c865be07ff841..ff8feb69bd9b63cfe79f770cf7f5d88267f6acc0 100644 (file)
@@ -877,12 +877,12 @@ static int proxy_bitflag_to_array(int size_flag, int build_sizes[4], int undisto
        int build_count = 0;
        int size_flags[2][4] = {{MCLIP_PROXY_SIZE_25,
                                 MCLIP_PROXY_SIZE_50,
-                             MCLIP_PROXY_SIZE_75,
-                             MCLIP_PROXY_SIZE_100},
-                            {MCLIP_PROXY_UNDISTORTED_SIZE_25,
-                             MCLIP_PROXY_UNDISTORTED_SIZE_50,
-                             MCLIP_PROXY_UNDISTORTED_SIZE_75,
-                             MCLIP_PROXY_UNDISTORTED_SIZE_100}};
+                                MCLIP_PROXY_SIZE_75,
+                                MCLIP_PROXY_SIZE_100},
+                               {MCLIP_PROXY_UNDISTORTED_SIZE_25,
+                                MCLIP_PROXY_UNDISTORTED_SIZE_50,
+                                MCLIP_PROXY_UNDISTORTED_SIZE_75,
+                                MCLIP_PROXY_UNDISTORTED_SIZE_100}};
        int size_nr = undistort ? 1 : 0;
 
        if (size_flag & size_flags[size_nr][0]) build_sizes[build_count++]= MCLIP_PROXY_RENDER_SIZE_25;
index 189d2307a7e2b8408169ceea6963ec0adfc8ec1e..d95947142f9efae4661ee267d6a8ad50fc06973c 100644 (file)
@@ -3511,9 +3511,9 @@ void NODE_OT_add_file(wmOperatorType *ot)
        ot->idname = "NODE_OT_add_file";
        
        /* callbacks */
-    ot->exec = node_add_file_exec;
+       ot->exec = node_add_file_exec;
        ot->invoke = node_add_file_invoke;
-    ot->poll = ED_operator_node_active;
+       ot->poll = ED_operator_node_active;
        
        /* flags */
        ot->flag = OPTYPE_REGISTER|OPTYPE_UNDO;
index bf4df2e9b0aebfaf9c6bf2f33c1597df8a853f19..61d563a54e0a367e33cf3ec49eac8b0a6fb7610b 100644 (file)
@@ -73,15 +73,15 @@ static GPUBufferState GLStates = 0;
 static GPUAttrib attribData[MAX_GPU_ATTRIB_DATA] = { { -1, 0, 0 } };
 
 /* stores recently-deleted buffers so that new buffers won't have to
  be recreated as often
-
  only one instance of this pool is created, stored in
  gpu_buffer_pool
-
  note that the number of buffers in the pool is usually limited to
  MAX_FREE_GPU_BUFFERS, but this limit may be exceeded temporarily
  when a GPUBuffer is released outside the main thread; due to OpenGL
  restrictions it cannot be immediately released
* be recreated as often
+ *
* only one instance of this pool is created, stored in
* gpu_buffer_pool
+ *
* note that the number of buffers in the pool is usually limited to
* MAX_FREE_GPU_BUFFERS, but this limit may be exceeded temporarily
* when a GPUBuffer is released outside the main thread; due to OpenGL
* restrictions it cannot be immediately released
  */
 typedef struct GPUBufferPool {
        /* number of allocated buffers stored */
@@ -160,7 +160,7 @@ static void gpu_buffer_pool_free(GPUBufferPool *pool)
        if (!pool)
                return;
        
-       while(pool->totbuf)
+       while (pool->totbuf)
                gpu_buffer_pool_delete_last(pool);
 
        MEM_freeN(pool->buffers);
@@ -248,7 +248,7 @@ GPUBuffer *GPU_buffer_alloc(int size)
                   out-of-memory errors? looks a bit iffy to me
                   though, at least on Linux I expect malloc() would
                   just overcommit. --nicholas */
-               while(!buf->pointer && pool->totbuf > 0) {
+               while (!buf->pointer && pool->totbuf > 0) {
                        gpu_buffer_pool_delete_last(pool);
                        buf->pointer = MEM_mallocN(size, "GPUBuffer.pointer");
                }
@@ -279,7 +279,7 @@ void GPU_buffer_free(GPUBuffer *buffer)
        if (BLI_thread_is_main()) {
                /* in main thread, safe to decrease size of pool back
                   down to MAX_FREE_GPU_BUFFERS */
-               while(pool->totbuf >= MAX_FREE_GPU_BUFFERS)
+               while (pool->totbuf >= MAX_FREE_GPU_BUFFERS)
                        gpu_buffer_pool_delete_last(pool);
        }
        else {
@@ -507,7 +507,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
        if (useVBOs) {
                success = 0;
 
-               while(!success) {
+               while (!success) {
                        /* bind the buffer and discard previous data,
                           avoids stalling gpu */
                        glBindBufferARB(target, buffer->id);
@@ -543,7 +543,7 @@ static GPUBuffer *gpu_buffer_setup(DerivedMesh *dm, GPUDrawObject *object,
                if (dm->drawObject->legacy == 0) {
                        uploaded = GL_FALSE;
                        /* attempt to upload the data to the VBO */
-                       while(uploaded == GL_FALSE) {
+                       while (uploaded == GL_FALSE) {
                                (*copy_f)(dm, varray, cur_index_per_mat, mat_orig_to_new, user);
                                /* glUnmapBuffer returns GL_FALSE if
                                 * the data store is corrupted; retry
@@ -1161,8 +1161,8 @@ void GPU_buffer_unbind(void)
 }
 
 /* confusion: code in cdderivedmesh calls both GPU_color_setup and
  GPU_color3_upload; both of these set the `colors' buffer, so seems
  like it will just needlessly overwrite? --nicholas */
* GPU_color3_upload; both of these set the `colors' buffer, so seems
* like it will just needlessly overwrite? --nicholas */
 void GPU_color3_upload(DerivedMesh *dm, unsigned char *data)
 {
        if (dm->drawObject == 0)
@@ -1494,27 +1494,27 @@ static int gpu_count_grid_quads(BLI_bitmap *grid_hidden,
 
 /* Build the element array buffer of grid indices using either
    unsigned shorts or unsigned ints. */
-#define FILL_QUAD_BUFFER(type_, tot_quad_, buffer_)                                            \
+#define FILL_QUAD_BUFFER(type_, tot_quad_, buffer_)                     \
        {                                                                   \
                type_ *quad_data;                                               \
                int offset = 0;                                                 \
-        int i, j, k;                                                    \
-                                                                        \
+               int i, j, k;                                                    \
+                                                                               \
                glBufferDataARB(GL_ELEMENT_ARRAY_BUFFER_ARB,                    \
-                                               sizeof(type_) * (tot_quad_) * 4, NULL,                  \
+                                               sizeof(type_) * (tot_quad_) * 4, NULL,          \
                                                GL_STATIC_DRAW_ARB);                            \
-                                                                        \
+                                                                               \
                /* Fill the quad buffer */                                      \
                quad_data = glMapBufferARB(GL_ELEMENT_ARRAY_BUFFER_ARB,         \
                                                                   GL_WRITE_ONLY_ARB);                  \
-               if (quad_data) {                                                 \
+               if (quad_data) {                                                \
                        for (i = 0; i < totgrid; ++i) {                                                         \
                                BLI_bitmap gh = NULL;                                                                   \
-                               if (grid_hidden)                                                                                        \
+                               if (grid_hidden)                                                                                \
                                        gh = grid_hidden[(grid_indices)[i]];                            \
                                                                                                                                                \
-                               for (j = 0; j < gridsize-1; ++j) {                       \
-                                       for (k = 0; k < gridsize-1; ++k) {                   \
+                               for (j = 0; j < gridsize-1; ++j) {                      \
+                                       for (k = 0; k < gridsize-1; ++k) {                  \
                                                /* Skip hidden grid face */                                             \
                                                if (gh &&                                                                               \
                                                   paint_is_grid_face_hidden(gh,                                \
index 7237015872345ae574eaf71ccf2e05551dd079fc..0f178366b392d2cb50466fb371cea7608979bcdc 100644 (file)
@@ -428,14 +428,14 @@ static double EulerAngleFromMatrix(const KDL::Rotation& R, int axis)
 
        if (t > 16.0*KDL::epsilon) {
                if (axis == 0) return -KDL::atan2(R(1,2), R(2,2));
-        else if(axis == 1) return KDL::atan2(-R(0,2), t);
-        else return -KDL::atan2(R(0,1), R(0,0));
+               else if(axis == 1) return KDL::atan2(-R(0,2), t);
+               else return -KDL::atan2(R(0,1), R(0,0));
        }
        else {
                if (axis == 0) return -KDL::atan2(-R(2,1), R(1,1));
-        else if(axis == 1) return KDL::atan2(-R(0,2), t);
-        else return 0.0f;
-    }
+               else if(axis == 1) return KDL::atan2(-R(0,2), t);
+               else return 0.0f;
+       }
 }
 
 static double ComputeTwist(const KDL::Rotation& R)
@@ -474,29 +474,29 @@ static void RemoveEulerAngleFromMatrix(KDL::Rotation& R, double angle, int axis)
 static void GetEulerXZY(const KDL::Rotation& R, double& X,double& Z,double& Y)
 {
        if (fabs(R(0,1)) > 1.0 - KDL::epsilon ) {
-        X = -KDL::sign(R(0,1)) * KDL::atan2(R(1,2), R(1,0));
-        Z = -KDL::sign(R(0,1)) * KDL::PI / 2;
-        Y = 0.0;
+               X = -KDL::sign(R(0,1)) * KDL::atan2(R(1,2), R(1,0));
+               Z = -KDL::sign(R(0,1)) * KDL::PI / 2;
+               Y = 0.0;
        }
        else {
-        X = KDL::atan2(R(2,1), R(1,1));
-        Z = KDL::atan2(-R(0,1), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,2))));
-        Y = KDL::atan2(R(0,2), R(0,0));
-    }
+               X = KDL::atan2(R(2,1), R(1,1));
+               Z = KDL::atan2(-R(0,1), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,2))));
+               Y = KDL::atan2(R(0,2), R(0,0));
+       }
 }
 
 static void GetEulerXYZ(const KDL::Rotation& R, double& X,double& Y,double& Z)
 {
        if (fabs(R(0,2)) > 1.0 - KDL::epsilon ) {
-        X = KDL::sign(R(0,2)) * KDL::atan2(-R(1,0), R(1,1));
-        Y = KDL::sign(R(0,2)) * KDL::PI / 2;
-        Z = 0.0;
+               X = KDL::sign(R(0,2)) * KDL::atan2(-R(1,0), R(1,1));
+               Y = KDL::sign(R(0,2)) * KDL::PI / 2;
+               Z = 0.0;
        }
        else {
-        X = KDL::atan2(-R(1,2), R(2,2));
-        Y = KDL::atan2(R(0,2), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,1))));
-        Z = KDL::atan2(-R(0,1), R(0,0));
-    }
+               X = KDL::atan2(-R(1,2), R(2,2));
+               Y = KDL::atan2(R(0,2), KDL::sqrt( KDL::sqr(R(0,0)) + KDL::sqr(R(0,1))));
+               Z = KDL::atan2(-R(0,1), R(0,0));
+       }
 }
 #endif
 
index 2ea255234e5833206451e9fddc80236e7214a22d..49ba566b6e8d039eafbba619ec85466121df0065 100644 (file)
@@ -135,27 +135,27 @@ uint BlockDXT1::evaluatePaletteNV5x(Color32 color_array[4]) const
        color_array[1].b = (3 * col1.b * 22) / 8;
        color_array[1].a = 0xFF;
        
-    int gdiff = color_array[1].g - color_array[0].g;
+       int gdiff = color_array[1].g - color_array[0].g;
 
        if( col0.u > col1.u ) {
                // Four-color block: derive the other two colors.
-        color_array[2].r = ((2 * col0.r + col1.r) * 22) / 8;
-        color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 80) / 256;
-        color_array[2].b = ((2 * col0.b + col1.b) * 22) / 8;
+               color_array[2].r = ((2 * col0.r + col1.r) * 22) / 8;
+               color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 80) / 256;
+               color_array[2].b = ((2 * col0.b + col1.b) * 22) / 8;
                color_array[2].a = 0xFF;
                
-        color_array[3].r = ((2 * col1.r + col0.r) * 22) / 8;
-        color_array[3].g = (256 * color_array[1].g - gdiff / 4 + 128 - gdiff * 80) / 256;
-        color_array[3].b = ((2 * col1.b + col0.b) * 22) / 8;
+               color_array[3].r = ((2 * col1.r + col0.r) * 22) / 8;
+               color_array[3].g = (256 * color_array[1].g - gdiff / 4 + 128 - gdiff * 80) / 256;
+               color_array[3].b = ((2 * col1.b + col0.b) * 22) / 8;
                color_array[3].a = 0xFF;
 
                return 4;
        }
        else {
                // Three-color block: derive the other color.
-        color_array[2].r = ((col0.r + col1.r) * 33) / 8;
-        color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 128) / 256;
-        color_array[2].b = ((col0.b + col1.b) * 33) / 8;
+               color_array[2].r = ((col0.r + col1.r) * 33) / 8;
+               color_array[2].g = (256 * color_array[0].g + gdiff / 4 + 128 + gdiff * 128) / 256;
+               color_array[2].b = ((col0.b + col1.b) * 33) / 8;
                color_array[2].a = 0xFF;
                
                // Set all components to 0 to match DXT specs.
index b0c4d0a396e3d99f0d83f0866c0cf694cd50ebeb..0b4a7cabf92c3775176875ef455e56b9febf9bb1 100644 (file)
@@ -81,7 +81,7 @@ ColorBlock::ColorBlock(const Image * img, uint x, uint y)
 
 void ColorBlock::init(const Image * img, uint x, uint y)
 {
-    init(img->width(), img->height(), (const uint *)img->pixels(), x, y);
+       init(img->width(), img->height(), (const uint *)img->pixels(), x, y);
 }
 
 void ColorBlock::init(uint w, uint h, const uint * data, uint x, uint y)
@@ -89,34 +89,34 @@ void ColorBlock::init(uint w, uint h, const uint * data, uint x, uint y)
        const uint bw = min(w - x, 4U);
        const uint bh = min(h - y, 4U);
 
-    // Blocks that are smaller than 4x4 are handled by repeating the pixels.
-    // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
-    // @@ Ideally we should zero the weights of the pixels out of range.
+       // Blocks that are smaller than 4x4 are handled by repeating the pixels.
+       // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
+       // @@ Ideally we should zero the weights of the pixels out of range.
 
-    for (uint i = 0; i < 4; i++)
-    {
-        const int by = i % bh;
+       for (uint i = 0; i < 4; i++)
+       {
+               const int by = i % bh;
 
-        for (uint e = 0; e < 4; e++)
-        {
-            const int bx = e % bw;
-            const uint idx = (y + by) * w + x + bx;
+               for (uint e = 0; e < 4; e++)
+               {
+                       const int bx = e % bw;
+                       const uint idx = (y + by) * w + x + bx;
 
-            color(e, i).u = data[idx];
-        }
-    }
+                       color(e, i).u = data[idx];
+               }
+       }
 }
 
 void ColorBlock::init(uint w, uint h, const float * data, uint x, uint y)
 {
-    const uint bw = min(w - x, 4U);
-    const uint bh = min(h - y, 4U);
+       const uint bw = min(w - x, 4U);
+       const uint bh = min(h - y, 4U);
 
        // Blocks that are smaller than 4x4 are handled by repeating the pixels.
        // @@ Thats only correct when block size is 1, 2 or 4, but not with 3. :(
-    // @@ Ideally we should zero the weights of the pixels out of range.
+       // @@ Ideally we should zero the weights of the pixels out of range.
 
-    uint srcPlane = w * h;
+       uint srcPlane = w * h;
 
        for (uint i = 0; i < 4; i++)
        {
@@ -125,13 +125,13 @@ void ColorBlock::init(uint w, uint h, const float * data, uint x, uint y)
                for (uint e = 0; e < 4; e++)
                {
                        const uint bx = e % bw;
-            const uint idx = ((y + by) * w + x + bx);
+                       const uint idx = ((y + by) * w + x + bx);
                        
                        Color32 & c = color(e, i);
-            c.r = uint8(255 * clamp(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
-            c.g = uint8(255 * clamp(data[idx + 1 * srcPlane], 0.0f, 1.0f));
-            c.b = uint8(255 * clamp(data[idx + 2 * srcPlane], 0.0f, 1.0f));
-            c.a = uint8(255 * clamp(data[idx + 3 * srcPlane], 0.0f, 1.0f));
+                       c.r = uint8(255 * clamp(data[idx + 0 * srcPlane], 0.0f, 1.0f)); // @@ Is this the right way to quantize floats to bytes?
+                       c.g = uint8(255 * clamp(data[idx + 1 * srcPlane], 0.0f, 1.0f));
+                       c.b = uint8(255 * clamp(data[idx + 2 * srcPlane], 0.0f, 1.0f));
+                       c.a = uint8(255 * clamp(data[idx + 3 * srcPlane], 0.0f, 1.0f));
                }
        }
 }
index 270c665f809e627edc2c87a6f2a47802db499b49..a8c0bb97137d444e904b6f75655a85f75d369170 100644 (file)
@@ -201,7 +201,7 @@ EnumPropertyItem image_only_type_items[] = {
 
        IMAGE_TYPE_ITEMS_IMAGE_ONLY
 
-    {0, NULL, 0, NULL, NULL}};
+       {0, NULL, 0, NULL, NULL}};
 
 EnumPropertyItem image_type_items[] = {
        {0, "", 0, "Image", NULL},
index dae163e4cc8d8009df9347419a8f54c8c214c717..70af5599a15c048f073ad1c6d481742d2fcd6a78 100644 (file)
@@ -227,10 +227,10 @@ static void rna_tracking_trackerAlgorithm_update(Main *UNUSED(bmain), Scene *UNU
 {
        MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
 
-        if (track->tracker == TRACKER_KLT)
-          BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
-        else
-          BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
+       if (track->tracker == TRACKER_KLT)
+               BKE_tracking_clamp_track(track, CLAMP_PYRAMID_LEVELS);
+       else
+               BKE_tracking_clamp_track(track, CLAMP_SEARCH_DIM);
 }
 
 static void rna_tracking_trackerPyramid_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
index eca2888dcff5e948849686be304ef1930cf4cf45..11607ad78b8d0d4a1cde8569e6e9a2d3b21db41e 100644 (file)
@@ -399,7 +399,7 @@ const char *PyC_UnicodeAsByte(PyObject *py_str, PyObject **coerce)
 
 PyObject *PyC_UnicodeFromByteAndSize(const char *str, Py_ssize_t size)
 {
-    PyObject *result = PyUnicode_FromStringAndSize(str, size);
+       PyObject *result = PyUnicode_FromStringAndSize(str, size);
        if (result) {
                /* 99% of the time this is enough but we better support non unicode
                 * chars since blender doesnt limit this */
index db5be0d2ee1e36cef40ceda07310eee807767452..ba9c52be6c7d6790a37b73aea57bd825ff724beb 100644 (file)
@@ -39,10 +39,10 @@ pre:
 effect: constructs a new CErrorValue containing errormessage errmsg
 */
 {
-  m_strErrorText = "[";
-  m_strErrorText += errmsg;
-  m_strErrorText += "]";
-  SetError(true);
+       m_strErrorText = "[";
+       m_strErrorText += errmsg;
+       m_strErrorText += "]";
+       SetError(true);
 }
 
 
index e34e40d55eba1753b353feba63c287cf6fca93f0..2224b0ff5e8490df31cba95659fcfde126fb2ea2 100644 (file)
@@ -244,10 +244,7 @@ CExpression* COperator2Expr::CheckLink(std::vector<CBrokenLinkInfo*>& brokenlink
 /              
 
   */
-  return Release();
-
-  
-       
+       return Release();
 }
 
 
index 181889f03750d92407155a916143e9e0dd6c85db..16626b055268ea14b8cc2dc568bc958bf0f000d8 100644 (file)
@@ -62,7 +62,7 @@ void SCA_IInputDevice::ClearStatusTable(int tableid)
 
 const SCA_InputEvent& SCA_IInputDevice::GetEventValue(SCA_IInputDevice::KX_EnumInputs inputcode)
 {
-  //   cerr << "SCA_IInputDevice::GetEventValue" << endl;
+//     cerr << "SCA_IInputDevice::GetEventValue" << endl;
        return m_eventStatusTables[m_currentTable][inputcode];
 }
 
index 3111ad0de5f8ce530229c2bbea73048557d69478..edf1f300fba709e4891bc1022c259da7ba3dbac3 100644 (file)
@@ -64,7 +64,7 @@ SCA_IInputDevice* SCA_KeyboardManager::GetInputDevice()
 void SCA_KeyboardManager::NextFrame()
 {
        //const SCA_InputEvent& event = GetEventValue(SCA_IInputDevice::KX_EnumInputs inputcode)=0;
-  //   cerr << "SCA_KeyboardManager::NextFrame"<< endl;
+//     cerr << "SCA_KeyboardManager::NextFrame"<< endl;
        SG_DList::iterator<SCA_ISensor> it(m_sensors);
        for (it.begin();!it.end();++it)
        {
index 3bdf293b15a26dbf526aa83c643a6d545dcdb03d..3718a7b3094f6213c82d41195acf05fa0dee8a46 100644 (file)
@@ -359,7 +359,7 @@ static int setBackground (PyImage * self, PyObject * value, void * closure)
        getImageRender(self)->setBackground((unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 0))),
                (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 1))),
                (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 2))),
-        (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 3))));
+               (unsigned char)(PyLong_AsSsize_t(PySequence_Fast_GET_ITEM(value, 3))));
        // success
        return 0;
 }