[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39798] trunk/blender: minor edits, pep8 - also correct float -> double promotion for blf.

Campbell Barton ideasman42 at gmail.com
Tue Aug 30 12:49:58 CEST 2011


Revision: 39798
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39798
Author:   campbellbarton
Date:     2011-08-30 10:49:58 +0000 (Tue, 30 Aug 2011)
Log Message:
-----------
minor edits, pep8 - also correct float -> double promotion for blf.

Modified Paths:
--------------
    trunk/blender/doc/python_api/sphinx_doc_gen.py
    trunk/blender/release/scripts/modules/bpy_types.py
    trunk/blender/release/scripts/startup/bl_operators/nla.py
    trunk/blender/release/scripts/startup/bl_operators/object.py
    trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
    trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
    trunk/blender/release/scripts/startup/bl_ui/properties_texture.py
    trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py
    trunk/blender/release/scripts/startup/bl_ui/space_nla.py
    trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
    trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
    trunk/blender/release/scripts/startup/keyingsets_builtins.py
    trunk/blender/source/blender/blenfont/intern/blf.c
    trunk/blender/source/blender/editors/space_nla/nla_edit.c

Modified: trunk/blender/doc/python_api/sphinx_doc_gen.py
===================================================================
--- trunk/blender/doc/python_api/sphinx_doc_gen.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/doc/python_api/sphinx_doc_gen.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -1222,7 +1222,6 @@
 
     shutil.copy2(os.path.join(BASEPATH, "..", "rst", "change_log.rst"), BASEPATH)
 
-
     if not EXCLUDE_INFO_DOCS:
         for info, info_desc in INFO_DOCS:
             shutil.copy2(os.path.join(BASEPATH, "..", "rst", info), BASEPATH)

Modified: trunk/blender/release/scripts/modules/bpy_types.py
===================================================================
--- trunk/blender/release/scripts/modules/bpy_types.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/modules/bpy_types.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -413,7 +413,7 @@
 
 class Sound(bpy_types.ID):
     __slots__ = ()
-    
+
     @property
     def factory(self):
         """The aud.Factory object of the sound."""

Modified: trunk/blender/release/scripts/startup/bl_operators/nla.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/nla.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_operators/nla.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -269,10 +269,8 @@
         wm = context.window_manager
         return wm.invoke_props_dialog(self)
 
-#################################
 
-
-class ClearUselessActions(bpy.types.Operator):
+class ClearUselessActions(Operator):
     '''Mark actions with no F-Curves for deletion after save+reload of file preserving "action libraries"'''
     bl_idname = "anim.clear_useless_actions"
     bl_label = "Clear Useless Actions"

Modified: trunk/blender/release/scripts/startup/bl_operators/object.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_operators/object.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_operators/object.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -686,26 +686,30 @@
             obj.hide_render = False
         return {'FINISHED'}
 
