Code cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Wed, 2 Apr 2014 22:24:09 +0000 (09:24 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 2 Apr 2014 22:24:09 +0000 (09:24 +1100)
15 files changed:
doc/python_api/rst_from_bmesh_opdefines.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
release/scripts/startup/bl_operators/object_quick_effects.py
release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
release/scripts/startup/bl_ui/space_info.py
release/scripts/startup/bl_ui/space_view3d.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/blenkernel/intern/movieclip.c
source/blender/editors/interface/interface_handlers.c
source/blender/editors/mask/mask_ops.c
source/blender/editors/screen/area.c
source/blender/editors/space_clip/clip_ops.c
source/blender/editors/space_image/image_ops.c
source/blender/editors/space_node/drawnode.c

index cf0420c3830638bcd893dfda2af88ec1002f0038..977d3171393cc3a6a964d2fb1737e0c72fec7199 100644 (file)
@@ -75,7 +75,7 @@ def main():
     for l in fsrc:
         l = l[:-1]
         # weak but ok
-        if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and not "bmo_opdefines[]" in l:
+        if ("BMOpDefine" in l and l.split()[1] == "BMOpDefine") and "bmo_opdefines[]" not in l:
             is_block = True
             block_ctx = []
             blocks.append((comment_ctx, block_ctx))
index eb6680b02a0d338b34baf501f68bdee2e5864f59..2b05c2148eb2e38163b0f6434e1bd264e9766c73 100644 (file)
@@ -746,7 +746,7 @@ class CyclesObjectBlurSettings(bpy.types.PropertyGroup):
 
     @classmethod
     def register(cls):
-        
+
         bpy.types.Object.cycles = PointerProperty(
                 name="Cycles Object Settings",
                 description="Cycles object settings",
index a8e673b78c7a113db97a5b35478f20272fc6a2f4..fdf0d3649708783dbc1aee2b8df3f870c513b23f 100644 (file)
@@ -581,7 +581,7 @@ class CyclesObject_PT_motion_blur(CyclesButtonsPanel, Panel):
     def poll(cls, context):
         ob = context.object
         return CyclesButtonsPanel.poll(context) and ob and ob.type in {'MESH', 'CURVE', 'CURVE', 'SURFACE', 'FONT', 'META'}
-        
+
     def draw_header(self, context):
         layout = self.layout
 
index 765135d6f3d5c00c6fdf2551b5500c844991c906..556d34bb0ac648639c7abcd907606afda3158d77 100644 (file)
@@ -436,7 +436,7 @@ class QuickFluid(Operator):
     def execute(self, context):
         fake_context = context.copy()
         mesh_objects = [obj for obj in context.selected_objects
-                        if (obj.type == 'MESH' and not 0.0 in obj.dimensions)]
+                        if (obj.type == 'MESH' and 0.0 not in obj.dimensions)]
         min_co = Vector((100000.0, 100000.0, 100000.0))
         max_co = -min_co
 
index 624d9b9fc24e4e962649262307d8e49fc722b310..6a6d8dcff4abc6d0c81f75ca4a997b46cfe0c275 100644 (file)
@@ -236,7 +236,7 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel):
         # vertex format outputs
         if surface.surface_format == 'VERTEX':
             if surface_type == 'PAINT':
-                 # toggle active preview
+                # toggle active preview
                 layout.prop(surface, "preview_id")
 
                 # paint-map output
index d02d1cb428fff46ae6d8519405f14434de0442bb..31881671fda526bcce2ca4303ed81fa04ad651c2 100644 (file)
@@ -245,7 +245,7 @@ class INFO_MT_opengl_render(Menu):
 
     def draw(self, context):
         layout = self.layout
-        
+
         rd = context.scene.render
 
         layout.prop(rd, "use_antialiasing")
index 72b63ba06647be5d8720be97fe5f6fdcedede518..d43e6d1f697dcf7059575999ba339fc6a141de15 100644 (file)
@@ -903,7 +903,6 @@ class INFO_MT_curve_add(Menu):
         VIEW3D_PT_tools_add_object.draw_add_curve(layout)
 
 
-
 class INFO_MT_surface_add(Menu):
     bl_idname = "INFO_MT_surface_add"
     bl_label = "Surface"
index b6bd902fd8f60ccc2eda1ae44c59f9c1e4809934..4e9dc1163e2964edf2ce7d678b671a1721e66503 100644 (file)
@@ -1266,7 +1266,7 @@ class VIEW3D_PT_sculpt_dyntopo(Panel, View3DPaintPanel):
         col.prop(sculpt, "use_smooth_shading")
         col.operator("sculpt.optimize")
         if (sculpt.detail_type_method == 'CONSTANT'):
-           col.operator("sculpt.detail_flood_fill")
+            col.operator("sculpt.detail_flood_fill")
         col.separator()
         col.prop(sculpt, "symmetrize_direction")
         col.operator("sculpt.symmetrize")
@@ -1295,7 +1295,7 @@ class VIEW3D_PT_sculpt_options(Panel, View3DPaintPanel):
         col.prop(sculpt, "gravity", slider=True, text="Factor")
         col.prop(sculpt, "gravity_object")
         col.separator()
-               
+
         col = layout.column(align=True)
         col.label(text="Threads:")
         col.row(align=True).prop(scene, "omp_threads_mode", expand=True)
