[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [28550] trunk/blender: misc uninteresting stuff (killing time at airport commit)

Campbell Barton ideasman42 at gmail.com
Mon May 3 18:00:42 CEST 2010


Revision: 28550
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=28550
Author:   campbellbarton
Date:     2010-05-03 18:00:42 +0200 (Mon, 03 May 2010)

Log Message:
-----------
misc uninteresting stuff (killing time at airport commit)
- pep8 updates
- RNA_TwoDFilterActuator --> RNA_Filter2DActuator
- minor changes to conolse namespace init.

Modified Paths:
--------------
    trunk/blender/release/scripts/op/console_python.py
    trunk/blender/release/scripts/op/image.py
    trunk/blender/release/scripts/op/vertexpaint_dirt.py
    trunk/blender/release/scripts/ui/properties_data_mesh.py
    trunk/blender/release/scripts/ui/properties_particle.py
    trunk/blender/release/scripts/ui/properties_physics_common.py
    trunk/blender/release/scripts/ui/properties_render.py
    trunk/blender/release/scripts/ui/properties_texture.py
    trunk/blender/release/scripts/ui/space_image.py
    trunk/blender/release/scripts/ui/space_outliner.py
    trunk/blender/release/scripts/ui/space_sequencer.py
    trunk/blender/release/scripts/ui/space_userpref_keymap.py
    trunk/blender/source/blender/makesrna/intern/rna_actuator.c

Modified: trunk/blender/release/scripts/op/console_python.py
===================================================================
--- trunk/blender/release/scripts/op/console_python.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/op/console_python.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -40,9 +40,9 @@
     '''
     from code import InteractiveConsole
 
-    try:
-        consoles = get_console.consoles
-    except:
+    consoles = getattr(get_console, "consoles", None)
+
+    if consoles is None:
         consoles = get_console.consoles = {}
 
     # clear all dead consoles, use text names as IDs
@@ -53,16 +53,17 @@
             del consoles[id]
     '''
 
-    try:
-        console, stdout, stderr = consoles[console_id]
-        
+    console_data = consoles.get(console_id)
+
+    if console_data:
+        console, stdout, stderr = console_data
+
         # XXX, bug in python 3.1.2 ?
         # seems there is no way to clear StringIO objects for writing, have to make new ones each time.
         import io
         stdout = io.StringIO()
         stderr = io.StringIO()
-        
-    except:
+    else:
         namespace = {'__builtins__': __builtins__, 'bpy': bpy}
         console = InteractiveConsole(namespace)
 

Modified: trunk/blender/release/scripts/op/image.py
===================================================================
--- trunk/blender/release/scripts/op/image.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/op/image.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -28,7 +28,7 @@
     bl_label = "Image Edit Externally"
     bl_options = {'REGISTER'}
 
-    path = StringProperty(name="File Path", description="Path to an image file", maxlen= 1024, default= "")
+    path = StringProperty(name="File Path", description="Path to an image file", maxlen=1024, default="")
 
     def _editor_guess(self, context):
         import platform

Modified: trunk/blender/release/scripts/op/vertexpaint_dirt.py
===================================================================
--- trunk/blender/release/scripts/op/vertexpaint_dirt.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/op/vertexpaint_dirt.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -69,10 +69,10 @@
 
         # normalize the vector by dividing by the number of connected verts
         tot_con = len(con[i])
-        
+
         if tot_con == 0:
             continue
-        
+
         vec /= tot_con
 
         # angle is the acos of the dot product between vert and connected verts normals

Modified: trunk/blender/release/scripts/ui/properties_data_mesh.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_data_mesh.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/properties_data_mesh.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -303,7 +303,7 @@
         ob = context.active_object
         rd = context.scene.render
 
-        return (context.mode =='EDIT_MESH') and (rd.engine == 'BLENDER_GAME') and ob and ob.type == 'MESH'
+        return (context.mode == 'EDIT_MESH') and (rd.engine == 'BLENDER_GAME') and ob and ob.type == 'MESH'
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/ui/properties_particle.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_particle.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/properties_particle.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -389,7 +389,7 @@
             row.prop(part, "physics_type", expand=True)
         else:
             row.prop(part, "physics_type", text="")
-            
+
         if part.physics_type != 'NO':
             row = layout.row()
             col = row.column(align=True)

Modified: trunk/blender/release/scripts/ui/properties_physics_common.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_physics_common.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/properties_physics_common.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -49,12 +49,11 @@
         layout.label(text=cache.info)
     else:
         layout.prop(cache, "name", text="File Name")
-        
+
         split = layout.split()
         col = split.column(align=True)
-        
+
         if not particles:
-            
             col.enabled = enabled
             col.prop(cache, "frame_start")
             col.prop(cache, "frame_end")
@@ -74,19 +73,18 @@
             sub.prop(cache, "disk_cache")
             col.label(text=cache.info)
 
-        
 
         layout.separator()
-        
+
         split = layout.split()
-        
+
         col = split.column()
-        
+
         if cache.baked == True:
             col.operator("ptcache.free_bake", text="Free Bake")
         else:
             col.operator("ptcache.bake", text="Bake").bake = True
-        
+
         sub = col.row()
         sub.enabled = (cache.frames_skipped or cache.outdated) and enabled
         sub.operator("ptcache.bake", text="Calculate To Frame").bake = False
@@ -94,8 +92,8 @@
         sub = col.column()
         sub.enabled = enabled
         sub.operator("ptcache.bake_from_cache", text="Current Cache to Bake")
-        
-        
+
+
         if wide_ui:
             col = split.column()
         col.operator("ptcache.bake_all", text="Bake All Dynamics").bake = True

Modified: trunk/blender/release/scripts/ui/properties_render.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_render.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/properties_render.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -106,7 +106,6 @@
         col.label(text="Mask Layers:")
         col.prop(rl, "zmask_layers", text="")
 
-        
 
         layout.separator()
         layout.label(text="Include:")

Modified: trunk/blender/release/scripts/ui/properties_texture.py
===================================================================
--- trunk/blender/release/scripts/ui/properties_texture.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/properties_texture.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -47,6 +47,7 @@
 
 from properties_material import active_node_mat
 
+
 def context_tex_datablock(context):
     idblock = context.material
     if idblock:
@@ -71,7 +72,8 @@
 
     def poll(self, context):
         tex = context.texture
-        if not tex or tex == None: return False
+        if not tex:
+            return False
         engine = context.scene.render.engine
         return (tex.type != 'NONE' or tex.use_nodes) and (engine in self.COMPAT_ENGINES)
 
@@ -102,7 +104,7 @@
         engine = context.scene.render.engine
         if not hasattr(context, "texture_slot"):
             return False
-        return ((context.material or context.world or context.lamp or context.brush or context.texture) 
+        return ((context.material or context.world or context.lamp or context.brush or context.texture)
             and (engine in self.COMPAT_ENGINES))
 
     def draw(self, context):
@@ -212,7 +214,7 @@
     def poll(self, context):
         if not hasattr(context, "texture_slot"):
             return False
-        
+
         engine = context.scene.render.engine
         return TextureButtonsPanel.poll(self, context) and (engine in self.COMPAT_ENGINES)
 
@@ -228,7 +230,7 @@
 
         if not getattr(context, "texture_slot", None):
             return False
-        
+
         engine = context.scene.render.engine
         return (engine in self.COMPAT_ENGINES)
 
@@ -277,7 +279,7 @@
                 row = layout.row()
                 row.active = tex.map_mode in ('FIXED', 'TILED')
                 row.prop(tex, "angle")
-    
+
                 row = layout.row()
                 row.active = tex.map_mode in ('TILED', '3D')
                 row.column().prop(tex, "size")

Modified: trunk/blender/release/scripts/ui/space_image.py
===================================================================
--- trunk/blender/release/scripts/ui/space_image.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/space_image.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -471,7 +471,7 @@
 
     def poll(self, context):
         sima = context.space_data
-        return sima 
+        return sima
 
     def draw(self, context):
         layout = self.layout

Modified: trunk/blender/release/scripts/ui/space_outliner.py
===================================================================
--- trunk/blender/release/scripts/ui/space_outliner.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/space_outliner.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -85,6 +85,7 @@
         layout.operator("screen.area_dupli")
         layout.operator("screen.screen_full_area")
 
+
 class OUTLINER_MT_search(bpy.types.Menu):
     bl_label = "Search"
 
@@ -98,6 +99,7 @@
         col.prop(space, "match_case_sensitive")
         col.prop(space, "match_complete")
 
+
 class OUTLINER_MT_edit_datablocks(bpy.types.Menu):
     bl_label = "Edit"
 
@@ -118,7 +120,7 @@
 classes = [
     OUTLINER_HT_header,
     OUTLINER_MT_view,
-	OUTLINER_MT_search,
+    OUTLINER_MT_search,
     OUTLINER_MT_edit_datablocks]
 
 

Modified: trunk/blender/release/scripts/ui/space_sequencer.py
===================================================================
--- trunk/blender/release/scripts/ui/space_sequencer.py	2010-05-03 15:56:44 UTC (rev 28549)
+++ trunk/blender/release/scripts/ui/space_sequencer.py	2010-05-03 16:00:42 UTC (rev 28550)
@@ -446,7 +446,7 @@
 
         elif strip.type == 'TRANSFORM':
             self.draw_panel_transform(strip)
-            
+
         elif strip.type == "MULTICAM":
             layout.prop(strip, "multicam_source")
 
@@ -518,7 +518,7 @@
                               'CROSS', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP',
                               'PLUGIN',
                               'WIPE', 'GLOW', 'TRANSFORM', 'COLOR',
-                              'MULTICAM','SPEED')
+                              'MULTICAM', 'SPEED')
 
     def draw_filename(self, context):
         pass
@@ -611,6 +611,7 @@
             col = split.column()
             col.prop(elem, "filename", text="") # strip.elements[0] could be a fallback
 
+
 class SEQUENCER_PT_input_secondary(SEQUENCER_PT_input):

@@ Diff output truncated at 10240 characters. @@




More information about the Bf-blender-cvs mailing list