-class TransformsToDeltasAnim(bpy.types.Operator):
+
+class TransformsToDeltasAnim(Operator):
     '''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'}
-    
+
     @classmethod
     def poll(cls, context):
         obs = context.selected_editable_objects
         return (obs is not None)
-    
+
     def execute(self, context):
         for obj in context.selected_editable_objects:
             # get animation data
             adt = obj.animation_data
             if (adt is None) or (adt.action is None):
-                self.report({'WARNING'}, "No animation data to convert on object: " + obj.name)
+                self.report({'WARNING'},
+                            "No animation data to convert on object: %r" %
+                            obj.name)
                 continue
-            
-            # if F-Curve uses standard transform path, just append "delta_" to this path
+
+            # if F-Curve uses standard transform path
+            # just append "delta_" to this path
             for fcu in adt.action.fcurves:
                 if fcu.data_path == "location":
                     fcu.data_path = "delta_location"
@@ -716,13 +720,14 @@
                 elif fcu.data_path == "rotation_quaternion":
                     fcu.data_path = "delta_rotation_quaternion"
                     obj.rotation_quaternion.identity()
-                #elif fcu.data_path == "rotation_axis_angle":  # XXX: currently not implemented 
-                #   fcu.data_path = "delta_rotation_axis_angle"
+                # XXX: currently not implemented
+                # elif fcu.data_path == "rotation_axis_angle":
+                #    fcu.data_path = "delta_rotation_axis_angle"
                 elif fcu.data_path == "scale":
                     fcu.data_path = "delta_scale"
-                    obj.scale = (1, 1, 1)
-        
+                    obj.scale = 1.0, 1.0, 1.0
+
         # hack: force animsys flush by changing frame, so that deltas get run
         context.scene.frame_set(context.scene.frame_current)
-        
+
         return {'FINISHED'}

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_data_armature.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -74,6 +74,7 @@
         if context.scene.render.engine == "BLENDER_GAME":
             layout.row().prop(arm, "vert_deformer", expand=True, text="")
 
+
 class DATA_PT_display(ArmatureButtonsPanel, Panel):
     bl_label = "Display"
 

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_object_constraint.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -478,7 +478,6 @@
         row.prop(con, "use_transform_limit")
         row.label()
 
-
     def STRETCH_TO(self, context, layout, con):
         self.target_template(layout, con)
 

Modified: trunk/blender/release/scripts/startup/bl_ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/properties_texture.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/properties_texture.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -414,7 +414,7 @@
             row = col.row()
             row.active = tex.use_normal_map
             row.prop(slot, "normal_map_space", text="")
-            
+
             row = col.row()
             row.active = not tex.use_normal_map
             row.prop(tex, "use_derivative_map")
@@ -1029,14 +1029,14 @@
 
             # only show bump settings if activated but not for normalmap images
             row = layout.row()
-            
+
             sub = row.row()
             sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and (tex.texture.use_normal_map or tex.texture.use_derivative_map))
             sub.prop(tex, "bump_method", text="Method")
 
-			# the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps
+            # the space setting is supported for: derivmaps + bumpmaps (DEFAULT,BEST_QUALITY), not for normalmaps
             sub = row.row()
-            sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map)) 
+            sub.active = (tex.use_map_normal or tex.use_map_warp) and not (tex.texture.type == 'IMAGE' and tex.texture.use_normal_map) and ((tex.bump_method in {'BUMP_DEFAULT', 'BUMP_BEST_QUALITY'}) or (tex.texture.type == 'IMAGE' and tex.texture.use_derivative_map))
             sub.prop(tex, "bump_objectspace", text="Space")
 
 

Modified: trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/space_dopesheet.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -36,7 +36,7 @@
 
     if is_nla:
         row.prop(dopesheet, "show_missing_nla", text="")
-    
+
     if not genericFiltersOnly:
         if bpy.data.groups:
             row = layout.row(align=True)

Modified: trunk/blender/release/scripts/startup/bl_ui/space_nla.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_nla.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/space_nla.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -69,11 +69,11 @@
         layout.separator()
         layout.operator("anim.previewrange_set")
         layout.operator("anim.previewrange_clear")
-        
+
         layout.separator()
         layout.operator("nla.view_all")
         layout.operator("nla.view_selected")
-        
+
         layout.separator()
         layout.operator("screen.area_dupli")
         layout.operator("screen.screen_full_area")

Modified: trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/space_sequencer.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -804,7 +804,6 @@
                 col.prop(strip.proxy, "timecode")
 
 
-
 class SEQUENCER_PT_preview(SequencerButtonsPanel_Output, Panel):
     bl_label = "Scene Preview/Render"
     bl_space_type = 'SEQUENCE_EDITOR'

Modified: trunk/blender/release/scripts/startup/bl_ui/space_view3d.py
===================================================================
--- trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2011-08-30 10:44:02 UTC (rev 39797)
+++ trunk/blender/release/scripts/startup/bl_ui/space_view3d.py	2011-08-30 10:49:58 UTC (rev 39798)
@@ -179,9 +179,9 @@
 
         layout.operator("object.randomize_transform")
         layout.operator("object.align")
-        
+
         layout.separator()
-        
+
         layout.operator("object.anim_transforms_to_deltas")
 
 
@@ -1273,6 +1273,7 @@
 
         layout.operator("pose.user_transforms_clear", text="Reset unkeyed")
 
+
 class VIEW3D_MT_pose_slide(Menu):
     bl_label = "In-Betweens"
 

Modified: trunk/blender/release/scripts/startup/keyingsets_builtins.py
===================================================================
--- trunk/blender/release/scripts/startup/keyingsets_builtins.py	2011-08-30 10:44:02 UTC (rev 39797)

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list