[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [48522] trunk/blender/release/scripts: Style edit (mostly), use """ for docstrings (not ''').

Bastien Montagne montagne29 at wanadoo.fr
Tue Jul 3 11:02:42 CEST 2012


Revision: 48522
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=48522
Author:   mont29
Date:     2012-07-03 09:02:41 +0000 (Tue, 03 Jul 2012)
Log Message:
-----------
Style edit (mostly), use """ for docstrings (not ''').

Should also fix the broken py ops tips...

Modified Paths:
--------------
    trunk/blender/release/scripts/modules/animsys_refactor.py
    trunk/blender/release/scripts/modules/bpy/ops.py
    trunk/blender/release/scripts/modules/bpy_extras/mesh_utils.py
    trunk/blender/release/scripts/modules/bpyml_ui.py
    trunk/blender/release/scripts/modules/console_python.py
    trunk/blender/release/scripts/modules/rna_info.py
    trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
    trunk/blender/release/scripts/startup/bl_operators/image.py
    trunk/blender/release/scripts/startup/bl_operators/mesh.py
    trunk/blender/release/scripts/startup/bl_operators/object.py
    trunk/blender/release/scripts/startup/bl_operators/object_align.py
    trunk/blender/release/scripts/startup/bl_operators/object_randomize_transform.py
    trunk/blender/release/scripts/startup/bl_operators/presets.py
    trunk/blender/release/scripts/startup/bl_operators/screen_play_rendered_anim.py
    trunk/blender/release/scripts/startup/bl_operators/sequencer.py
    trunk/blender/release/scripts/startup/bl_operators/uvcalc_follow_active.py
    trunk/blender/release/scripts/startup/bl_operators/uvcalc_lightmap.py
    trunk/blender/release/scripts/startup/bl_operators/uvcalc_smart_project.py
    trunk/blender/release/scripts/startup/bl_operators/wm.py
    trunk/blender/release/scripts/startup/bl_ui/properties_data_curve.py

Modified: trunk/blender/release/scripts/modules/animsys_refactor.py
===================================================================
--- trunk/blender/release/scripts/modules/animsys_refactor.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/animsys_refactor.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -157,8 +157,8 @@
 
 
 def update_data_paths(rna_update):
-    ''' rna_update triple [(class_name, from, to), ...]
-    '''
+    """ rna_update triple [(class_name, from, to), ...]
+    """
 
     # make a faster lookup dict
     rna_update_dict = {}

Modified: trunk/blender/release/scripts/modules/bpy/ops.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy/ops.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/bpy/ops.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -31,16 +31,16 @@
 
 
 class BPyOps(object):
-    '''
+    """
     Fake module like class.
 
      bpy.ops
-    '''
+    """
 
     def __getattr__(self, module):
-        '''
+        """
         gets a bpy.ops submodule
-        '''
+        """
         if module.startswith('__'):
             raise AttributeError(module)
         return BPyOpsSubMod(module)
@@ -69,20 +69,20 @@
 
 
 class BPyOpsSubMod(object):
-    '''
+    """
     Utility class to fake submodules.
 
     eg. bpy.ops.object
-    '''
+    """
     __keys__ = ("module",)
 
     def __init__(self, module):
         self.module = module
 
     def __getattr__(self, func):
-        '''
+        """
         gets a bpy.ops.submodule function
-        '''
+        """
         if func.startswith('__'):
             raise AttributeError(func)
         return BPyOpsSubModOp(self.module, func)
@@ -105,11 +105,11 @@
 
 
 class BPyOpsSubModOp(object):
-    '''
+    """
     Utility class to fake submodule operators.
 
     eg. bpy.ops.object.somefunc
-    '''
+    """
 
     __keys__ = ("module", "func")
 

Modified: trunk/blender/release/scripts/modules/bpy_extras/mesh_utils.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_extras/mesh_utils.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/bpy_extras/mesh_utils.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -319,7 +319,7 @@
 
 
 def ngon_tessellate(from_data, indices, fix_loops=True):
-    '''
+    """
     Takes a polyline of indices (fgon) and returns a list of face
     indicie lists. Designed to be used for importers that need indices for an
     fgon to create from existing verts.
@@ -329,7 +329,7 @@
        to fill, and can be a subset of the data given.
     fix_loops: If this is enabled polylines that use loops to make multiple
        polylines are delt with correctly.
-    '''
+    """
 
     from mathutils.geometry import tessellate_polygon
     from mathutils import Vector
@@ -352,9 +352,9 @@
             return v1[1], v2[1]
 
     if not fix_loops:
-        '''
+        """
         Normal single concave loop filling
-        '''
+        """
         if type(from_data) in {tuple, list}:
             verts = [Vector(from_data[i]) for ii, i in enumerate(indices)]
         else:
@@ -368,10 +368,10 @@
         fill = tessellate_polygon([verts])
 
     else:
-        '''
+        """
         Seperate this loop into multiple loops be finding edges that are
         used twice. This is used by lightwave LWO files a lot
-        '''
+        """
 
         if type(from_data) in {tuple, list}:
             verts = [vert_treplet(Vector(from_data[i]), ii)

Modified: trunk/blender/release/scripts/modules/bpyml_ui.py
===================================================================
--- trunk/blender/release/scripts/modules/bpyml_ui.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/bpyml_ui.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -85,10 +85,10 @@
 
 
 class BPyML_BaseUI():
-    '''
+    """
     This is a mix-in class that defines a draw function
     which checks for draw_data
-    '''
+    """
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/modules/console_python.py
===================================================================
--- trunk/blender/release/scripts/modules/console_python.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/console_python.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -48,14 +48,14 @@
 
 
 def get_console(console_id):
-    '''
+    """
     helper function for console operators
     currently each text data block gets its own
     console - code.InteractiveConsole()
     ...which is stored in this function.
 
     console_id can be any hashable type
-    '''
+    """
     from code import InteractiveConsole
 
     consoles = getattr(get_console, "consoles", None)

Modified: trunk/blender/release/scripts/modules/rna_info.py
===================================================================
--- trunk/blender/release/scripts/modules/rna_info.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/modules/rna_info.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -437,9 +437,9 @@
     # rna_functions_dict = {}  # store all functions directly in this type (not inherited)
 
     def full_rna_struct_path(rna_struct):
-        '''
+        """
         Needed when referencing one struct from another
-        '''
+        """
         nested = rna_struct.nested
         if nested:
             return "%s.%s" % (full_rna_struct_path(nested), rna_struct.identifier)

Modified: trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/startup/bl_operators/add_mesh_torus.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -84,7 +84,7 @@
 
 
 class AddTorus(Operator, object_utils.AddObjectHelper):
-    '''Add a torus mesh'''
+    """Add a torus mesh"""
     bl_idname = "mesh.primitive_torus_add"
     bl_label = "Add Torus"
     bl_options = {'REGISTER', 'UNDO', 'PRESET'}

Modified: trunk/blender/release/scripts/startup/bl_operators/image.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/image.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/startup/bl_operators/image.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -24,7 +24,7 @@
 
 
 class EditExternally(Operator):
-    '''Edit image in an external application'''
+    """Edit image in an external application"""
     bl_idname = "image.external_edit"
     bl_label = "Image Edit Externally"
     bl_options = {'REGISTER'}

Modified: trunk/blender/release/scripts/startup/bl_operators/mesh.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/mesh.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/startup/bl_operators/mesh.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -25,7 +25,7 @@
 
 
 class MeshMirrorUV(Operator):
-    '''Copy mirror UV coordinates on the X axis based on a mirrored mesh'''
+    """Copy mirror UV coordinates on the X axis based on a mirrored mesh"""
     bl_idname = "mesh.faces_mirror_uv"
     bl_label = "Copy Mirrored UV coords"
     bl_options = {'REGISTER', 'UNDO'}

Modified: trunk/blender/release/scripts/startup/bl_operators/object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/object.py	2012-07-03 08:54:07 UTC (rev 48521)
+++ trunk/blender/release/scripts/startup/bl_operators/object.py	2012-07-03 09:02:41 UTC (rev 48522)
@@ -27,7 +27,7 @@
 
 
 class SelectPattern(Operator):
-    '''Select objects matching a naming pattern'''
+    """Select objects matching a naming pattern"""
     bl_idname = "object.select_pattern"
     bl_label = "Select Pattern"
     bl_options = {'REGISTER', 'UNDO'}
@@ -105,7 +105,7 @@
 
 
 class SelectCamera(Operator):
-    '''Select the active camera'''
+    """Select the active camera"""
     bl_idname = "object.select_camera"
     bl_label = "Select Camera"
     bl_options = {'REGISTER', 'UNDO'}
@@ -131,7 +131,7 @@
 
 
 class SelectHierarchy(Operator):
-    """Select object relative to the active object's position """
+    """Select object relative to the active object's position """ \
     """in the hierarchy"""
     bl_idname = "object.select_hierarchy"
     bl_label = "Select Hierarchy"
@@ -198,7 +198,7 @@
 
 
 class SubdivisionSet(Operator):
-    '''Sets a Subdivision Surface Level (1-5)'''
+    """Sets a Subdivision Surface Level (1-5)"""
 
     bl_idname = "object.subdivision_set"
     bl_label = "Subdivision Set"
@@ -278,7 +278,7 @@
 
 
 class ShapeTransfer(Operator):
-    """Copy another selected objects active shape to this one by """
+    """Copy another selected objects active shape to this one by """ \
     """applying the relative offsets"""
 
     bl_idname = "object.shape_key_transfer"
@@ -468,7 +468,7 @@
 
 
 class JoinUVs(Operator):
-    '''Copy UV Layout to objects with matching geometry'''
+    """Copy UV Layout to objects with matching geometry"""
     bl_idname = "object.join_uvs"
     bl_label = "Join as UVs"
 
@@ -547,7 +547,7 @@
 
 
 class MakeDupliFace(Operator):
-    '''Make linked objects into dupli-faces'''
+    """Make linked objects into dupli-faces"""
     bl_idname = "object.make_dupli_face"
     bl_label = "Make Dupli-Face"
 
@@ -642,7 +642,7 @@
 
 
 class ClearAllRestrictRender(Operator):
-    '''Reveal all render objects by setting the hide render flag'''
+    """Reveal all render objects by setting the hide render flag"""
     bl_idname = "object.hide_render_clear_all"
     bl_label = "Clear All Restrict Render"
     bl_options = {'REGISTER', 'UNDO'}
@@ -654,7 +654,7 @@
 
 
 class TransformsToDeltasAnim(Operator):
-    '''Convert object animation for normal transforms to delta transforms'''
+    """Convert object animation for normal transforms to delta transforms"""
     bl_idname = "object.anim_transforms_to_deltas"
     bl_label = "Animated Transforms to Deltas"
     bl_options = {'REGISTER', 'UNDO'}
@@ -700,7 +700,7 @@
 
 
 class DupliOffsetFromCursor(Operator):
-    '''Set offset used for DupliGroup based on cursor position'''
+    """Set offset used for DupliGroup based on cursor position"""

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list