[Bf-blender-cvs] [f38331a] master: Code cleanup: style

Campbell Barton noreply at git.blender.org
Thu Apr 3 00:24:27 CEST 2014


Commit: f38331adefde74c5748a6823ba7f00304d12c8dc
Author: Campbell Barton
Date:   Thu Apr 3 09:24:09 2014 +1100
https://developer.blender.org/rBf38331adefde74c5748a6823ba7f00304d12c8dc

Code cleanup: style

===================================================================

M	doc/python_api/rst_from_bmesh_opdefines.py
M	intern/cycles/blender/addon/properties.py
M	intern/cycles/blender/addon/ui.py
M	release/scripts/startup/bl_operators/object_quick_effects.py
M	release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
M	release/scripts/startup/bl_ui/space_info.py
M	release/scripts/startup/bl_ui/space_view3d.py
M	release/scripts/startup/bl_ui/space_view3d_toolbar.py
M	source/blender/blenkernel/intern/movieclip.c
M	source/blender/editors/interface/interface_handlers.c
M	source/blender/editors/mask/mask_ops.c
M	source/blender/editors/screen/area.c
M	source/blender/editors/space_clip/clip_ops.c
M	source/blender/editors/space_image/image_ops.c
M	source/blender/editors/space_node/drawnode.c

===================================================================

diff --git a/doc/python_api/rst_from_bmesh_opdefines.py b/doc/python_api/rst_from_bmesh_opdefines.py
index cf0420c..977d317 100644
--- a/doc/python_api/rst_from_bmesh_opdefines.py
+++ b/doc/python_api/rst_from_bmesh_opdefines.py
@@ -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))
diff --git a/intern/cycles/blender/addon/properties.py b/intern/cycles/blender/addon/properties.py
index eb6680b..2b05c21 100644
--- a/intern/cycles/blender/addon/properties.py
+++ b/intern/cycles/blender/addon/properties.py
@@ -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",
diff --git a/intern/cycles/blender/addon/ui.py b/intern/cycles/blender/addon/ui.py
index a8e673b..fdf0d36 100644
--- a/intern/cycles/blender/addon/ui.py
+++ b/intern/cycles/blender/addon/ui.py
@@ -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
 
diff --git a/release/scripts/startup/bl_operators/object_quick_effects.py b/release/scripts/startup/bl_operators/object_quick_effects.py
index 765135d..556d34b 100644
--- a/release/scripts/startup/bl_operators/object_quick_effects.py
+++ b/release/scripts/startup/bl_operators/object_quick_effects.py
@@ -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
 
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
index 624d9b9..6a6d8dc 100644
--- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
+++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py
@@ -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
diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py
index d02d1cb..3188167 100644
--- a/release/scripts/startup/bl_ui/space_info.py
+++ b/release/scripts/startup/bl_ui/space_info.py
@@ -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")
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 72b63ba..d43e6d1 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -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"
diff --git a/release/scripts/startup/bl_ui/space_view3d_toolbar.py b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
index b6bd902..4e9dc11 100644
--- a/release/scripts/startup/bl_ui/space_view3d_toolbar.py
+++ b/release/scripts/startup/bl_ui/space_view3d_toolbar.py
@@ -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)
diff --git a/source/blender/blenkernel/intern/movieclip.c b/source/blender/blenkernel/intern/movieclip.c
index 8cdf298..f9cd1b2 100644
--- a/source/blender/blenkernel/intern/movieclip.c
+++ b/source/blender/blenkernel/intern/movieclip.c
@@ -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);
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c
index 6f06544..bd305e2 100644
--- a/source/blender/editors/interface/interface_handlers.c
+++ b/source/blender/editors/interface/interface_handlers.c
@@ -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) {
diff --git a/source/blender/editors/mask/mask_ops.c b/source/blender/editors/mask/mask_ops.c
index c262f17..775859b 100644
--- a/source/blender/editors/mask/mask_ops.c
+++ b/source/blender/editors/mask/mask_ops.c
@@ -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;
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 907f5fe..71c55dd 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -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);
 	
diff --git a/source/blender/editors/space_clip/clip_ops.c b/source/blender/editors/space_clip/clip_ops.c
index b901ff4..3f0a376 100644
--- a/source/blender/editors/space_clip/clip_ops.c
+++ b/source/blender/editors/space_clip/clip_ops.c
@@ -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));
 
diff --git a/source/blender/editors/space_image/image_ops.c b/source/blender/editors/space_image/image_ops.c
index d299d69..c9dda07 100644
--- a/source/blender/editors/space_image/image_ops.c
+++ b/source/blender/editors/space_image/image_ops.c
@@ -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));
 	
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index d64607c..ae5737a 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -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

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list