[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3231] contrib/py/scripts/addons/ presets/keyconfig/blender_2012_experimental.py: knit-picky pep8 edits

Campbell Barton ideasman42 at gmail.com
Fri Apr 6 13:03:26 CEST 2012


Revision: 3231
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3231
Author:   campbellbarton
Date:     2012-04-06 11:03:26 +0000 (Fri, 06 Apr 2012)
Log Message:
-----------
knit-picky pep8 edits

Modified Paths:
--------------
    contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py

Modified: contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py
===================================================================
--- contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py	2012-04-06 10:07:14 UTC (rev 3230)
+++ contrib/py/scripts/addons/presets/keyconfig/blender_2012_experimental.py	2012-04-06 11:03:26 UTC (rev 3231)
@@ -12,7 +12,7 @@
 
 SUBSURF_RELATIVE = True  # Make subsurf hotkeys work by relative
                          # shifting instead of absolute setting
-                         
+
 MAYA_STYLE_MANIPULATORS = False  # Maya-style "QWER" hotkeys for manipulators
 
 
@@ -29,11 +29,11 @@
     '''
     bl_idname = "object.shift_subsurf_level"
     bl_label = "Shift Subsurf Level"
-    
+
     delta = bpy.props.IntProperty(name="Delta", description="Amount to increase/decrease the subsurf level.", default=1)
     min = bpy.props.IntProperty(name="Minimum", description="The lowest subsurf level to shift to.", default=0)
     max = bpy.props.IntProperty(name="Maximum", description="The highest subsurf level to shift to.", default=4)
-    
+
     @classmethod
     def poll(cls, context):
         return context.active_object is not None
@@ -45,12 +45,12 @@
             for mod in obj.modifiers:
                 if mod.type == "SUBSURF":
                     m = mod
-            
+
             # Add a subsurf modifier if necessary
             if not m and self.delta > 0:
-                m = obj.modifiers.new(name="Subsurf", type="SUBSURF")
+                m = obj.modifiers.new(name="Subsurf", type='SUBSURF')
                 m.levels = 0
-            
+
             # Adjust it's subsurf level
             if m:
                 if self.delta > 0:
@@ -72,6 +72,7 @@
                                          ("ROTATE", "Rotate", ""),
                                          ("SCALE", "Scale", "")],
                                          default="NONE")
+
     def execute(self, context):
         if self.mode == "NONE":
             context.space_data.show_manipulator = False
@@ -90,7 +91,7 @@
             context.space_data.use_manipulator_translate = False
             context.space_data.use_manipulator_rotate = False
             context.space_data.use_manipulator_scale = True
-            
+
         return {'FINISHED'}
 bpy.utils.register_class(SetManipulator)
 
@@ -104,9 +105,10 @@
     def draw(self, context):
         layout = self.layout
         layout.operator_enum("object.mode_set", "mode")
+
 bpy.utils.register_class(ModeSwitchMenu)
 # Work around
-bpy.ops.object.mode_set(mode="OBJECT", toggle=False)
+bpy.ops.object.mode_set(mode='OBJECT', toggle=False)  # XXX, WHY IS THE KEYMAP DOING THIS? - campbell
 
 
 
@@ -812,5 +814,3 @@
 kmi.properties.name = 'VIEW3D_MT_hook'
 kmi = km.keymap_items.new('wm.call_menu', 'G', 'PRESS', ctrl=True)
 kmi.properties.name = 'VIEW3D_MT_vertex_group'
-
-



More information about the Bf-extensions-cvs mailing list