index 8cdf29849e5be3fdf2ef37c65f350868bf848b50..f9cd1b2a6c5709f80ab9d9fdcd737260beec7c53 100644 (file)
@@ -280,7 +280,6 @@ static ImBuf *movieclip_load_movie_file(MovieClip *clip, MovieClipUser *user, in
        movieclip_open_anim_file(clip);
 
        if (clip->anim) {
-               int dur = IMB_anim_get_duration(clip->anim, tc);
                int fra = framenr - clip->start_frame + clip->frame_offset;
 
                ibuf = IMB_anim_absolute(clip->anim, fra, tc, proxy);
index 6f06544c3e2b3668c43a0d85e274f3197c4288ff..bd305e2728398d7930b2d2b7658705516a1a1481 100644 (file)
@@ -7284,7 +7284,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar)
 
        if (val == KM_PRESS) {
                if (ELEM(type, UPARROWKEY, DOWNARROWKEY) ||
-                       ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
+                   ((ELEM(type, WHEELUPMOUSE, WHEELDOWNMOUSE) && event->alt)))
                {
                        const int value_orig = RNA_property_int_get(&but->rnapoin, but->rnaprop);
                        int value, min, max, inc;
@@ -7308,7 +7308,7 @@ static int ui_handle_list_event(bContext *C, const wmEvent *event, ARegion *ar)
 
                                for (i = 0; i < len; i++) {
                                        if (!dyn_data->items_filter_flags ||
-                                               ((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
+                                           ((dyn_data->items_filter_flags[i] & UILST_FLT_ITEM) ^ filter_exclude))
                                        {
                                                org_order[new_order ? new_order[++org_idx] : ++org_idx] = i;
                                                if (i == value) {
index c262f177252e20c1abad45cc042099df2378b218..775859ba1efecbb92de3ef1c4521c30acf842814 100644 (file)
@@ -107,7 +107,7 @@ MaskSplinePoint *ED_mask_point_find_nearest(const bContext *C, Mask *mask, const
                                MaskSplinePoint *cur_point_deform = &points_array[i];
                                eMaskWhichHandle cur_which_handle = MASK_WHICH_HANDLE_NONE;
                                BezTriple *bezt = &cur_point_deform->bezt;
-                               float cur_len_sq , vec[2];
+                               float cur_len_sq, vec[2];
 
                                vec[0] = bezt->vec[1][0] * scalex;
                                vec[1] = bezt->vec[1][1] * scaley;
index 907f5fe4117b1b729a0991f42b85986d955cc9bb..71c55ddc4d5908360eb6e7c9874c8d5cc90c05c9 100644 (file)
@@ -1349,7 +1349,7 @@ void ED_region_init(bContext *C, ARegion *ar)
 }
 
 /* for quick toggle, can skip fades */
-void region_toggle_hidden(bContext *C, ARegion *ar, bool do_fade)
+void region_toggle_hidden(bContext *C, ARegion *ar, const bool do_fade)
 {
        ScrArea *sa = CTX_wm_area(C);
        
index b901ff4ece8cb91ed320299465357cdbc865ab08..3f0a376d791a80af6119ccda904a2c1e213b3b53 100644 (file)
@@ -620,7 +620,7 @@ static int view_zoom_in_exec(bContext *C, wmOperator *op)
 
        RNA_float_get_array(op->ptr, "location", location);
 
-       sclip_zoom_set_factor(C, powf(2.0f, 1.0f/3.0f), location);
+       sclip_zoom_set_factor(C, powf(2.0f, 1.0f / 3.0f), location);
 
        ED_region_tag_redraw(CTX_wm_region(C));
 
@@ -663,7 +663,7 @@ static int view_zoom_out_exec(bContext *C, wmOperator *op)
 
        RNA_float_get_array(op->ptr, "location", location);
 
-       sclip_zoom_set_factor(C, powf(0.5f, 1.0f/3.0f), location);
+       sclip_zoom_set_factor(C, powf(0.5f, 1.0f / 3.0f), location);
 
        ED_region_tag_redraw(CTX_wm_region(C));
 
index d299d690989935147509ca39fb9adc7deb8b83e1..c9dda07466753c80b8e96a3db9356aa254b0ddf3 100644 (file)
@@ -780,7 +780,7 @@ static int image_view_zoom_in_exec(bContext *C, wmOperator *op)
        
        RNA_float_get_array(op->ptr, "location", location);
 
-       sima_zoom_set_factor(sima, ar, powf(2.0f, 1.0f/3.0f), location);                                
+       sima_zoom_set_factor(sima, ar, powf(2.0f, 1.0f / 3.0f), location);
 
        ED_region_tag_redraw(CTX_wm_region(C));
        
@@ -825,7 +825,7 @@ static int image_view_zoom_out_exec(bContext *C, wmOperator *op)
        
        RNA_float_get_array(op->ptr, "location", location);
 
-       sima_zoom_set_factor(sima, ar, powf(0.5f, 1.0f/3.0f), location);
+       sima_zoom_set_factor(sima, ar, powf(0.5f, 1.0f / 3.0f), location);
        
        ED_region_tag_redraw(CTX_wm_region(C));
        
index d64607c5481dc104afffc98e79119124bc1c83b2..ae5737a04d01ef71e8d2990b731dc0c6d8d0c090 100644 (file)
@@ -877,7 +877,7 @@ static void node_shader_buts_uvmap(uiLayout *layout, bContext *C, PointerRNA *pt
 {
        uiItemR(layout, ptr, "from_dupli", 0, NULL, 0);
 
-       if(!RNA_boolean_get(ptr, "from_dupli")) {
+       if (!RNA_boolean_get(ptr, "from_dupli")) {
                PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
 
                if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {