Code cleanup: style
authorCampbell Barton <ideasman42@gmail.com>
Wed, 12 Feb 2014 21:51:33 +0000 (08:51 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 12 Feb 2014 21:52:12 +0000 (08:52 +1100)
21 files changed:
doc/python_api/examples/bpy.types.bpy_prop_collection.foreach_set.py
doc/python_api/examples/mathutils.kdtree.py
intern/cycles/blender/addon/engine.py
intern/cycles/blender/addon/properties.py
intern/cycles/blender/addon/ui.py
release/scripts/modules/animsys_refactor.py
release/scripts/modules/bl_i18n_utils/utils.py
release/scripts/modules/bl_i18n_utils/utils_rtl.py
release/scripts/modules/bpy_extras/io_utils.py
release/scripts/modules/bpy_extras/object_utils.py
release/scripts/modules/sys_info.py
release/scripts/startup/bl_operators/object.py
release/scripts/startup/bl_ui/properties_data_modifier.py
release/scripts/startup/bl_ui/space_view3d_toolbar.py
source/blender/compositor/intern/COM_Debug.cpp
source/blender/datatoc/datatoc_icon.py
source/blender/editors/interface/interface_regions.c
source/blender/editors/sculpt_paint/sculpt_uv.c
source/blender/editors/transform/transform_snap.c
source/blender/makesrna/intern/rna_cloth.c
source/tests/bl_run_operators.py

index 06ed4840b24f3adbddcfead68d6bc6301d5cd8bd..b84bf0238b8e6424fa07d3e1921b558e16601b76 100644 (file)
@@ -8,4 +8,3 @@ collection.foreach_set(attr, some_seq)
 # Python equivalent
 for i in range(len(some_seq)):
     setattr(collection[i], attr, some_seq[i])
-
index d367582e5bed37cd2f2d589e3851ec12df527896..18e61a2bc58b19b8845baa3409c1aa68d9df0d86 100644 (file)
@@ -34,4 +34,3 @@ print("Close points within 0.5 distance")
 co_find = context.scene.cursor_location
 for (co, index, dist) in kd.find_range(co_find, 0.5):
     print("    ", co, index, dist)
-
index 66dc5e78e5aeb40d9972cf33209f2f3efe06b1bc..b9ce65588df939a2a1bc5ab3fa53c202953a4535 100644 (file)
@@ -88,7 +88,8 @@ def available_devices():
 def with_osl():
     import _cycles
     return _cycles.with_osl
-    
+
+
 def with_network():
     import _cycles
     return _cycles.with_network
index 0f0bff2acfb6c5da0f9ddbef6e1a8cbd5223cc97..c80e8a3250ca9a4365504130666f7b9f7bf6806b 100644 (file)
@@ -33,7 +33,7 @@ enum_devices = (
     )
 
 if _cycles.with_network:
-  enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
+    enum_devices += (('NETWORK', "Networked Device", "Use networked device for rendering"),)
 
 enum_feature_set = (
     ('SUPPORTED', "Supported", "Only use finished and supported features"),
@@ -371,7 +371,7 @@ class CyclesRenderSettings(bpy.types.PropertyGroup):
                 min=0.0, max=1e8,
                 default=0.0,
                 )
-                
+
         cls.sample_clamp_indirect = FloatProperty(
                 name="Clamp Indirect",
                 description="If non-zero, the maximum value for an indirect sample, "
index 65eb75a2f6f1029bd531a7babf1d98e16c895353..c0ce80426c0a099317795cf91436e2eaedf42724 100644 (file)
@@ -1195,7 +1195,7 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
         layout.prop(ccscene, "primitive", text="Primitive")
         layout.prop(ccscene, "shape", text="Shape")
 
-        if (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS') == False:
+        if not (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS'):
             layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
 
         if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
@@ -1382,6 +1382,7 @@ def get_panels():
 
     return [getattr(types, p) for p in panels if hasattr(types, p)]
 
+
 def register():
     bpy.types.RENDER_PT_render.append(draw_device)
     bpy.types.VIEW3D_HT_header.append(draw_pause)
index 9730a05c2d2e1618420ce1508adbb817d7b6f512..8899bbf1ad79a45bd05e3fd891d222990db97f7c 100644 (file)
@@ -22,7 +22,7 @@
 This module has utility functions for renaming
 rna values in fcurves and drivers.
 
-Currently unused, but might become useful later again. 
+Currently unused, but might become useful later again.
 """
 
 IS_TESTING = False
index 53146fd02871832b1c9782c357e5de95769c831c..85977642bbbbd3d1312a53042d20f5515fb9111b 100644 (file)
@@ -1285,7 +1285,6 @@ class I18n:
                 return path, env[tuple_id]
         return None, None  # No data...
 
-
     def parse(self, kind, src, langs=set()):
         self.parsers[kind](self, src, langs)
 
@@ -1372,6 +1371,7 @@ class I18n:
               ({} currently).
         """.format(self.settings.PARSER_TEMPLATE_ID)
         default_context = self.settings.DEFAULT_CONTEXT
+
         def _gen_py(self, langs, tab="    "):
             _lencomm = len(self.settings.PO_COMMENT_PREFIX)
             _lengen = len(self.settings.PO_COMMENT_PREFIX_GENERATED)
@@ -1451,7 +1451,7 @@ class I18n:
                         ret.append(tab + lngsp + '  "' + comments[-1] + '"))),')
                     else:
                         ret[-1] = ret[-1] + " (" + (('"' + comments[0] + '",') if comments else "") + "))),"
-                    
+
                 ret.append(tab + "),")
             ret += [
                 ")",
index f08d7efdb8e66e28010fc88e79de6a41f7b05daf..261d1544ac6a9686ca61d1955440a08c9cea06dd 100755 (executable)
@@ -118,7 +118,7 @@ def protect_format_seq(msg):
             dlt = 2
             while (idx + dlt) < ln and msg[idx + dlt] in digits:
                 dlt += 1
-            if (idx + dlt) < ln  and msg[idx + dlt] is '|':
+            if (idx + dlt) < ln and msg[idx + dlt] is '|':
                 dlt += 1
         # %.4f
         elif idx < (ln - 3) and msg[idx] == '%' and msg[idx + 1] in digits:
index 790233c40aff27d2b0a86c45c36c6f00f61df885..b1877a9d439ce742f5a72546d8f93f4edd5fc459 100644 (file)
@@ -409,7 +409,9 @@ def path_reference(filepath,
     if mode == 'ABSOLUTE':
         return filepath_abs
     elif mode == 'RELATIVE':
-        try:  # can't always find the relative path (between drive letters on windows)
+        # can't always find the relative path
+        # (between drive letters on windows)
+        try:
             return os.path.relpath(filepath_abs, base_dst)
         except ValueError:
             return filepath_abs
index a14f0128444483750d3ead189af888a339c51cf8..766da46107bf0acc2688c5d11a5a6ecd5882ed4b 100644 (file)
@@ -232,7 +232,8 @@ def object_add_grid_scale_apply_operator(operator, context):
         if not properties.is_property_set(prop_id):
             prop_def = properties_def[prop_id]
             if prop_def.unit == 'LENGTH' and prop_def.subtype == 'DISTANCE':
-                setattr(operator, prop_id, getattr(operator, prop_id) * grid_scale)
+                setattr(operator, prop_id,
+                        getattr(operator, prop_id) * grid_scale)
 
 
 def object_image_guess(obj, bm=None):
index bd895780594b7744073f6d903587c0f1588a722c..f87cf611dd4184d6d7ecd6dbbf989e7a5e7c2048 100644 (file)
@@ -133,7 +133,7 @@ def write_sysinfo(op):
 
     oiio = bpy.app.oiio
     output.write("OpenImageIO: ")
-    if ocio.supported :
+    if ocio.supported:
         output.write("%s\n" % (oiio.version_string))
     else:
         output.write("Blender was built without OpenImageIO support\n")
index 383f67f8e08ef6aa9027d7ba487a3d4d679c56a5..ae13ba8b559284e8c45794b6282b45fa1a0a34a3 100644 (file)
@@ -938,4 +938,3 @@ class LodGenerate(Operator):
         scene.objects.active = ob
 
         return {'FINISHED'}
-
index 441d314463d024acd4c54cc9807b547485c59469..093b7f2cf4051aa1877d91dc91c163ab4bd59606 100644 (file)
@@ -63,9 +63,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "use_bone_envelopes", text="Bone Envelopes")
 
         layout.separator()
-        
+
         split = layout.split()
-        
+
         row = split.row(align=True)
         row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         sub = row.row(align=True)
@@ -139,7 +139,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         elif md.limit_method == 'VGROUP':
             layout.label(text="Vertex Group:")
             layout.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
+
         layout.label(text="Width Method:")
         layout.row().prop(md, "offset_type", expand=True)
 
@@ -262,12 +262,12 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
         if decimate_type == 'COLLAPSE':
             layout.prop(md, "ratio")
-            
+
             split = layout.split()
             row = split.row(align=True)
             row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
             row.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
-            
+
             split.prop(md, "use_collapse_triangulate")
         elif decimate_type == 'UNSUBDIV':
             layout.prop(md, "iterations")
@@ -464,10 +464,10 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.active = not md.is_bound
         col.label(text="Object:")
         col.prop(md, "object", text="")
-        
+
         col = split.column()
         col.label(text="Vertex Group:")
-        
+
         row = col.row(align=True)
         row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         sub = row.row(align=True)
@@ -792,18 +792,18 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col = split.column()
         col.prop(md, "thickness")
         col.prop(md, "thickness_clamp")
-        
+
         col.separator()
-        
+
         row = col.row(align=True)
         row.prop_search(md, "vertex_group", ob, "vertex_groups", text="")
         sub = row.row(align=True)
         sub.active = bool(md.vertex_group)
         sub.prop(md, "invert_vertex_group", text="", icon='ARROW_LEFTRIGHT')
-        
+
         sub = col.row()
         sub.active = bool(md.vertex_group)
-        sub.prop(md, "thickness_vertex_group", text="Factor") 
+        sub.prop(md, "thickness_vertex_group", text="Factor")
 
         col.label(text="Crease:")
         col.prop(md, "edge_crease_inner", text="Inner")
@@ -818,11 +818,11 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
         col.prop(md, "use_even_offset")
         col.prop(md, "use_quality_normals")
         col.prop(md, "use_rim")
-        
+
         col.separator()
-        
+
         col.label(text="Material Index Offset:")
-        
+
         sub = col.column()
         row = sub.split(align=True, percentage=0.4)
         row.prop(md, "material_offset", text="")
index 3ae4330249a9827f8263d400084e9fa9d81dd968..039179afc8ede3e9c505b9d952bed037b3063506 100644 (file)
@@ -40,6 +40,7 @@ def draw_repeat_tools(context, layout):
     col.operator("screen.repeat_last")
     col.operator("screen.repeat_history", text="History...")
 
+
 # Keyframing tools
 def draw_keyframing_tools(context, layout):
     col = layout.column(align=True)
@@ -48,6 +49,7 @@ def draw_keyframing_tools(context, layout):
     row.operator("anim.keyframe_insert_menu", text="Insert")
     row.operator("anim.keyframe_delete_v3d", text="Remove")
 
+
 # Grease Pencil tools
 def draw_gpencil_tools(context, layout):
     col = layout.column(align=True)
@@ -60,16 +62,17 @@ def draw_gpencil_tools(context, layout):
     row.operator("gpencil.draw", text="Erase").mode = 'ERASER'
 
     col.separator()
-    
+
     col.prop(context.tool_settings, "use_grease_pencil_sessions")
 
     col.separator()
-    
+
     col.label(text="Measure:")
     col.operator("view3d.ruler")
 
 # ********** default tools for object-mode ****************
 
+
 class VIEW3D_PT_tools_transform(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "objectmode"
@@ -89,6 +92,7 @@ class VIEW3D_PT_tools_transform(View3DPanel, Panel):
             col = layout.column(align=True)
             col.operator("transform.mirror", text="Mirror")
 
+
 class VIEW3D_PT_tools_object(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "objectmode"
@@ -119,6 +123,7 @@ class VIEW3D_PT_tools_object(View3DPanel, Panel):
             row.operator("object.shade_smooth", text="Smooth")
             row.operator("object.shade_flat", text="Flat")
 
+
 class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "objectmode"
@@ -136,14 +141,15 @@ class VIEW3D_PT_tools_objectmode(View3DPanel, Panel):
 
         draw_repeat_tools(context, layout)
 
+
 class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "objectmode"
     bl_label = "Add Primitive"
-    
-    def draw (self, context):
+
+    def draw(self, context):
         layout = self.layout
-        
+
         col = layout.column(align=True)
         col.label(text="Mesh:")
         col.operator("mesh.primitive_plane_add", text="Plane", icon="MESH_PLANE")
@@ -154,28 +160,29 @@ class VIEW3D_PT_tools_add_mesh(View3DPanel, Panel):
         col.operator("mesh.primitive_cylinder_add", text="Cylinder", icon="MESH_CYLINDER")
         col.operator("mesh.primitive_cone_add", text="Cone", icon="MESH_CONE")
         col.operator("mesh.primitive_torus_add", text="Torus", icon="MESH_TORUS")
-        col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY")   
-        
+        col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY")
+
         col = layout.column(align=True)
         col.label(text="Curve:")
         col.operator("curve.primitive_bezier_curve_add", text="Curve", icon="CURVE_BEZCURVE")
         col.operator("curve.primitive_bezier_circle_add", text="Circle", icon="CURVE_BEZCIRCLE")
-        col.operator("curve.primitive_nurbs_path_add", text="Path" , icon="CURVE_PATH")
+        col.operator("curve.primitive_nurbs_path_add", text="Path", icon="CURVE_PATH")
 
         col.label(text="Lamp:")
-        col.operator("object.lamp_add", text="Point", icon="LAMP_POINT").type='POINT'
-        col.operator("object.lamp_add", text="Sun", icon="LAMP_SUN").type='SUN'
-        col.operator("object.lamp_add", text="Spot", icon="LAMP_SPOT").type='SPOT'
-        col.operator("object.lamp_add", text="Hemi", icon="LAMP_HEMI").type='HEMI'
-        col.operator("object.lamp_add", text="Area", icon="LAMP_AREA").type='AREA'
-              
+        col.operator("object.lamp_add", text="Point", icon="LAMP_POINT").type = 'POINT'
+        col.operator("object.lamp_add", text="Sun", icon="LAMP_SUN").type = 'SUN'
+        col.operator("object.lamp_add", text="Spot", icon="LAMP_SPOT").type = 'SPOT'
+        col.operator("object.lamp_add", text="Hemi", icon="LAMP_HEMI").type = 'HEMI'
+        col.operator("object.lamp_add", text="Area", icon="LAMP_AREA").type = 'AREA'
+
         col.label(text="Other:")
-        col.operator("object.text_add", text="Text", icon ="OUTLINER_OB_FONT")
-        col.operator("object.armature_add",text="Armature", icon="OUTLINER_OB_ARMATURE")
-        col.operator("object.add", text="Lattice", icon="OUTLINER_OB_LATTICE").type='LATTICE'
-        col.operator("object.empty_add", text="Empty", icon="OUTLINER_OB_EMPTY").type='PLAIN_AXES'
+        col.operator("object.text_add", text="Text", icon="OUTLINER_OB_FONT")
+        col.operator("object.armature_add", text="Armature", icon="OUTLINER_OB_ARMATURE")
+        col.operator("object.add", text="Lattice", icon="OUTLINER_OB_LATTICE").type = 'LATTICE'
+        col.operator("object.empty_add", text="Empty", icon="OUTLINER_OB_EMPTY").type = 'PLAIN_AXES'
         col.operator("object.camera_add", text="Camera", icon="OUTLINER_OB_CAMERA")
 
+
 class VIEW3D_PT_tools_relations(View3DPanel, Panel):
     bl_category = "Relations"
     bl_context = "objectmode"
@@ -190,26 +197,27 @@ class VIEW3D_PT_tools_relations(View3DPanel, Panel):
         col.operator("group.create", text="New Group")
         col.operator("group.objects_add_active", text="Add to Active")
         col.operator("group.objects_remove", text="Remove from Group")
-        
+
         col.separator()
-        
+
         col.label(text="Parent:")
         row = col.row(align=True)
         row.operator("object.parent_set", text="Set")
         row.operator("object.parent_clear", text="Clear")
 
         col.separator()
-        
+
         col.label(text="Object Data:")
         col.operator("object.make_links_data")
         col.operator("object.make_single_user")
-        
+
         col.separator()
 
         col.label(text="Linked Objects:")
         col.operator("object.make_local")
         col.operator("object.proxy_make")
 
+
 class VIEW3D_PT_tools_animation(View3DPanel, Panel):
     bl_category = "Animation"
     bl_context = "objectmode"
@@ -231,6 +239,7 @@ class VIEW3D_PT_tools_animation(View3DPanel, Panel):
         col.label(text="Action:")
         col.operator("nla.bake", text="Bake Action")
 
+
 class VIEW3D_PT_tools_rigidbody(View3DPanel, Panel):
     bl_category = "Physics"
     bl_context = "objectmode"
@@ -275,6 +284,7 @@ class VIEW3D_PT_tools_transform_mesh(View3DPanel, Panel):
         col.operator("transform.shrink_fatten", text="Shrink/Fatten")
         col.operator("transform.push_pull", text="Push/Pull")
 
+
 class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "mesh_edit"
@@ -322,12 +332,13 @@ class VIEW3D_PT_tools_meshedit(View3DPanel, Panel):
 
         draw_repeat_tools(context, layout)
 
+
 class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "mesh_edit"
     bl_label = "Add Meshes"
 
-    def draw (self, context):
+    def draw(self, context):
         layout = self.layout
 
         col = layout.column(align=True)
@@ -346,6 +357,7 @@ class VIEW3D_PT_tools_add_mesh_edit(View3DPanel, Panel):
         col.operator("mesh.primitive_grid_add", text="Grid", icon="MESH_GRID")
         col.operator("mesh.primitive_monkey_add", text="Monkey", icon="MESH_MONKEY")
 
+
 class VIEW3D_PT_tools_shading(View3DPanel, Panel):
     bl_category = "Shading / UVs"
     bl_context = "mesh_edit"
@@ -370,6 +382,7 @@ class VIEW3D_PT_tools_uvs(View3DPanel, Panel):
     bl_category = "Shading / UVs"
     bl_context = "mesh_edit"
     bl_label = "UVs"
+
     def draw(self, context):
         layout = self.layout
 
@@ -378,7 +391,7 @@ class VIEW3D_PT_tools_uvs(View3DPanel, Panel):
         col.menu("VIEW3D_MT_uv_map", text="Unwrap")
         col.operator("mesh.mark_seam").clear = False
         col.operator("mesh.mark_seam", text="Clear Seam").clear = True
-        
+
 
 class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
     bl_category = "Options"
@@ -417,6 +430,7 @@ class VIEW3D_PT_tools_meshedit_options(View3DPanel, Panel):
 
 # ********** default tools for editmode_curve ****************
 
+
 class VIEW3D_PT_tools_transform_curve(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "curve_edit"
@@ -434,6 +448,7 @@ class VIEW3D_PT_tools_transform_curve(View3DPanel, Panel):
         col.operator("transform.tilt", text="Tilt")
         col.operator("transform.transform", text="Scale Feather").mode = 'CURVE_SHRINKFATTEN'
 
+
 class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "curve_edit"
@@ -471,12 +486,13 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
 
         draw_repeat_tools(context, layout)
 
+
 class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "curve_edit"
     bl_label = "Add Curves"
 
-    def draw (self, context):
+    def draw(self, context):
         layout = self.layout
 
         col = layout.column(align=True)
@@ -488,10 +504,11 @@ class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel):
         col.label(text="Nurbs:")
         col.operator("curve.primitive_nurbs_curve_add", text="Nurbs Curve", icon="CURVE_NCURVE")
         col.operator("curve.primitive_nurbs_circle_add", text="Nurbs Circle", icon="CURVE_NCIRCLE")
-        col.operator("curve.primitive_nurbs_path_add", text="Nurbs Path" , icon="CURVE_PATH")
+        col.operator("curve.primitive_nurbs_path_add", text="Nurbs Path", icon="CURVE_PATH")
 
 # ********** default tools for editmode_surface ****************
 
+
 class VIEW3D_PT_tools_transform_surface(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "surface_edit"
@@ -505,6 +522,7 @@ class VIEW3D_PT_tools_transform_surface(View3DPanel, Panel):
         col.operator("transform.rotate")
         col.operator("transform.resize", text="Scale")
 
+
 class VIEW3D_PT_tools_surfaceedit(View3DPanel, Panel):
     bl_category = "Tools"
     bl_context = "surface_edit"
@@ -527,12 +545,13 @@ class VIEW3D_PT_tools_surfaceedit(View3DPanel, Panel):
 
         draw_repeat_tools(context, layout)
 
+
 class VIEW3D_PT_tools_add_surface_edit(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "surface_edit"
     bl_label = "Add Surfaces"
 
-    def draw (self, context):
+    def draw(self, context):
         layout = self.layout
 
         col = layout.column(align=True)
@@ -628,12 +647,13 @@ class VIEW3D_PT_tools_mballedit(View3DPanel, Panel):
 
         draw_repeat_tools(context, layout)
 
+
 class VIEW3D_PT_tools_add_mball_edit(View3DPanel, Panel):
     bl_category = "Create"
     bl_context = "mball_edit"
     bl_label = "Add Metaball"
 
-    def draw (self, context):
+    def draw(self, context):
         layout = self.layout
 
         col = layout.column(align=True)
@@ -1283,12 +1303,13 @@ class VIEW3D_PT_sculpt_symmetry(Panel, View3DPaintPanel):
         layout.prop(sculpt, "use_symmetry_feather", text="Feather")
 
         layout.label(text="Lock:")
-        
+
         row = layout.row(align=True)
         row.prop(sculpt, "lock_x", text="X", toggle=True)
         row.prop(sculpt, "lock_y", text="Y", toggle=True)
         row.prop(sculpt, "lock_z", text="Z", toggle=True)
 
+
 class VIEW3D_PT_tools_brush_appearance(Panel, View3DPaintPanel):
     bl_category = "Options"
     bl_label = "Appearance"
@@ -1591,6 +1612,7 @@ class VIEW3D_PT_tools_particlemode(View3DPanel, Panel):
             sub.active = pe.use_fade_time
             sub.prop(pe, "fade_frames", slider=True)
 
+
 # Grease Pencil tools
 class VIEW3D_PT_tools_greasepencil(View3DPanel, Panel):
     bl_category = "Grease Pencil"
index b57de38522a4d785ef4f1b4006405ff16da4233e..f5e3cca976c1239382c3824910de481952ea2616 100644 (file)
@@ -399,15 +399,15 @@ void DebugInfo::graphviz(ExecutionSystem *system)
 
 #else
 
-std::string DebugInfo::node_name(NodeBase */*node*/) { return ""; }
+std::string DebugInfo::node_name(NodeBase * /*node*/) { return ""; }
 void DebugInfo::convert_started() {}
-void DebugInfo::execute_started(ExecutionSystem */*system*/) {}
-void DebugInfo::node_added(Node */*node*/) {}
-void DebugInfo::node_to_operations(Node */*node*/) {}
-void DebugInfo::operation_added(NodeOperation */*operation*/) {}
-void DebugInfo::operation_read_write_buffer(NodeOperation */*operation*/) {}
-void DebugInfo::execution_group_started(ExecutionGroup */*group*/) {}
-void DebugInfo::execution_group_finished(ExecutionGroup */*group*/) {}
-void DebugInfo::graphviz(ExecutionSystem */*system*/) {}
+void DebugInfo::execute_started(ExecutionSystem * /*system*/) {}
+void DebugInfo::node_added(Node * /*node*/) {}
+void DebugInfo::node_to_operations(Node * /*node*/) {}
+void DebugInfo::operation_added(NodeOperation * /*operation*/) {}
+void DebugInfo::operation_read_write_buffer(NodeOperation * /*operation*/) {}
+void DebugInfo::execution_group_started(ExecutionGroup * /*group*/) {}
+void DebugInfo::execution_group_finished(ExecutionGroup * /*group*/) {}
+void DebugInfo::graphviz(ExecutionSystem * /*system*/) {}
 
 #endif
index 4f995a3219afd33a9359cb31b59dcfb0455726e8..930d588f8595ceaf9180a594f716c9e10913bde5 100755 (executable)
@@ -152,4 +152,3 @@ def main():
 
 if __name__ == "__main__":
     main()
-
index 78a4a1cc4897bc514f7e8cc5a040d38605f4b21e..2d0bb488342834cd5659a96d5daaf843a502e200 100644 (file)
@@ -2123,7 +2123,7 @@ static uiBlock *ui_block_func_POPUP(bContext *C, uiPopupBlockHandle *handle, voi
                        direction = pup->block->direction;
                }
                else if ((pup->but->type == PULLDOWN) ||
-                   (uiButGetMenuType(pup->but) != NULL))
+                        (uiButGetMenuType(pup->but) != NULL))
                {
                        direction = UI_DOWN;
                }
index c42e3e4b298b901a7ffcdbe936fa5227cb0de9b3..4dc2c87ca0af1522a1e05730fe6e7bac02f65f96 100644 (file)
@@ -169,7 +169,9 @@ static int uv_sculpt_brush_poll(bContext *C)
 
        if (!uv_sculpt_brush(C) || !obedit || obedit->type != OB_MESH ||
            !sima || ED_space_image_show_render(sima) || (sima->mode == SI_MODE_PAINT))
+       {
                return 0;
+       }
 
        em = BKE_editmesh_from_object(obedit);
        ret = EDBM_mtexpoly_check(em);
index e7b5add64dbda2bebd29439757ff161379a2bc31..93b3b6d4a6604cac5afb927128165a3a75ad493b 100644 (file)
@@ -1572,8 +1572,8 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
                                }
 
                                if (treeData.tree &&
-                                       BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f,
-                                                            &hit, treeData.raycast_callback, &treeData) != -1)
+                                   BLI_bvhtree_ray_cast(treeData.tree, ray_start_local, ray_normal_local, 0.0f,
+                                                        &hit, treeData.raycast_callback, &treeData) != -1)
                                {
                                        hit.dist += len_diff;
                                        hit.dist /= local_scale;
@@ -1624,8 +1624,8 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
                                                else {
                                                        eve = BM_vert_at_index(em->bm, index);
                                                        
-                                                       if ((BM_elem_flag_test(eve, BM_ELEM_HIDDEN) ||
-                                                                BM_elem_flag_test(eve, BM_ELEM_SELECT)))
+                                                       if (BM_elem_flag_test(eve, BM_ELEM_HIDDEN) ||
+                                                           BM_elem_flag_test(eve, BM_ELEM_SELECT))
                                                        {
                                                                test = false;
                                                        }
@@ -1672,9 +1672,9 @@ static bool snapDerivedMesh(short snap_mode, ARegion *ar, Object *ob, DerivedMes
                                                else {
                                                        BMEdge *eed = BM_edge_at_index(em->bm, index);
 
-                                                       if ((BM_elem_flag_test(eed, BM_ELEM_HIDDEN) ||
-                                                                BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
-                                                                BM_elem_flag_test(eed->v2, BM_ELEM_SELECT)))
+                                                       if (BM_elem_flag_test(eed, BM_ELEM_HIDDEN) ||
+                                                           BM_elem_flag_test(eed->v1, BM_ELEM_SELECT) ||
+                                                           BM_elem_flag_test(eed->v2, BM_ELEM_SELECT))
                                                        {
                                                                test = false;
                                                        }
index f357e35327513dd35a7a04741d7b3d6a21b5d4d0..cecc39c8e1571dc2c5347a2dff39f1afdc6738a7 100644 (file)
@@ -102,7 +102,7 @@ static void rna_ClothSettings_max_struct_set(struct PointerRNA *ptr, float value
 
 static void rna_ClothSettings_max_sewing_set(struct PointerRNA *ptr, float value)
 {
-       ClothSimSettings *settings = (ClothSimSettings*)ptr->data;
+       ClothSimSettings *settings = (ClothSimSettings *)ptr->data;
 
        /* check for clipping */
        if (value < 0.0f)
@@ -131,19 +131,19 @@ static void rna_ClothSettings_mass_vgroup_set(PointerRNA *ptr, const char *value
 
 static void rna_ClothSettings_shrink_vgroup_get(PointerRNA *ptr, char *value)
 {
-       ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
+       ClothSimSettings *sim = (ClothSimSettings *)ptr->data;
        rna_object_vgroup_name_index_get(ptr, value, sim->vgroup_shrink);
 }
 
 static int rna_ClothSettings_shrink_vgroup_length(PointerRNA *ptr)
 {
-       ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
+       ClothSimSettings *sim = (ClothSimSettings *)ptr->data;
        return rna_object_vgroup_name_index_length(ptr, sim->vgroup_shrink);
 }
 
 static void rna_ClothSettings_shrink_vgroup_set(PointerRNA *ptr, const char *value)
 {
-       ClothSimSettings *sim = (ClothSimSettings*)ptr->data;
+       ClothSimSettings *sim = (ClothSimSettings *)ptr->data;
        rna_object_vgroup_name_index_set(ptr, value, &sim->vgroup_shrink);
 }
 
index ad8a6919c9186714b2e4d7500013620bebd39bc4..13bf615b8dcd986bd165428bfa86b6c7613b2eb3 100644 (file)
@@ -450,7 +450,7 @@ def main():
     for operators_test in ((), operators):
         # Run the operator tests in different contexts
         run_ops(operators_test, setup_func=lambda: None)
-        
+
         if USE_FILES:
             continue