pep8 cleanup + correction for external player operator return value.
authorCampbell Barton <ideasman42@gmail.com>
Mon, 22 Feb 2010 23:32:58 +0000 (23:32 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Mon, 22 Feb 2010 23:32:58 +0000 (23:32 +0000)
78 files changed:
release/scripts/extensions/add_mesh_gears.py
release/scripts/extensions/io_mesh_raw/__init__.py
release/scripts/extensions/io_mesh_raw/export_raw.py
release/scripts/extensions/io_mesh_raw/import_raw.py
release/scripts/io/export_fbx.py
release/scripts/io/export_mdd.py
release/scripts/io/export_obj.py
release/scripts/io/export_ply.py
release/scripts/io/export_x3d.py
release/scripts/io/import_scene_3ds.py
release/scripts/io/import_scene_obj.py
release/scripts/io/netrender/__init__.py
release/scripts/modules/bpy/ops.py
release/scripts/modules/bpy/utils.py
release/scripts/modules/rigify/leg_quadruped.py
release/scripts/modules/rigify/mouth.py
release/scripts/modules/rigify/shape_key_control.py
release/scripts/modules/rigify/tail_control.py
release/scripts/op/add_mesh_torus.py
release/scripts/op/console_python.py
release/scripts/op/console_shell.py
release/scripts/op/fcurve_euler_filter.py
release/scripts/op/image.py
release/scripts/op/mesh.py
release/scripts/op/object.py
release/scripts/op/object_align.py
release/scripts/op/object_randomize_transform.py
release/scripts/op/presets.py
release/scripts/op/screen_play_rendered_anim.py
release/scripts/op/uv.py
release/scripts/op/uvcalc_smart_project.py
release/scripts/op/vertexpaint_dirt.py
release/scripts/op/wm.py
release/scripts/templates/operator_modal.py
release/scripts/ui/properties_animviz.py
release/scripts/ui/properties_data_armature.py
release/scripts/ui/properties_data_armature_rigify.py
release/scripts/ui/properties_data_bone.py
release/scripts/ui/properties_data_camera.py
release/scripts/ui/properties_data_curve.py
release/scripts/ui/properties_data_empty.py
release/scripts/ui/properties_data_lamp.py
release/scripts/ui/properties_data_lattice.py
release/scripts/ui/properties_data_mesh.py
release/scripts/ui/properties_data_metaball.py
release/scripts/ui/properties_data_modifier.py
release/scripts/ui/properties_game.py
release/scripts/ui/properties_material.py
release/scripts/ui/properties_object.py
release/scripts/ui/properties_object_constraint.py
release/scripts/ui/properties_particle.py
release/scripts/ui/properties_physics_cloth.py
release/scripts/ui/properties_physics_common.py
release/scripts/ui/properties_physics_field.py
release/scripts/ui/properties_physics_fluid.py
release/scripts/ui/properties_physics_smoke.py
release/scripts/ui/properties_physics_softbody.py
release/scripts/ui/properties_render.py
release/scripts/ui/properties_scene.py
release/scripts/ui/properties_texture.py
release/scripts/ui/properties_world.py
release/scripts/ui/space_buttons.py
release/scripts/ui/space_console.py
release/scripts/ui/space_dopesheet.py
release/scripts/ui/space_filebrowser.py
release/scripts/ui/space_graph.py
release/scripts/ui/space_image.py
release/scripts/ui/space_info.py
release/scripts/ui/space_logic.py
release/scripts/ui/space_nla.py
release/scripts/ui/space_node.py
release/scripts/ui/space_outliner.py
release/scripts/ui/space_sequencer.py
release/scripts/ui/space_text.py
release/scripts/ui/space_time.py
release/scripts/ui/space_userpref.py
release/scripts/ui/space_view3d.py
release/scripts/ui/space_view3d_toolbar.py

index 4c28621535357174c12c67579b593d691fc47d9a..45d5f9317e3ff0ef47b4991411dfe45563068a64 100644 (file)
@@ -50,7 +50,7 @@ for i in vertexgroup_vertex_indices:
 
 Now for some reason the name does not 'stick' and we have to set it this way:
 vertexgroup.name = 'NAME_OF_VERTEXGROUP'
-        
+
 Conversion to 2.50 also meant we could simply do away with our crude user interface.
 Just definining the appropriate properties in the AddGear() operator will display the
 properties in the Blender GUI with the added benefit of making it interactive: changing
@@ -65,7 +65,7 @@ we could no longer use deepcopy(zip(...)) but had to convert the zip object to a
 first.
 
 The code to actually implement the AddGear() function is mostly copied from add_mesh_torus()
-(distributed with Blender). 
+(distributed with Blender).
 
 Unresolved issues:
 
@@ -108,148 +108,148 @@ tv  = [13,14,15,29,30,31]   #vertices on a tooth
 spokefaces=((0,1,2,5),(2,3,4,7),(5,2,7,6),(5,6,9,8),(6,7,10,9),(11,8,13,12),(8,9,10,13),(13,10,15,14))
 
 def add_tooth(a,t,d,r,Ad,De,b,p,rack=0,crown=0.0):
-       """
-       private function: calculate the vertex coords for a single side
-       section of a gear tooth. returns them as a list of lists.
-       """
-       
-       A=[a,a+t/4,a+t/2,a+3*t/4,a+t]
-       C=[cos(i) for i in A] 
-       S=[sin(i) for i in A]
-       
-       Ra=r+Ad
-       Rd=r-De
-       Rb=Rd-b
-       
-       #Pressure angle calc
-       O =Ad*tan(p)
-       p =atan(O/Ra)
-       if r<0 : p = -p
-       
-       if rack :
-               S =[sin(t/4)*I for I in range(-2,3)]
-               Sp=[0,sin(-t/4+p),0,sin(t/4-p)]
-
-               v=[(Rb,r*S[I],d) for I in range(5)]
-               v.extend([(Rd,r*S[I],d) for I in range(5)])
-               v.extend([(r,r*S[I],d) for I in range(1,4)])
-               v.extend([(Ra,r*Sp[I],d) for I in range(1,4)])
-               
-       else :
-               Cp=[0,cos(a+t/4+p),cos(a+t/2),cos(a+3*t/4-p)]
-               Sp=[0,sin(a+t/4+p),sin(a+t/2),sin(a+3*t/4-p)]
-
-               v=[(Rb*C[I],Rb*S[I],d) for I in range(5)]
-               v.extend([(Rd*C[I],Rd*S[I],d) for I in range(5)])
-               v.extend([(r*C[I],r*S[I],d+crown/3) for I in range(1,4)])
-               v.extend([(Ra*Cp[I],Ra*Sp[I],d+crown) for I in range(1,4)])
-               
-       return v
+    """
+    private function: calculate the vertex coords for a single side
+    section of a gear tooth. returns them as a list of lists.
+    """
+
+    A=[a,a+t/4,a+t/2,a+3*t/4,a+t]
+    C=[cos(i) for i in A]
+    S=[sin(i) for i in A]
+
+    Ra=r+Ad
+    Rd=r-De
+    Rb=Rd-b
+
+    #Pressure angle calc
+    O =Ad*tan(p)
+    p =atan(O/Ra)
+    if r<0 : p = -p
+
+    if rack :
+        S =[sin(t/4)*I for I in range(-2,3)]
+        Sp=[0,sin(-t/4+p),0,sin(t/4-p)]
+
+        v=[(Rb,r*S[I],d) for I in range(5)]
+        v.extend([(Rd,r*S[I],d) for I in range(5)])
+        v.extend([(r,r*S[I],d) for I in range(1,4)])
+        v.extend([(Ra,r*Sp[I],d) for I in range(1,4)])
+
+    else :
+        Cp=[0,cos(a+t/4+p),cos(a+t/2),cos(a+3*t/4-p)]
+        Sp=[0,sin(a+t/4+p),sin(a+t/2),sin(a+3*t/4-p)]
+
+        v=[(Rb*C[I],Rb*S[I],d) for I in range(5)]
+        v.extend([(Rd*C[I],Rd*S[I],d) for I in range(5)])
+        v.extend([(r*C[I],r*S[I],d+crown/3) for I in range(1,4)])
+        v.extend([(Ra*Cp[I],Ra*Sp[I],d+crown) for I in range(1,4)])
+
+    return v
 
 def add_spoke2(a,t,d,r,De,b,s,w,l,gap=0,width=19):
-       """
-       EXPERIMENTAL private function: calculate the vertex coords for a single side
-       section of a gearspoke. returns them as a list of lists.
-       """
-       
-       Rd=r-De
-       Rb=Rd-b
-       Rl=Rb
-       
-       v  =[]
-       ef =[]
-       ef2=[]
-       sf =[]
-       if not gap :
-               for N in range(width,1,-2) :
-                       ef.append(len(v))
-                       ts = t/4
-                       tm = a + 2*ts
-                       te = asin(w/Rb)
-                       td = te - ts
-                       t4 = ts+td*(width-N)/(width-3.0)
-                       A=[tm+(i-int(N/2))*t4 for i in range(N)]
-                       C=[cos(i) for i in A] 
-                       S=[sin(i) for i in A]
-                       v.extend([ (Rb*I,Rb*J,d) for (I,J) in zip(C,S)])
-                       ef2.append(len(v)-1)
-                       Rb= Rb-s
-               n=0
-               for N in range(width,3,-2) :
-                       sf.extend([(i+n,i+1+n,i+2+n,i+N+n) for i in range(0,N-1,2)])
-                       sf.extend([(i+2+n,i+N+n,i+N+1+n,i+N+2+n) for i in range(0,N-3,2)])
-                       n = n + N
-               
-       return v,ef,ef2,sf
+    """
+    EXPERIMENTAL private function: calculate the vertex coords for a single side
+    section of a gearspoke. returns them as a list of lists.
+    """
+
+    Rd=r-De
+    Rb=Rd-b
+    Rl=Rb
+
+    v  =[]
+    ef =[]
+    ef2=[]
+    sf =[]
+    if not gap :
+        for N in range(width,1,-2) :
+            ef.append(len(v))
+            ts = t/4
+            tm = a + 2*ts
+            te = asin(w/Rb)
+            td = te - ts
+            t4 = ts+td*(width-N)/(width-3.0)
+            A=[tm+(i-int(N/2))*t4 for i in range(N)]
+            C=[cos(i) for i in A]
+            S=[sin(i) for i in A]
+            v.extend([ (Rb*I,Rb*J,d) for (I,J) in zip(C,S)])
+            ef2.append(len(v)-1)
+            Rb= Rb-s
+        n=0
+        for N in range(width,3,-2) :
+            sf.extend([(i+n,i+1+n,i+2+n,i+N+n) for i in range(0,N-1,2)])
+            sf.extend([(i+2+n,i+N+n,i+N+1+n,i+N+2+n) for i in range(0,N-3,2)])
+            n = n + N
+
+    return v,ef,ef2,sf
 
 def add_gear(N,r,Ad,De,b,p,D=1,skew=0,conangle=0,rack=0,crown=0.0, spoke=0,spbevel=0.1,spwidth=0.2,splength=1.0,spresol=9):
-       """
-       """
-       worm    =0
-       if N<5 : (worm,N)=(N,24)
-       t         =2*pi/N
-       if rack: N=1
-       p           =rad(p)
-       conangle=rad(conangle)
-       skew    =rad(skew)
-       scale   = (r - 2*D*tan(conangle) )/r
-       
-       f =[]
-       v =[]
-       tg=[] #vertexgroup of top vertices.
-       vg=[] #vertexgroup of valley vertices
-       
-       
-       M=[0]
-       if worm : (M,skew,D)=(range(32),rad(11.25),D/2)
-       
-       for W in M:
-               fl=W*N*L*2
-               l=0     #number of vertices
-               for I in range(int(N)):
-                       a=I*t
-                       for(s,d,c,first) in ((W*skew,W*2*D-D,1,1),((W+1)*skew,W*2*D+D,scale,0)):
-                               if worm and I%(int(N)/worm)!=0:
-                                       v.extend(add_tooth(a+s,t,d,r-De,0.0,0.0,b,p))
-                               else:
-                                       v.extend(add_tooth(a+s,t,d,r*c,Ad*c,De*c,b*c,p,rack,crown))
-                               if not worm or (W==0 and first) or (W==(len(M)-1) and not first) :      
-                                       f.extend([ [j+l+fl for j in i]for i in dc(faces)])
-                               l += L
-
-                       #print (len(f))
-                       #print (dc(efc))
-                       f.extend([ [j+I*L*2+fl for j in i] for i in dc(efc)])
-                       #print (len(f))
-                       tg.extend([i+I*L*2 for i in tv])
-                       vg.extend([i+I*L*2 for i in vv])
-       # EXPERIMENTAL: add spokes
-       if not worm and spoke>0 :
-               fl=len(v)
-               for I in range(int(N)):
-                       a=I*t
-                       s=0 # for test
-                       if I%spoke==0 :
-                               for d in (-D,D) :
-                                       (sv,ef,ef2,sf) = add_spoke2(a+s,t,d,r*c,De*c,b*c,spbevel,spwidth,splength,0,spresol)
-                                       v.extend(sv)
-                                       f.extend([ [j+fl for j in i]for i in sf])
-                                       fl += len(sv)
-                               d1 = fl-len(sv)
-                               d2 = fl-2*len(sv)
-                               f.extend([(i+d2,j+d2,j+d1,i+d1) for (i,j) in zip(ef[:-1],ef[1:])])
-                               f.extend([(i+d2,j+d2,j+d1,i+d1) for (i,j) in zip(ef2[:-1],ef2[1:])])
-                       else :
-                               for d in (-D,D) :
-                                       (sv,ef,ef2,sf) = add_spoke2(a+s,t,d,r*c,De*c,b*c,spbevel,spwidth,splength,1,spresol)
-                                       v.extend(sv)
-                                       fl += len(sv)
-                               d1 = fl-len(sv)
-                               d2 = fl-2*len(sv)
-                               #f.extend([(i+d2,i+1+d2,i+1+d1,i+d1) for (i) in (0,1,2,3)])
-                               #f.extend([(i+d2,i+1+d2,i+1+d1,i+d1) for (i) in (5,6,7,8)])
-                                       
-       return flatten(v), flatten(f), tg, vg
+    """
+    """
+    worm       =0
+    if N<5 : (worm,N)=(N,24)
+    t    =2*pi/N
+    if rack: N=1
+    p      =rad(p)
+    conangle=rad(conangle)
+    skew       =rad(skew)
+    scale   = (r - 2*D*tan(conangle) )/r
+
+    f =[]
+    v =[]
+    tg=[] #vertexgroup of top vertices.
+    vg=[] #vertexgroup of valley vertices
+
+
+    M=[0]
+    if worm : (M,skew,D)=(range(32),rad(11.25),D/2)
+
+    for W in M:
+        fl=W*N*L*2
+        l=0    #number of vertices
+        for I in range(int(N)):
+            a=I*t
+            for(s,d,c,first) in ((W*skew,W*2*D-D,1,1),((W+1)*skew,W*2*D+D,scale,0)):
+                if worm and I%(int(N)/worm)!=0:
+                    v.extend(add_tooth(a+s,t,d,r-De,0.0,0.0,b,p))
+                else:
+                    v.extend(add_tooth(a+s,t,d,r*c,Ad*c,De*c,b*c,p,rack,crown))
+                if not worm or (W==0 and first) or (W==(len(M)-1) and not first) :
+                    f.extend([ [j+l+fl for j in i]for i in dc(faces)])
+                l += L
+
+            #print (len(f))
+            #print (dc(efc))
+            f.extend([ [j+I*L*2+fl for j in i] for i in dc(efc)])
+            #print (len(f))
+            tg.extend([i+I*L*2 for i in tv])
+            vg.extend([i+I*L*2 for i in vv])
+    # EXPERIMENTAL: add spokes
+    if not worm and spoke>0 :
+        fl=len(v)
+        for I in range(int(N)):
+            a=I*t
+            s=0 # for test
+            if I%spoke==0 :
+                for d in (-D,D) :
+                    (sv,ef,ef2,sf) = add_spoke2(a+s,t,d,r*c,De*c,b*c,spbevel,spwidth,splength,0,spresol)
+                    v.extend(sv)
+                    f.extend([ [j+fl for j in i]for i in sf])
+                    fl += len(sv)
+                d1 = fl-len(sv)
+                d2 = fl-2*len(sv)
+                f.extend([(i+d2,j+d2,j+d1,i+d1) for (i,j) in zip(ef[:-1],ef[1:])])
+                f.extend([(i+d2,j+d2,j+d1,i+d1) for (i,j) in zip(ef2[:-1],ef2[1:])])
+            else :
+                for d in (-D,D) :
+                    (sv,ef,ef2,sf) = add_spoke2(a+s,t,d,r*c,De*c,b*c,spbevel,spwidth,splength,1,spresol)
+                    v.extend(sv)
+                    fl += len(sv)
+                d1 = fl-len(sv)
+                d2 = fl-2*len(sv)
+                #f.extend([(i+d2,i+1+d2,i+1+d1,i+d1) for (i) in (0,1,2,3)])
+                #f.extend([(i+d2,i+1+d2,i+1+d1,i+d1) for (i) in (5,6,7,8)])
+
+    return flatten(v), flatten(f), tg, vg
 
 
 from bpy.props import *
@@ -307,7 +307,7 @@ class AddGear(bpy.types.Operator):
                                     crown=self.properties.crown)
 
         #print(len(verts_loc)/3,faces)
-        
+
         mesh = bpy.data.meshes.new("Gear")
 
         mesh.add_geometry(int(len(verts_loc) / 3), 0, int(len(faces) / 4))
@@ -321,7 +321,7 @@ class AddGear(bpy.types.Operator):
             ob.selected = False
 
         mesh.update()
-        
+
         ob_new = bpy.data.objects.new('Gear', mesh)
 
         tipgroup = ob_new.add_vertex_group('Tips')
@@ -329,13 +329,13 @@ class AddGear(bpy.types.Operator):
         tipgroup.name = 'Tips'
         for i in tip_vertices:
             ob_new.add_vertex_to_group(i, tipgroup, 1.0, 'ADD')
-            
+
         valleygroup = ob_new.add_vertex_group('Valleys')
         # for some reason the name does not 'stick' and we have to set it this way:
         valleygroup.name = 'Valleys'
         for i in valley_vertices:
             ob_new.add_vertex_to_group(i, valleygroup, 1.0, 'ADD')
-            
+
         scene.objects.link(ob_new)
         scene.objects.active = ob_new
         ob_new.selected = True
@@ -348,7 +348,7 @@ class AddGear(bpy.types.Operator):
         # unfortunately the next line wont get us back to object mode but bombs
         #bpy.ops.object.mode_set('OBJECT')
         #print(4,bpy.context.mode)
-                
+
         ob_new.location = tuple(context.scene.cursor_location)
 
         return {'FINISHED'}
index 697469d3217f71aa7aa13b8f15a0e9bc7213b2f1..a7f38ad6a5ffef972e6a4c78a53e020c096eeb46 100644 (file)
@@ -48,4 +48,4 @@ def unregister():
     bpy.types.INFO_MT_file_export.remove(menu_export)
 
 if __name__ == "__main__":
-    register()
\ No newline at end of file
+    register()
index c26eae8cf29944609b1cef15b5dc77b4a70fd60e..e94e26bb604bbdfb4a80f326bdefef3d6f1df370 100644 (file)
@@ -28,7 +28,7 @@ of 12 values (this was the default before blender 2.5). Now default
 settings will triangulate the mesh.
 
 Usage:<br>
-    Execute this script from the "File->Export" menu. You can select 
+    Execute this script from the "File->Export" menu. You can select
 whether modifiers should be applied and if the mesh is triangulated.
 
 """
@@ -45,7 +45,7 @@ def faceToTriangles(face):
         triangles.append(face)
 
     return triangles
-    
+
 
 def faceValues(face, mesh, matrix):
     fv = []
index 609c934324c426966290693a828566ffb6656981..fc1bddc79fdbf61cef9e20e6c176d41fc747fdac 100644 (file)
@@ -23,9 +23,9 @@ This script imports Raw Triangle File format files to Blender.
 
 The raw triangle format is very simple; it has no verts or faces lists.
 It's just a simple ascii text file with the vertices of each triangle
-listed on each line. In addition, a line with 12 values will be 
-imported as a quad. This may be in conflict with some other 
-applications, which use a raw format, but this is how it was 
+listed on each line. In addition, a line with 12 values will be
+imported as a quad. This may be in conflict with some other
+applications, which use a raw format, but this is how it was
 implemented back in blender 2.42.
 
 Usage:<br>
@@ -65,8 +65,8 @@ def readMesh(filename, objName):
             return [(f1, f2, f3), (f4, f5, f6), (f7, f8, f9), (A, B, C)]
         else:
             return None
-        
-    
+
+
     faces = []
     for line in file.readlines():
         face = line_to_face(line)
@@ -100,7 +100,7 @@ def readMesh(filename, objName):
 
 def addMeshObj(mesh, objName):
     scn = bpy.context.scene
-    
+
     for o in scn.objects:
         o.selected = False
 
index 558c5896397b31eef2142895df3431db1c7f7fdc..117b113a39996badcbecfbe72c61d372a2c709c2 100644 (file)
@@ -3463,6 +3463,7 @@ class ExportFBX(bpy.types.Operator):
 # SMALL or COSMETICAL
 # - find a way to get blender version, and put it in bpy.util?, old was Blender.Get('version')
 
+
 def menu_func(self, context):
     default_path = bpy.data.filename.replace(".blend", ".fbx")
     self.layout.operator(ExportFBX.bl_idname, text="Autodesk FBX (.fbx)").path = default_path
@@ -3471,11 +3472,11 @@ def menu_func(self, context):
 def register():
     bpy.types.register(ExportFBX)
     bpy.types.INFO_MT_file_export.append(menu_func)
-    
+
+
 def unregister():
     bpy.types.unregister(ExportFBX)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index 6ac6ea0bee36e2ad794cc834fde0e0fe4ecf2819..a4dca4db204e77254999301a60a54e7643be7a2e 100644 (file)
@@ -190,7 +190,7 @@ def menu_func(self, context):
 def register():
     bpy.types.register(ExportMDD)
     bpy.types.INFO_MT_file_export.append(menu_func)
-    
+
 def unregister():
     bpy.types.unregister(ExportMDD)
     bpy.types.INFO_MT_file_export.remove(menu_func)
index b633aeb385c078437f774a70871e52fc4b833730..e3b6715d288b3687617be1b942b3797de5ea4401 100644 (file)
@@ -966,7 +966,7 @@ def menu_func(self, context):
 def register():
     bpy.types.register(ExportOBJ)
     bpy.types.INFO_MT_file_export.append(menu_func)
-    
+
 def unregister():
     bpy.types.unregister(ExportOBJ)
     bpy.types.INFO_MT_file_export.remove(menu_func)
index 2ee8caba279f8b3e9d9568c4d7558d762d69249e..92d4f2ff914afa220ffe7d170cf0200b752498bc 100644 (file)
@@ -321,11 +321,11 @@ def menu_func(self, context):
 def register():
     bpy.types.register(ExportPLY)
     bpy.types.INFO_MT_file_export.append(menu_func)
-    
+
+
 def unregister():
     bpy.types.unregister(ExportPLY)
     bpy.types.INFO_MT_file_export.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index cd944b07ca08ac7567a152a74099df49ab81fa09..68e7ebce361da10e415929b7eba7cfc7e06cb7ec 100644 (file)
@@ -1251,7 +1251,7 @@ def menu_func(self, context):
 def register():
     bpy.types.register(ExportX3D)
     bpy.types.INFO_MT_file_export.append(menu_func)
-    
+
 def unregister():
     bpy.types.unregister(ExportX3D)
     bpy.types.INFO_MT_file_export.remove(menu_func)
index 5b41517ee7146e0ad8c3c35356364eddb95ac337..d1dbdc625632712d47f376b8114d48e613b13756 100644 (file)
@@ -293,12 +293,12 @@ def skip_to_end(file, skip_chunk):
 
 def add_texture_to_material(image, texture, material, mapto):
     #print('assigning %s to %s' % (texture, material))
-    
+
     if mapto not in ("COLOR", "SPECULARITY", "ALPHA", "NORMAL"):
         print('/tError:  Cannot map to "%s"\n\tassuming diffuse color. modify material "%s" later.' % (mapto, material.name))
         mapto = "COLOR"
 
-    if image: 
+    if image:
         texture.image = image
 #      if image: texture.setImage(image) # double check its an image.
 
@@ -413,9 +413,9 @@ def process_next_chunk(file, previous_chunk, importedObjects, IMAGE_SEARCH):
 #                                                              targetFace.uv = [contextMeshUV[vindex] for vindex in myContextMesh_facels[i]]
                             if img:
                                 uf.image = img
-                                
+
                                 # to get this image to show up in 'Textured' shading mode
-                                uf.tex = True 
+                                uf.tex = True
 
             # bmesh.transform(contextMatrix)
             ob = bpy.data.objects.new(tempName, bmesh)
@@ -1015,7 +1015,7 @@ class IMPORT_OT_autodesk_3ds(bpy.types.Operator):
     path = StringProperty(name="File Path", description="File path used for importing the 3DS file", maxlen= 1024, default= "")
     filename = StringProperty(name="File Name", description="Name of the file.")
     directory = StringProperty(name="Directory", description="Directory of the file.")
-       
+
 #      size_constraint = FloatProperty(name="Size Constraint", description="Scale the model by 10 until it reacehs the size constraint. Zero Disables.", min=0.0, max=1000.0, soft_min=0.0, soft_max=1000.0, default=10.0),
 #      search_images = BoolProperty(name="Image Search", description="Search subdirectories for any assosiated images (Warning, may be slow)", default=True),
 #      apply_matrix = BoolProperty(name="Transform Fix", description="Workaround for object transformations importing incorrectly", default=False),
@@ -1036,7 +1036,7 @@ menu_func = lambda self, context: self.layout.operator(IMPORT_OT_autodesk_3ds.bl
 def register():
     bpy.types.register(IMPORT_OT_autodesk_3ds)
     bpy.types.INFO_MT_file_import.append(menu_func)
-    
+
 def unregister():
     bpy.types.unregister(IMPORT_OT_autodesk_3ds)
     bpy.types.INFO_MT_file_import.remove(menu_func)
index 0249d6c6047ca97341fcf697afe358cc4eb39f8e..c5bd8339a15f98e6de8e8506e96c09c3a2ad67c7 100644 (file)
@@ -1627,7 +1627,7 @@ menu_func = lambda self, context: self.layout.operator(IMPORT_OT_obj.bl_idname,
 def register():
     bpy.types.register(IMPORT_OT_obj)
     bpy.types.INFO_MT_file_import.append(menu_func)
-    
+
 def unregister():
     bpy.types.unregister(IMPORT_OT_obj)
     bpy.types.INFO_MT_file_import.remove(menu_func)
index a57115762be5691c988be4f30f565c84e4144182..e06d061f1738e0ea1b699054ef85a340477e2e49 100644 (file)
@@ -44,4 +44,4 @@ def unregister():
     bpy.types.unregister(ui.NetRenderJob)
     bpy.types.unregister(ui.NetRenderSettings)
     bpy.types.unregister(ui.NetRenderSlave)
-    
+
index 045401b54f74d9babac4e217f2e04749bd777aef..f8f01730a49edf750bc026024401a44954bba4e9 100644 (file)
@@ -27,6 +27,7 @@ op_call = ops_module.call
 op_as_string = ops_module.as_string
 op_get_rna = ops_module.get_rna
 
+
 class bpy_ops(object):
     '''
     Fake module like class.
index 5ddf2def5f284e8f48cb361e17af9d34a991a2ef..29d9c42ae57b6b2d1e61fbd3f6a5d47d96348bf9 100644 (file)
@@ -48,10 +48,11 @@ def _test_import(module_name, loaded_modules):
 
     if _bpy.app.debug:
         print("time %s %.4f" % (module_name, time.time() - t))
-    
+
     loaded_modules.add(mod.__name__) # should match mod.__name__ too
     return mod
 
+
 def modules_from_path(path, loaded_modules):
     """
     Load all modules in a path and return them as a list.
@@ -65,9 +66,9 @@ def modules_from_path(path, loaded_modules):
     """
     import traceback
     import time
-    
+
     modules = []
-    
+
     for f in sorted(_os.listdir(path)):
         if f.endswith(".py"):
             # python module
@@ -77,10 +78,10 @@ def modules_from_path(path, loaded_modules):
             mod = _test_import(f, loaded_modules)
         else:
             mod = None
-        
+
         if mod:
             modules.append(mod)
-    
+
     return modules
 
 _loaded = [] # store loaded modules for reloading.
@@ -90,7 +91,7 @@ _bpy_types = __import__("bpy_types") # keep for comparisons, never ever reload t
 def load_scripts(reload_scripts=False, refresh_scripts=False):
     """
     Load scripts and run each modules register function.
-    
+
     :arg reload_scripts: Causes all scripts to have their unregister method called before loading.
     :type reload_scripts: bool
     :arg refresh_scripts: only load scripts which are not already loaded as modules.
@@ -102,7 +103,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
     t_main = time.time()
 
     loaded_modules = set()
-    
+
     if refresh_scripts:
         original_modules = _sys.modules.values()
 
@@ -121,7 +122,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
             return reload(mod)
         except:
             traceback.print_exc()
-    
+
     def test_register(mod):
 
         if refresh_scripts and mod in original_modules:
@@ -141,7 +142,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
             else:
                 print("\nWarning! '%s' has no register function, this is now a requirement for registerable scripts." % mod.__file__)
             _loaded.append(mod)
-    
+
     if reload_scripts:
         # reload modules that may not be directly included
         for type_class_name in dir(_bpy.types):
@@ -155,7 +156,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
         for module_name in sorted(loaded_modules):
             print("Reloading:", module_name)
             test_reload(_sys.modules[module_name])
-            
+
         # loop over and unload all scripts
         _loaded.reverse()
         for mod in _loaded:
@@ -167,7 +168,7 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
                     traceback.print_exc()
         _loaded[:] = []
 
-    for base_path in script_paths(user = False):
+    for base_path in script_paths(user=False):
         for path_subdir in ("ui", "op", "io", "cfg"):
             path = _os.path.join(base_path, path_subdir)
             if _os.path.isdir(path):
@@ -182,20 +183,20 @@ def load_scripts(reload_scripts=False, refresh_scripts=False):
             path = _os.path.join(user_path, path_subdir)
             if _os.path.isdir(path):
                 sys_path_ensure(path)
-    
+
                 for mod in modules_from_path(path, loaded_modules):
                     test_register(mod)
 
     # load extensions
-    used_ext = {ext.module for ext in _bpy.context.user_preferences.extensions}    
+    used_ext = {ext.module for ext in _bpy.context.user_preferences.extensions}
     paths = script_paths("extensions")
     for path in paths:
         sys_path_ensure(path)
-    
+
     for module_name in sorted(used_ext):
         mod = _test_import(module_name, loaded_modules)
         test_register(mod)
-    
+
     if reload_scripts:
         import gc
         print("gc.collect() -> %d" % gc.collect())
@@ -262,16 +263,18 @@ def display_name(name):
 _scripts = _os.path.join(_os.path.dirname(__file__), _os.path.pardir, _os.path.pardir)
 _scripts = (_os.path.normpath(_scripts), )
 
+
 def user_script_path():
     path = _bpy.context.user_preferences.filepaths.python_scripts_directory
-        
+
     if path:
         path = _os.path.normpath(path)
         return path
     else:
         return None
 
-def script_paths(subdir = None, user = True):
+
+def script_paths(subdir=None, user=True):
     """
     Returns a list of valid script paths from the home directory and user preferences.
 
@@ -284,7 +287,7 @@ def script_paths(subdir = None, user = True):
         user_script_path = _bpy.context.user_preferences.filepaths.python_scripts_directory
     else:
         user_script_path = None
-        
+
     for path in home_paths("scripts") + (user_script_path, ):
         if path:
             path = _os.path.normpath(path)
index f2f0c4d883edcd89f0adcc0660edfbfe688e87b5..c21680740bd2c8382cd0390145815fb0c1a0f4c1 100644 (file)
@@ -129,7 +129,7 @@ def ik(obj, bone_definition, base_names, options):
 
     # keep the foot_ik as the parent
     ik_chain.toe_e.connected = False
-    
+
     # Foot uses pose space, not local space, for translation
     ik_chain.foot_e.local_location = False
 
index a30a8757d709b1f2531e9f8adec118bfc2d7b5a8..31d7c5a1ce966a589c554d6cb90612ffd3e6af60 100644 (file)
@@ -197,23 +197,23 @@ def deform(obj, definitions, base_names, options):
     con = pb[lip4].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = definitions[5]
-    
+
     con = pb[lip5].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = definitions[6]
-    
+
     con = pb[lip6].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = definitions[7]
-    
+
     con = pb[lip7].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = definitions[8]
-    
+
     con = pb[lip8].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = definitions[9]
-    
+
     # Constraint mouth corner spread bones
     con = pb[spread_l_1].constraints.new('DAMPED_TRACK')
     con.target = obj
@@ -234,12 +234,12 @@ def deform(obj, definitions, base_names, options):
     con = pb[spread_r_2].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = spread_r_1
-    
+
     con = pb[spread_r_2].constraints.new('DAMPED_TRACK')
     con.target = obj
     con.subtarget = lip8
 
-    
+
     # Corrective shape keys for the corners of the mouth.
     bpy.ops.object.mode_set(mode='EDIT')
 
index 40290035597d3340ea0dea717db29d064e8e7eb7..fd0e900a7b5208b7c7fbe5f286a7509aa4d8584f 100644 (file)
@@ -92,7 +92,7 @@ def main(obj, definitions, base_names, options):
         properties of a single bone.
         A different shape can be driven by the negative value of a transform as
         well by giving a comma-separated list of two shapes.
-    
+
         Required options:
             mesh:  name of mesh object(s) to add/get shapekeys to/from
                    (if multiple objects, make a comma-separated list)
@@ -105,15 +105,15 @@ def main(obj, definitions, base_names, options):
             scale_<x/y/z>_fac: default multiplier of the bone influence on the shape key
             shape_key_sliders:     comma-separated list of custom properties to create sliders out of for driving shape keys
             <custom_prop>:         for each property listed in shape_key_sliders, specify a shape key for it to drive
-            
+
     """
-    
+
     bpy.ops.object.mode_set(mode='EDIT')
     eb = obj.data.edit_bones
     pb = obj.pose.bones
 
     org_bone = definitions[0]
-    
+
     # Options
     req_options = ["mesh"]
     for option in req_options:
@@ -121,11 +121,11 @@ def main(obj, definitions, base_names, options):
             raise RigifyError("'%s' rig type requires a '%s' option (bone: %s)" % (RIG_TYPE, option, base_names[definitions[0]]))
 
     meshes = options["mesh"].replace(" ", "").split(",")
-    
+
     bone = copy_bone_simple(obj.data, org_bone, base_names[org_bone], parent=True).name
-    
+
     bpy.ops.object.mode_set(mode='OBJECT')
-    
+
     # Set rotation mode and axis locks
     pb[bone].rotation_mode = pb[org_bone].rotation_mode
     pb[bone].lock_location = tuple(pb[org_bone].lock_location)
@@ -133,7 +133,7 @@ def main(obj, definitions, base_names, options):
     pb[bone].lock_rotation_w = pb[org_bone].lock_rotation_w
     pb[bone].lock_rotations_4d = pb[org_bone].lock_rotations_4d
     pb[bone].lock_scale = tuple(pb[org_bone].lock_scale)
-    
+
     # List of rig options for specifying shape keys
     # Append '_fac' to the end for the name of the corresponding 'factor
     # default' option for that shape
@@ -146,7 +146,7 @@ def main(obj, definitions, base_names, options):
                          "scale_x",
                          "scale_y",
                          "scale_z"]
-                         
+
     driver_paths = {"loc_x":".location[0]",
                     "loc_y":".location[1]",
                     "loc_z":".location[2]",
@@ -159,13 +159,13 @@ def main(obj, definitions, base_names, options):
                     "scale_x":".scale[0]",
                     "scale_y":".scale[1]",
                     "scale_z":".scale[2]"}
-    
+
     # Create the shape keys and drivers for transforms
     shape_info = []
     for option in shape_key_options:
         if option in options:
             shape_names = options[option].replace(" ", "").split(",")
-            
+
             var_name = bone.replace(".","").replace("-","_") + "_" + option
             # Different RNA paths for euler vs quat
             if option in (shape_key_options[3:6]+shape_key_options[12:15]) \
@@ -173,12 +173,12 @@ def main(obj, definitions, base_names, options):
                 var_path = driver_paths['q' + option]
             else:
                 var_path = driver_paths[option]
-            
+
             if (option+"_fac") in options:
                 fac = options[option+"_fac"]
             else:
                 fac = 1.0
-            
+
             # Positive
             if shape_names[0] != "":
                 # Different expressions for loc/rot/scale and positive/negative
@@ -197,7 +197,7 @@ def main(obj, definitions, base_names, options):
                     expression = "(1.0 - " + var_name + ") * " + str(fac) + " * -2"
                 shape_name = shape_names[0]
                 create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, expression)
-                
+
             # Negative
             if shape_names[0] != "" and len(shape_names) > 1:
                 # Different expressions for loc/rot/scale and positive/negative
@@ -216,7 +216,7 @@ def main(obj, definitions, base_names, options):
                     expression = "(1.0 - " + var_name + ") * " + str(fac) + " * 2"
                 shape_name = shape_names[1]
                 create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, expression)
-    
+
     # Create the shape keys and drivers for custom-property sliders
     if "shape_key_sliders" in options:
         # Get the slider names
@@ -227,7 +227,7 @@ def main(obj, definitions, base_names, options):
             for slider_name in slider_names:
                 if slider_name in options:
                     shape_names = options[slider_name].replace(" ", "").split(",")
-                    
+
                     # Set up the custom property on the bone
                     prop = rna_idprop_ui_prop_get(pb[bone], slider_name, create=True)
                     pb[bone][slider_name] = 0.0
@@ -238,7 +238,7 @@ def main(obj, definitions, base_names, options):
                     if len(shape_names) > 1:
                         prop["min"] = -1.0
                         prop["soft_min"] = -1.0
-                        
+
                     # Add the shape drivers
                     # Positive
                     if shape_names[0] != "":
@@ -266,19 +266,19 @@ def main(obj, definitions, base_names, options):
                         expression = var_name + " * " + str(fac) + " * -1"
                         # Create the shape key driver
                         create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, expression)
-    
-    
+
+
     # Org bone copy transforms of control bone
     con = pb[org_bone].constraints.new('COPY_TRANSFORMS')
     con.target = obj
     con.subtarget = bone
-                
+
     return (None,)
 
 
 def create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, expression):
     """ Creates/gets a shape key and sets up a driver for it.
-    
+
         obj = armature object
         bone = driving bone name
         meshes = list of meshes to create the shapekey/driver on
@@ -289,16 +289,16 @@ def create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, e
     """
     pb = obj.pose.bones
     bpy.ops.object.mode_set(mode='OBJECT')
-    
+
     for mesh_name in meshes:
         mesh_obj = bpy.data.objects[mesh_name]
-        
+
         # Add/get the shape key
         shape = addget_shape_key(mesh_obj, name=shape_name)
-        
+
         # Add/get the shape key driver
         fcurve, a = addget_shape_key_driver(mesh_obj, name=shape_name)
-    
+
         # Set up the driver
         driver = fcurve.driver
         driver.type = 'SCRIPTED'
@@ -316,5 +316,5 @@ def create_shape_and_driver(obj, bone, meshes, shape_name, var_name, var_path, e
         var.targets[0].id_type = 'OBJECT'
         var.targets[0].id = obj
         var.targets[0].data_path = 'pose.bones["' + bone + '"]' + var_path
-        
-    
+
+
index f33b51e969060f68fdc2ac61a1f4a1ace4ba6d02..56305b5e07ed42c11557caee038b980c4dfa39ea 100644 (file)
@@ -41,7 +41,7 @@ def metarig_template():
     #bone.tail[:] = 0.0000, -0.0306, -0.0159
     #bone.roll = 0.0000
     #bone.connected = False
-    
+
     #bpy.ops.object.mode_set(mode='OBJECT')
     #pbone = obj.pose.bones['tail.01']
     #pbone['type'] = 'tail_spline_ik'
@@ -72,13 +72,13 @@ def main(obj, bone_definitions, base_names, options):
     bb = obj.data.bones
     eb = obj.data.edit_bones
     pb = obj.pose.bones
-    
+
     # Create bones for hinge/free
     # hinge 1 sticks with the parent
     # hinge 2 is the parent of the tail controls
     hinge1 = copy_bone_simple(arm, bone_definitions[0], "MCH-%s.hinge1" % base_names[bone_definitions[0]], parent=True).name
     hinge2 = copy_bone_simple(arm, bone_definitions[0], "MCH-%s.hinge2" % base_names[bone_definitions[0]], parent=False).name
-    
+
     # Create tail control bones
     bones = []
     i = 0
@@ -90,10 +90,10 @@ def main(obj, bone_definitions, base_names, options):
             eb[bone].local_location = False
         i = 1
         bones += [bone]
-    
-    
+
+
     bpy.ops.object.mode_set(mode='OBJECT')
-    
+
     # Rotation mode and axis locks
     for bone, org_bone in zip(bones, bone_definitions):
         pb[bone].rotation_mode = pb[org_bone].rotation_mode
@@ -102,7 +102,7 @@ def main(obj, bone_definitions, base_names, options):
         pb[bone].lock_rotation = tuple(pb[org_bone].lock_rotation)
         pb[bone].lock_rotation_w = pb[org_bone].lock_rotation_w
         pb[bone].lock_scale = tuple(pb[org_bone].lock_scale)
-    
+
     # Add custom properties
     pb[bones[0]]["hinge"] = 0.0
     prop = rna_idprop_ui_prop_get(pb[bones[0]], "hinge", create=True)
@@ -110,31 +110,31 @@ def main(obj, bone_definitions, base_names, options):
     prop["max"] = 1.0
     prop["soft_min"] = 0.0
     prop["soft_max"] = 1.0
-    
+
     pb[bones[0]]["free"] = 0.0
     prop = rna_idprop_ui_prop_get(pb[bones[0]], "free", create=True)
     prop["min"] = 0.0
     prop["max"] = 1.0
     prop["soft_min"] = 0.0
     prop["soft_max"] = 1.0
-    
+
     # Add constraints
     for bone, org_bone in zip(bones, bone_definitions):
         con = pb[org_bone].constraints.new('COPY_TRANSFORMS')
         con.target = obj
         con.subtarget = bone
-    
+
     con_f = pb[hinge2].constraints.new('COPY_LOCATION')
     con_f.target = obj
     con_f.subtarget = hinge1
-    
+
     con_h = pb[hinge2].constraints.new('COPY_TRANSFORMS')
     con_h.target = obj
     con_h.subtarget = hinge1
-    
+
     # Add drivers
     bone_path = pb[bones[0]].path_to_id()
-    
+
     driver_fcurve = con_f.driver_add("influence", 0)
     driver = driver_fcurve.driver
     driver.type = 'AVERAGE'
@@ -147,7 +147,7 @@ def main(obj, bone_definitions, base_names, options):
     mod.poly_order = 1
     mod.coefficients[0] = 1.0
     mod.coefficients[1] = -1.0
-    
+
     driver_fcurve = con_h.driver_add("influence", 0)
     driver = driver_fcurve.driver
     driver.type = 'AVERAGE'
@@ -160,7 +160,7 @@ def main(obj, bone_definitions, base_names, options):
     mod.poly_order = 1
     mod.coefficients[0] = 1.0
     mod.coefficients[1] = -1.0
-    
-    
+
+
     return None
-    
+
index 4ebf1ff028c4e75d2ff31d6ae8560ba7ab2759a9..4dae80cd9d69f1bfaea85a05d3a941309edf32dc 100644 (file)
@@ -165,10 +165,10 @@ def register():
     bpy.types.register(AddTorus)
     bpy.types.INFO_MT_mesh_add.append(menu_func)
 
+
 def unregister():
     bpy.types.unregister(AddTorus)
     bpy.types.INFO_MT_mesh_add.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index 5382781e8825a454b74b8c2f5137bb9c6514912a..587e9f619bc4ef47fdaf1628caa5669550ecb394 100644 (file)
@@ -166,7 +166,7 @@ def autocomplete(context):
 
     # Separate automplete output by command prompts
     if scrollback != '':
-        bpy.ops.console.scrollback_append(text=sc.prompt + current_line.line, type='INPUT')  
+        bpy.ops.console.scrollback_append(text=sc.prompt + current_line.line, type='INPUT')
 
     # Now we need to copy back the line from blender back into the
     # text editor. This will change when we dont use the text editor
@@ -201,12 +201,14 @@ def banner(context):
 
     return {'FINISHED'}
 
+
 def register():
     pass
 
+
 def unregister():
     pass
 
+
 if __name__ == "__main__":
     register()
-
index 22067ce749e159aac1da5f914aebe67db3c3f909..e269cc0bb2ffd179bcb048a1ede9128744aa3cf2 100644 (file)
@@ -81,9 +81,9 @@ def banner(context):
 def register():
     pass
 
+
 def unregister():
     pass
 
 if __name__ == "__main__":
     register()
-
index 47473be01218cae1a69d3f1a1f858eb1306ed0ee..1c9e9a7331243d76a828f22ca2aa86213d468681 100644 (file)
@@ -5,19 +5,19 @@ from Mathutils import *
 def main(context):
     def cleanupEulCurve(fcv):
         keys = []
-    
+
         for k in fcv.keyframe_points:
-            keys.append([k.handle1.copy(), k.co.copy(), k.handle2.copy()])   
+            keys.append([k.handle1.copy(), k.co.copy(), k.handle2.copy()])
         print(keys)
-    
+
         for i in range(len(keys)):
             cur = keys[i]
             prev = keys[i-1] if i > 0 else None
             next = keys[i+1] if i < len(keys)-1 else None
-    
+
             if prev == None:
                 continue
-            
+
             th = pi
             if abs(prev[1][1] - cur[1][1]) >= th: # more than 180 degree jump
                 fac = pi*2
@@ -31,13 +31,13 @@ def main(context):
                         cur[0][1] -= fac
                         cur[1][1] -= fac
                         cur[2][1] -= fac
-    
+
         for i in range(len(keys)):
             for x in range(2):
                fcv.keyframe_points[i].handle1[x] = keys[i][0][x]
                fcv.keyframe_points[i].co[x] = keys[i][1][x]
                fcv.keyframe_points[i].handle2[x] = keys[i][2][x]
-      
+
     flist = bpy.context.active_object.animation_data.action.fcurves
     for f in flist:
         if f.selected and f.data_path.endswith("rotation_euler"):
index 0db0590312afe1d5720731dcb8f0bb379ce38066..3c0b21346342c9212844556d5027a4eaeb5ae3ab 100644 (file)
@@ -45,9 +45,9 @@ class SaveDirty(bpy.types.Operator):
 def register():
     bpy.types.register(SaveDirty)
 
+
 def unregister():
     bpy.types.unregister(SaveDirty)
 
 if __name__ == "__main__":
     register()
-
index bda87261c3eb3a32847a67569619e3c5e6f2fed1..5eda8187f002b00931da5b076cbfe01c6ed82f6f 100644 (file)
@@ -185,6 +185,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -192,4 +193,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 1c0f6d3d9c5edbcf3a404262e692b9db16c5a687..24195b9d15238edfbc65d8d4ebcaa8eaeeeebcda 100644 (file)
@@ -336,7 +336,7 @@ class ShapeTransfer(bpy.types.Operator):
                 self.report({'ERROR'}, "Expected one other selected mesh object to copy from")
                 return {'CANCELLED'}
             ob_act, objects = objects[0], [ob_act]
-            
+
         if ob_act.type != 'MESH':
             self.report({'ERROR'}, "Other object is not a mesh.")
             return {'CANCELLED'}
@@ -344,7 +344,7 @@ class ShapeTransfer(bpy.types.Operator):
         if ob_act.active_shape_key is None:
             self.report({'ERROR'}, "Other object has no shape key")
             return {'CANCELLED'}
-        return self._main(ob_act, objects, self.properties.mode, self.properties.use_clamp)        
+        return self._main(ob_act, objects, self.properties.mode, self.properties.use_clamp)
 
 class JoinUVs(bpy.types.Operator):
     '''Copy UV Layout to objects with matching geometry'''
@@ -424,7 +424,7 @@ class MakeDupliFace(bpy.types.Operator):
             # scale = matrix.median_scale
             trans = matrix.translation_part()
             rot = matrix.rotation_part() # also contains scale
-            
+
             return [(rot * b) + trans for b in base_tri]
         scene = bpy.context.scene
         linked = {}
@@ -444,20 +444,20 @@ class MakeDupliFace(bpy.types.Operator):
             mesh.faces.foreach_set("verts_raw", faces)
             mesh.update() # generates edge data
 
-            # pick an object to use 
+            # pick an object to use
             obj = objects[0]
 
             ob_new = bpy.data.objects.new(mesh.name, mesh)
             base = scene.objects.link(ob_new)
             base.layers[:] = obj.layers
-            
+
             ob_inst = bpy.data.objects.new(data.name, data)
             base = scene.objects.link(ob_inst)
             base.layers[:] = obj.layers
-            
+
             for obj in objects:
                 scene.objects.unlink(obj)
-            
+
             ob_new.dupli_type = 'FACES'
             ob_inst.parent = ob_new
             ob_new.use_dupli_faces_scale = True
index 6b9723be5e6c2312593c125fd77e181a72cfc00d..5abef11b9803c15a4fd8c530bb8e9243e2aa805f 100644 (file)
@@ -28,42 +28,42 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
 
     Left_Up_Front_SEL = [[],[],[]]
     Right_Down_Back_SEL = [[],[],[]]
-    
+
     flag_first = True
-    
+
     for obj in bpy.context.selected_objects:
         if obj.type == 'MESH':
-            
+
             bb_world = [obj.matrix * Vector(v[:]) for v in obj.bound_box]
-            
+
             Left_Up_Front = bb_world[1]
             Right_Down_Back = bb_world[7]
-    
+
             # Active Center
-    
+
             if obj == bpy.context.active_object:
-                
+
                 center_active_x = ( Left_Up_Front[0] + Right_Down_Back[0] ) / 2
                 center_active_y = ( Left_Up_Front[1] + Right_Down_Back[1] ) / 2
                 center_active_z = ( Left_Up_Front[2] + Right_Down_Back[2] ) / 2
-    
+
                 size_active_x = ( Right_Down_Back[0] -  Left_Up_Front[0] ) / 2
                 size_active_y = ( Right_Down_Back[1] - Left_Up_Front[1] ) / 2
                 size_active_z = ( Left_Up_Front[2] - Right_Down_Back[2] ) / 2
-    
+
             # Selection Center
-    
+
             if flag_first:
                 flag_first = False
-        
+
                 Left_Up_Front_SEL[0] = Left_Up_Front[0]
                 Left_Up_Front_SEL[1] = Left_Up_Front[1]
                 Left_Up_Front_SEL[2] = Left_Up_Front[2]
-        
+
                 Right_Down_Back_SEL[0] = Right_Down_Back[0]
                 Right_Down_Back_SEL[1] = Right_Down_Back[1]
                 Right_Down_Back_SEL[2] = Right_Down_Back[2]
-        
+
             else:
                 # X axis
                 if Left_Up_Front[0] < Left_Up_Front_SEL[0]:
@@ -74,7 +74,7 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
                 # Z axis
                 if Left_Up_Front[2] > Left_Up_Front_SEL[2]:
                     Left_Up_Front_SEL[2] = Left_Up_Front[2]
-        
+
                 # X axis
                 if Right_Down_Back[0] > Right_Down_Back_SEL[0]:
                     Right_Down_Back_SEL[0] = Right_Down_Back[0]
@@ -84,7 +84,7 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
                 # Z axis
                 if Right_Down_Back[2] < Right_Down_Back_SEL[2]:
                     Right_Down_Back_SEL[2] = Right_Down_Back[2]
-    
+
     center_sel_x = ( Left_Up_Front_SEL[0] + Right_Down_Back_SEL[0] ) / 2
     center_sel_y = ( Left_Up_Front_SEL[1] + Right_Down_Back_SEL[1] ) / 2
     center_sel_z = ( Left_Up_Front_SEL[2] + Right_Down_Back_SEL[2] ) / 2
@@ -93,143 +93,144 @@ def align_objects(align_x, align_y, align_z, align_mode, relative_to):
 
     for obj in bpy.context.selected_objects:
         if obj.type == 'MESH':
-        
+
             loc_world = obj.location
             bb_world = [obj.matrix * Vector(v[:]) for v in obj.bound_box]
-        
+
             Left_Up_Front = bb_world[1]
             Right_Down_Back = bb_world[7]
-        
+
             center_x = ( Left_Up_Front[0] + Right_Down_Back[0] ) / 2
             center_y = ( Left_Up_Front[1] + Right_Down_Back[1] ) / 2
             center_z = ( Left_Up_Front[2] + Right_Down_Back[2] ) / 2
-            
+
             positive_x = Right_Down_Back[0]
             positive_y = Right_Down_Back[1]
             positive_z = Left_Up_Front[2]
-            
+
             negative_x = Left_Up_Front[0]
             negative_y = Left_Up_Front[1]
             negative_z = Right_Down_Back[2]
-    
+
             obj_loc = obj.location
-        
+
             if align_x:
-    
+
                 # Align Mode
-    
+
                 if relative_to == 'OPT_4': # Active relative
                     if align_mode == 'OPT_1':
                         obj_x = obj_loc[0] - negative_x - size_active_x
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_x = obj_loc[0] - positive_x + size_active_x
-                
+
                 else: # Everything else relative
                     if align_mode == 'OPT_1':
                         obj_x = obj_loc[0] - negative_x
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_x = obj_loc[0] - positive_x
-    
+
                 if align_mode == 'OPT_2': # All relative
                     obj_x = obj_loc[0] - center_x
-    
+
                 # Relative To
-    
+
                 if relative_to == 'OPT_1':
                     loc_x = obj_x
-                
+
                 elif relative_to == 'OPT_2':
                     loc_x = obj_x + cursor[0]
-                
+
                 elif relative_to == 'OPT_3':
                     loc_x = obj_x + center_sel_x
-    
+
                 elif relative_to == 'OPT_4':
                     loc_x = obj_x + center_active_x
-                
+
                 obj.location[0] = loc_x
-    
-    
+
+
             if align_y:
-    
+
                 # Align Mode
-    
+
                 if relative_to == 'OPT_4': # Active relative
                     if align_mode == 'OPT_1':
                         obj_y = obj_loc[1] - negative_y - size_active_y
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_y = obj_loc[1] - positive_y + size_active_y
-                
+
                 else: # Everything else relative
                     if align_mode == 'OPT_1':
                         obj_y = obj_loc[1] - negative_y
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_y = obj_loc[1] - positive_y
-    
+
                 if align_mode == 'OPT_2': # All relative
                     obj_y = obj_loc[1] - center_y
-    
+
                 # Relative To
-    
+
                 if relative_to == 'OPT_1':
                     loc_y = obj_y
-                
+
                 elif relative_to == 'OPT_2':
                     loc_y = obj_y + cursor[1]
-                
+
                 elif relative_to == 'OPT_3':
                     loc_y = obj_y + center_sel_y
-    
+
                 elif relative_to == 'OPT_4':
                     loc_y = obj_y + center_active_y
-                
+
                 obj.location[1] = loc_y
-    
-    
+
+
             if align_z:
-    
+
                 # Align Mode
-    
+
                 if relative_to == 'OPT_4': # Active relative
                     if align_mode == 'OPT_1':
                         obj_z = obj_loc[2] - negative_z - size_active_z
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_z = obj_loc[2] - positive_z + size_active_z
-                
+
                 else: # Everything else relative
                     if align_mode == 'OPT_1':
                         obj_z = obj_loc[2] - negative_z
-                    
+
                     elif align_mode == 'OPT_3':
                         obj_z = obj_loc[2] - positive_z
-    
+
                 if align_mode == 'OPT_2': # All relative
                     obj_z = obj_loc[2] - center_z
-    
+
                 # Relative To
-    
+
                 if relative_to == 'OPT_1':
                     loc_z = obj_z
-                
+
                 elif relative_to == 'OPT_2':
                     loc_z = obj_z + cursor[2]
-                
+
                 elif relative_to == 'OPT_3':
                     loc_z = obj_z + center_sel_z
-    
+
                 elif relative_to == 'OPT_4':
                     loc_z = obj_z + center_active_z
-                
+
                 obj.location[2] = loc_z
 
 
 from bpy.props import *
 
+
 class AlignObjects(bpy.types.Operator):
     '''Align Objects'''
     bl_idname = "object.align"
@@ -269,7 +270,7 @@ class AlignObjects(bpy.types.Operator):
         return context.mode == 'OBJECT'
 
     def execute(self, context):
-    
+
         align_mode = self.properties.align_mode
         relative_to = self.properties.relative_to
         align_x = self.properties.align_x
@@ -291,6 +292,7 @@ def register():
     bpy.types.register(AlignObjects)
     bpy.types.VIEW3D_MT_transform.append(menu_func)
 
+
 def unregister():
     bpy.types.unregister(AlignObjects)
     bpy.types.VIEW3D_MT_transform.remove(menu_func)
index a79941fc26c7eb3fd425f6ff1dcbf3a12c4453f1..71961404a6978d1fcc20d8ef9b2dd068d6430b2d 100644 (file)
@@ -144,10 +144,10 @@ def register():
     bpy.types.register(RandomizeLocRotSize)
     bpy.types.VIEW3D_MT_transform.append(menu_func)
 
+
 def unregister():
     bpy.types.unregister(RandomizeLocRotSize)
     bpy.types.VIEW3D_MT_transform.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index d201f553ec2ea7f28ed96b8eafe13c4d8e6e6d21..438660ecc19d509686311f82823fd012eef777e9 100644 (file)
@@ -170,6 +170,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -177,4 +178,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 1f9b84bd8cf0472e52ea8dbbd93daf7aeabbbfd8..63211eb26f394d7f7228b05889f4d1d641ffbe5f 100644 (file)
@@ -112,12 +112,13 @@ class PlayRenderedAnim(bpy.types.Operator):
             pass
             #raise OSError("Couldn't find an external animation player.")
 
-        return('FINISHED',)
+        return {'FINISHED'}
 
 
 def register():
     bpy.types.register(PlayRenderedAnim)
 
+
 def unregister():
     bpy.types.unregister(PlayRenderedAnim)
 
index f2a7495bbaae05c8f21d827d86446f92fb065ed6..35a20a002a89c103868d102c1b6b668917c2bcfa 100644 (file)
@@ -39,7 +39,7 @@ class ExportUVLayout(bpy.types.Operator):
                 name="Format",
                 description="File format to export the UV layout to",
                 default='SVG')
-    
+
     def poll(self, context):
         obj = context.active_object
         return (obj and obj.type == 'MESH')
@@ -71,18 +71,18 @@ class ExportUVLayout(bpy.types.Operator):
         mesh = obj.data
         uv_layer = mesh.active_uv_texture.data
         uv_layer_len = len(uv_layer)
-        
+
         if not self.properties.export_all:
-            
+
             local_image = Ellipsis
 
             if context.tool_settings.uv_local_view:
                 space_data = self._space_image(context)
                 if space_data:
                     local_image = space_data.image
-            
+
             faces = mesh.faces
-            
+
             for i in range(uv_layer_len):
                 uv_elem = uv_layer[i]
                 # context checks
@@ -90,16 +90,13 @@ class ExportUVLayout(bpy.types.Operator):
                     #~ uv = uv_elem.uv
                     #~ if False not in uv_elem.uv_selected[:len(uv)]:
                     #~     yield (i, uv)
-                    
+
                     # just write what we see.
                     yield (i, uv_layer[i].uv)
         else:
             # all, simple
             for i in range(uv_layer_len):
                 yield (i, uv_layer[i].uv)
-        
-        
-        
 
     def execute(self, context):
         # for making an XML compatible string
@@ -116,7 +113,7 @@ class ExportUVLayout(bpy.types.Operator):
         faces = mesh.faces
 
         mode = self.properties.mode
-        
+
         file = open(self.properties.path, "w")
         fw = file.write
 
@@ -129,13 +126,13 @@ class ExportUVLayout(bpy.types.Operator):
             fw('     xmlns="http://www.w3.org/2000/svg" version="1.1">\n')
             desc = "%s, %s, %s (Blender %s)" % (basename(bpy.data.filename), obj.name, mesh.name, bpy.app.version_string)
             fw('<desc>%s</desc>\n' % escape(desc))
-    
+
             # svg colors
             fill_settings = []
             fill_default = 'fill="grey"'
             for mat in mesh.materials if mesh.materials else [None]:
                 if mat:
-                    fill_settings.append('fill="rgb(%d, %d, %d)"' % tuple(int(c*255) for c in mat.diffuse_color))
+                    fill_settings.append('fill="rgb(%d, %d, %d)"' % tuple(int(c * 255) for c in mat.diffuse_color))
                 else:
                     fill_settings.append(fill_default)
 
@@ -144,10 +141,10 @@ class ExportUVLayout(bpy.types.Operator):
                     fill = fill_settings[faces[i].material_index]
                 except IndexError:
                     fill = fill_default
-    
+
                 fw('<polygon %s fill-opacity="0.5" stroke="black" stroke-width="1px" \n' % fill)
                 fw('  points="')
-                
+
                 for j, uv in enumerate(uvs):
                     x, y = uv[0], 1.0 - uv[1]
                     fw('%.3f,%.3f ' % (x * image_width, y * image_height))
@@ -172,15 +169,15 @@ class ExportUVLayout(bpy.types.Operator):
             fw('1 setlinejoin\n')
             fw('1 setlinecap\n')
             fw('newpath\n')
-            
+
             for i, uvs in self._face_uv_iter(context):
                 for j, uv in enumerate(uvs):
                     x, y = uv[0], uv[1]
-                    if j==0:
+                    if j == 0:
                         fw('%.5f %.5f moveto\n' % (x * image_width, y * image_height))
                     else:
                         fw('%.5f %.5f lineto\n' % (x * image_width, y * image_height))
-            
+
             fw('closepath\n')
             fw('stroke\n')
             fw('showpage\n')
@@ -206,10 +203,10 @@ def register():
     bpy.types.register(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.append(menu_func)
 
+
 def unreguster():
     bpy.types.unregister(ExportUVLayout)
     bpy.types.IMAGE_MT_uvs.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index be9042e7e324834ea16684de886fccd077f9ce72..7fe0d1e5d601fe50ceca9fc73a794e07a9bb547c 100644 (file)
@@ -1143,11 +1143,11 @@ menu_func = (lambda self, context: self.layout.operator(SmartProject.bl_idname,
 def register():
     bpy.types.register(SmartProject)
     bpy.types.VIEW3D_MT_uv_map.append(menu_func)
-    
+
+
 def unregister():
     bpy.types.unregister(SmartProject)
     bpy.types.VIEW3D_MT_uv_map.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index fa84da73fafd445b4169960f7758ef1bc573fb0b..42987dbc4bee54d1e65e53d482dcb68c2d189d4a 100644 (file)
@@ -178,9 +178,9 @@ class VertexPaintDirt(bpy.types.Operator):
 def register():
     bpy.types.register(VertexPaintDirt)
 
+
 def unregister():
     bpy.types.unregister(VertexPaintDirt)
 
 if __name__ == "__main__":
     register()
-
index 33e691f7674992eda2ce5a29dd4d02a0350b2ffc..f033efc6b690a4557e8406a0fff8db2824fd8d50 100644 (file)
@@ -297,12 +297,11 @@ doc_new = StringProperty(name="Edit Description",
         description="", maxlen=1024, default="")
 
 
-
 class WM_OT_context_modal_mouse(bpy.types.Operator):
     '''Adjust arbitrary values with mouse input'''
     bl_idname = "wm.context_modal_mouse"
     bl_label = "Context Modal Mouse"
-    
+
     path_iter = StringProperty(description="The path relative to the context, must point to an iterable.")
     path_item = StringProperty(description="The path from each iterable to the value (int or float)")
     input_scale = FloatProperty(default=0.01, description="Scale the mouse movement by this value before applying the delta")
@@ -323,7 +322,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
                 value_orig = eval("item." + path_item)
             except:
                 continue
-            
+
             # check this can be set, maybe this is library data.
             try:
                 exec("item.%s = %s" % (path_item, value_orig))
@@ -332,11 +331,10 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
 
             values[item] = value_orig
 
-
     def _values_delta(self, delta):
         delta *= self.properties.input_scale
         if self.properties.invert:
-            delta = -delta
+            delta = - delta
 
         path_item = self.properties.path_item
         for item, value_orig in self._values.items():
@@ -348,7 +346,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
             exec("item.%s = %s" % (path_item, value_orig))
 
         self._values.clear()
-        
+
     def _values_clear(self):
         self._values.clear()
 
@@ -366,7 +364,7 @@ class WM_OT_context_modal_mouse(bpy.types.Operator):
         elif event_type in ('RIGHTMOUSE', 'ESCAPE'):
             self._values_restore()
             return {'FINISHED'}
-            
+
         return {'RUNNING_MODAL'}
 
     def invoke(self, context, event):
@@ -530,11 +528,13 @@ classes = [
     rna_prop_ui.WM_OT_properties_add,
     rna_prop_ui.WM_OT_properties_remove]
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -542,4 +542,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index ff3863ff59abe5953f5e8a1a5ac76a7377bd97a9..ee2e134dbdec1302a55c21157e379a468dd71fec 100644 (file)
@@ -4,7 +4,7 @@ class ModalOperator(bpy.types.Operator):
     '''Move an object with the mouse, example.'''
     bl_idname = "object.modal_operator"
     bl_label = "Simple Modal Operator"
-    
+
     first_mouse_x = IntProperty()
     first_value = FloatProperty()
 
@@ -19,7 +19,7 @@ class ModalOperator(bpy.types.Operator):
         elif event.type in ('RIGHTMOUSE', 'ESCAPE'):
             context.object.location.x = self.properties.first_value
             return {'CANCELLED'}
-            
+
         return {'RUNNING_MODAL'}
 
     def invoke(self, context, event):
@@ -36,4 +36,4 @@ class ModalOperator(bpy.types.Operator):
 bpy.types.register(ModalOperator)
 
 if __name__ == "__main__":
-    bpy.ops.object.modal_operator()
\ No newline at end of file
+    bpy.ops.object.modal_operator()
index 547e13a6a80607aa400b427d5fb613d65e78eeb8..7d25694c92ae9de2d46d8cf46f4909c0e1eca0e5 100644 (file)
@@ -164,11 +164,13 @@ classes = [
 # OBJECT_PT_onion_skinning
 # DATA_PT_onion_skinning
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -176,4 +178,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index e92f2cb9f713a525d38b161a146a485807357ff9..4183ba07a6c1962c61fe7946227085be71e5d697 100644 (file)
@@ -263,11 +263,13 @@ classes = [
 
     DATA_PT_custom_props_arm]
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -275,4 +277,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 30b4ec5ca307f2c5edcecf13faba61c98ad7daf5..c6a5d846b4c48568ff68ea7df88b121f8a86c368 100644 (file)
@@ -351,6 +351,7 @@ classes = [
 menu_func = (lambda self, context: self.layout.menu("INFO_MT_armature_metarig_add", icon='OUTLINER_OB_ARMATURE'))
 import space_info # ensure the menu is loaded first
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
@@ -358,13 +359,13 @@ def register():
 
     space_info.INFO_MT_armature_add.append(menu_func)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
         unregister(cls)
+
     bpy.types.INFO_MT_armature_add.remove(menu_func)
 
 if __name__ == "__main__":
     register()
-
index d8d5bf3bea019e209f899e563b5d787af38a50d5..a6bac3e6aaa11a2304b612f67adc1565b197de39 100644 (file)
@@ -398,11 +398,13 @@ classes = [
 
     BONE_PT_custom_props]
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -410,4 +412,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 3befc565adb27af3ccf079e1d928a28a35d2c1e6..be0a4f84145fb172cfb34083a7da65f8b254ad64 100644 (file)
@@ -163,6 +163,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -170,4 +171,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 8877e9ab121fd18bc127da352346c9932742b1d7..9848e4236652a2290d88b8f9f6d9bce7f4649039 100644 (file)
@@ -401,6 +401,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -408,4 +409,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 30d9a278d3536a16ebe7ac70aa35d0b81872876d..a0999fb9d4ab352166d2406f3174805522ca84ed 100644 (file)
@@ -51,11 +51,13 @@ class DATA_PT_empty(DataButtonsPanel):
 classes = [
     DATA_PT_empty]
 
+
 def register():
     register = bpy.types.register
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -63,4 +65,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 1f08aca638e1f2442ce41c49ab0cffd0f311bc5b..9a99959a6103f124cff0be596cccad74e10c8f32 100644 (file)
@@ -411,6 +411,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -418,4 +419,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index c8676b654b02b6f58a99a37d0292f39d46792d7f..0c1f9d8001c033172e43f897b7e9bef02ddea8e5 100644 (file)
@@ -108,6 +108,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -115,4 +116,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index c3fbc369c1df1bb4c349d9dd1ddfba81ac4cca0b..d48d2ec80469c7e4a992b75e1cf5b14738e0da56 100644 (file)
@@ -28,7 +28,7 @@ class MESH_MT_vertex_group_specials(bpy.types.Menu):
 
     def draw(self, context):
         layout = self.layout
-        
+
         layout.operator("object.vertex_group_sort", icon='SORTALPHA')
         layout.operator("object.vertex_group_copy", icon='COPY_ID')
         layout.operator("object.vertex_group_copy_to_linked", icon='LINK_AREA')
@@ -227,7 +227,7 @@ class DATA_PT_shape_keys(DataButtonsPanel):
             subsub.prop(ob, "shape_key_lock", text="")
             subsub.prop(kb, "mute", text="")
             sub.prop(ob, "shape_key_edit_mode", text="")
-            
+
             sub = row.row()
             sub.operator("object.shape_key_clear", icon='X', text="")
 
@@ -325,6 +325,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -332,4 +333,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 984ab89c0620f55fba7a06723fd64683433aee7a..b751a9f9059238814873580cbe0824692872c00f 100644 (file)
@@ -149,6 +149,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -156,4 +157,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index fb8489d7df583d450cefe5b0217071d12d840455..8364d070d1a7cbd598f29c73e86bc33f8424cd68 100644 (file)
@@ -739,6 +739,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -746,4 +747,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 557d09a97aec3e063597624841f18088cf088856..5697911bf1f847bdc3b7211d9690d823aaf8310f 100644 (file)
@@ -533,6 +533,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -540,4 +541,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index f105e0b07185e31dbf023123f062adf22527c052..4c44e79d884a46c79f3296412ecae3eef1899a40 100644 (file)
@@ -336,6 +336,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel):
         sub.prop(mat, "shadow_ray_bias", text="Ray Bias")
         col.prop(mat, "cast_approximate")
 
+
 class MATERIAL_PT_diffuse(MaterialButtonsPanel):
     bl_label = "Diffuse"
     COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'}
@@ -947,6 +948,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -954,4 +956,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 4bf691106a0ca44c0de6df1ca88ede5d60aebe9c..d42d4474306827e24e41f532240612b54da7a20f 100644 (file)
@@ -323,6 +323,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -330,4 +331,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index d6ab13a38602ad75d3c621d162dd1331c4083a06..6f6fcfc16414a3133a9d650f234b8e7d91f08c62 100644 (file)
@@ -466,7 +466,6 @@ class ConstraintButtonsPanel(bpy.types.Panel):
 
         self.space_template(layout, con, wide_ui)
 
-
     #def SCRIPT(self, context, layout, con):
 
     def ACTION(self, context, layout, con, wide_ui):
@@ -765,6 +764,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -772,4 +772,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 88bda7c6dd86ea66805bda672098927d9990135e..58655ad6ff8a117ec633d6c4f218eae804afc3d3 100644 (file)
@@ -1023,6 +1023,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -1030,4 +1031,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index b7743fbdce56809776e67462a3ad9548a3de1ed5..d1ff53897a401aeee43553ea5888dc48a5ac4276 100644 (file)
@@ -244,6 +244,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -251,4 +252,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 7964861c46ed1ca1ecd2454f5af5b2e781c3d008..b81fa25b1a13fcabf510c58d7ab02dc4735a18d5 100644 (file)
@@ -215,9 +215,9 @@ def basic_force_field_falloff_ui(self, context, field):
 def register():
     pass
 
+
 def unregister():
     pass
 
 if __name__ == "__main__":
     register()
-
index 964c73bff1595b1800791a3f4da1e4b8f7061ad8..db85315c5de9a2cf70a4f1a37427e645b0b8dd29 100644 (file)
@@ -253,6 +253,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -260,4 +261,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 856a14ee071779e5a3c0810df0bc8ab58b17881d..7434d2173e35c469f89192a53057bd7cb2bce6cc 100644 (file)
@@ -304,6 +304,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -311,4 +312,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 7f9a03fe6a6f272b3c4ff9c6cecd910faa140077..290d3b13d20931e2d3084cc0319489f9495c88af 100644 (file)
@@ -253,6 +253,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -260,4 +261,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 4d774bf5e250e330d04d81bfeb2d8109663edc65..cb75301c7af3ac288e45bd55c6a1c1c943570f23 100644 (file)
@@ -296,6 +296,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -303,4 +304,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 75123311c41495c32248d5ca676271e0c6cbdd6f..627a7c3e2e824495cbc756021b26d21f98c5212a 100644 (file)
@@ -222,7 +222,7 @@ class RENDER_PT_performance(RenderButtonsPanel):
             col = split.column()
         col.label(text="Memory:")
         sub = col.column()
-        sub.enabled = not (rd.use_border or rd.full_sample) 
+        sub.enabled = not (rd.use_border or rd.full_sample)
         sub.prop(rd, "save_buffers")
         sub = col.column()
         sub.active = rd.use_compositing
@@ -419,7 +419,7 @@ class RENDER_PT_encoding(RenderButtonsPanel):
         sub = layout.column()
 
         if rd.ffmpeg_format not in ('MP3'):
-          sub.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
+            sub.prop(rd, "ffmpeg_audio_codec", text="Audio Codec")
 
         sub.separator()
 
@@ -454,7 +454,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
 
         col = split.column()
         col.row().prop(rd, "antialiasing_samples", expand=True)
-        sub = col.row() 
+        sub = col.row()
         sub.enabled = not rd.use_border
         sub.prop(rd, "full_sample")
 
@@ -462,7 +462,7 @@ class RENDER_PT_antialiasing(RenderButtonsPanel):
             col = split.column()
         col.prop(rd, "pixel_filter", text="")
         col.prop(rd, "filter_size", text="Size")
-        
+
 
 class RENDER_PT_motion_blur(RenderButtonsPanel):
     bl_label = "Full Sample Motion Blur"
@@ -483,6 +483,7 @@ class RENDER_PT_motion_blur(RenderButtonsPanel):
         row = layout.row()
         row.prop(rd, "motion_blur_samples")
 
+
 class RENDER_PT_dimensions(RenderButtonsPanel):
     bl_label = "Dimensions"
     COMPAT_ENGINES = {'BLENDER_RENDER'}
@@ -645,6 +646,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -652,4 +654,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 511130222eb4a1099109beeefc30b821460c0dd7..7c342053a40c6d4c616a041f68eff7a98e4f86bf 100644 (file)
@@ -102,7 +102,7 @@ class SCENE_PT_keying_sets(SceneButtonsPanel):
             col = row.column()
             col.prop(ks, "name")
             col.prop(ks, "absolute")
-            
+
             subcol = col.column()
             subcol.operator_context = 'INVOKE_DEFAULT'
             op = subcol.operator("anim.keying_set_export", text="Export to File")
@@ -208,7 +208,7 @@ class SCENE_PT_simplify(SceneButtonsPanel):
         col = split.column()
         col.prop(rd, "simplify_subdivision", text="Subdivision")
         col.prop(rd, "simplify_child_particles", text="Child Particles")
-        
+
         col.prop(rd, "simplify_triangulate")
 
         if wide_ui:
@@ -242,83 +242,83 @@ class ANIM_OT_keying_set_export(bpy.types.Operator):
 
         scene = context.scene
         ks = scene.active_keying_set
-        
-        
+
+
         f.write("# Keying Set: %s\n" % ks.name)
-        
+
         f.write("import bpy\n\n")
         f.write("scene= bpy.data.scenes[0]\n\n")
 
-        # Add KeyingSet and set general settings 
+        # Add KeyingSet and set general settings
         f.write("# Keying Set Level declarations\n")
         f.write("ks= scene.add_keying_set(name=\"%s\")\n" % ks.name)
-        
+
         if ks.absolute is False:
             f.write("ks.absolute = False\n")
         f.write("\n")
-        
+
         f.write("ks.insertkey_needed = %s\n" % ks.insertkey_needed)
         f.write("ks.insertkey_visual = %s\n" % ks.insertkey_visual)
         f.write("ks.insertkey_xyz_to_rgb = %s\n" % ks.insertkey_xyz_to_rgb)
         f.write("\n")
-        
-        
+
+
         # generate and write set of lookups for id's used in paths
         id_to_paths_cache = {} # cache for syncing ID-blocks to bpy paths + shorthands
-        
+
         for ksp in ks.paths:
             if ksp.id is None:
-                continue;
+                continue
             if ksp.id in id_to_paths_cache:
-                continue;
-                
+                continue
+
             # - idtype_list is used to get the list of id-datablocks from bpy.data.*
             #   since this info isn't available elsewhere
-            # - id.bl_rna.name gives a name suitable for UI, 
+            # - id.bl_rna.name gives a name suitable for UI,
             #   with a capitalised first letter, but we need
             #   the plural form that's all lower case
             idtype_list = ksp.id.bl_rna.name.lower() + "s"
             id_bpy_path = "bpy.data.%s[\"%s\"]" % (idtype_list, ksp.id.name)
-            
+
             # shorthand ID for the ID-block (as used in the script)
             short_id = "id_%d" % len(id_to_paths_cache)
-            
+
             # store this in the cache now
             id_to_paths_cache[ksp.id] = [short_id, id_bpy_path]
-            
+
         f.write("# ID's that are commonly used\n")
         for id_pair in id_to_paths_cache.values():
             f.write("%s = %s\n" % (id_pair[0], id_pair[1]))
         f.write("\n")
-        
-        
+
+
         # write paths
-        f.write("# Path Definitions\n") 
+        f.write("# Path Definitions\n")
         for ksp in ks.paths:
             f.write("ksp = ks.add_destination(")
-            
+
             # id-block + RNA-path
             if ksp.id:
                 # find the relevant shorthand from the cache
                 id_bpy_path = id_to_paths_cache[ksp.id][0]
             else:
-                id_bpy_path = "None" # XXX... 
+                id_bpy_path = "None" # XXX...
             f.write("%s, '%s'" % (id_bpy_path, ksp.data_path))
-            
+
             # array index settings (if applicable)
             if ksp.entire_array is False:
                 f.write(", entire_array=False, array_index=%d" % ksp.array_index)
-            
+
             # grouping settings (if applicable)
             # NOTE: the current default is KEYINGSET, but if this changes, change this code too
             if ksp.grouping == 'NAMED':
                 f.write(", grouping_method='%s', group_name=\"%s\"" % (ksp.grouping, ksp.group))
             elif ksp.grouping != 'KEYINGSET':
                 f.write(", grouping_method='%s'" % ksp.grouping)
-            
+
             # finish off
             f.write(")\n")
-        
+
         f.write("\n")
         f.close()
 
@@ -337,7 +337,7 @@ classes = [
     SCENE_PT_keying_set_paths,
     SCENE_PT_physics,
     SCENE_PT_simplify,
-    
+
     SCENE_PT_custom_props,
 
     ANIM_OT_keying_set_export]
@@ -348,6 +348,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -355,4 +356,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 0ad56b3aa82d2ea20fea2b895e0ed1e67b65404c..8794b19bd4d333b768732a5e37c001eaa333a0fd 100644 (file)
@@ -991,6 +991,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -998,4 +999,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 8c28678259c3ff8cffd03f8861a4ea6a4e3c05b1..ee529e53872525c4fb43b8f0720597d0b02d265b 100644 (file)
@@ -287,6 +287,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -294,4 +295,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index bada9f206493f9c3ccbc3de6c6a8913be8b13d76..019f751449f4d36928c3eb15f84e9d84c33ba09d 100644 (file)
@@ -62,6 +62,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -69,4 +70,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 2115177be18cdd0727f34f1ca364500a4177daca..37de6bacad2a3a8902aae021524b509bee79288b 100644 (file)
@@ -218,6 +218,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -225,4 +226,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 2409ec1a162814a885c4bbedb42c9e0d5d1d6456..1dc8ffd1af9fb1c971b0e03a0cf2d0b27c9a44e9 100644 (file)
@@ -205,6 +205,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -212,4 +213,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 893bbb92421d551c7893250baa027ae2872e109a..39bae6ca59beedaf6a1c58844ad1d90e114fbbaa 100644 (file)
@@ -74,6 +74,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -81,4 +82,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 138b118ea697dd24cee077a58bf9cdc8a28fc3f8..64f6337177e1c515ddbcc51ad2aa5d61c1b94230 100644 (file)
@@ -185,6 +185,7 @@ class GRAPH_MT_key(bpy.types.Menu):
         layout.operator("graph.copy")
         layout.operator("graph.paste")
 
+
 class GRAPH_MT_key_transform(bpy.types.Menu):
     bl_label = "Transform"
 
@@ -212,6 +213,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -219,4 +221,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index bb5cc01354f4930782ebffb5bc6dc312661a0cc2..b525601824959e973dafba0d4151e4d09f0f6e61 100644 (file)
@@ -520,6 +520,7 @@ class IMAGE_PT_paint(bpy.types.Panel):
                 col.prop(brush, "clone_image", text="Image")
                 col.prop(brush, "clone_alpha", text="Alpha")
 
+
 class IMAGE_PT_paint_stroke(bpy.types.Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
@@ -550,6 +551,7 @@ class IMAGE_PT_paint_stroke(bpy.types.Panel):
 
         layout.prop(brush, "use_wrap")
 
+
 class IMAGE_PT_paint_curve(bpy.types.Panel):
     bl_space_type = 'IMAGE_EDITOR'
     bl_region_type = 'UI'
@@ -596,6 +598,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -603,4 +606,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index f58c8d210fc85ee6d176209081ccf0fc42bca44b..f48c64aa7cd8a1466ca4824256b57bf55a781920 100644 (file)
@@ -423,6 +423,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -430,4 +431,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index a5187c151dbfc336ee2d50d2b87862abe65ca326..07b26fdc862aa3cd44150d30c6609f87a792ad76 100644 (file)
@@ -56,6 +56,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -63,4 +64,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 357122360552460abce3331717e3cecaae65d138..12ed8aa77407e4ae1abe1dcd39e4280d573af3f0 100644 (file)
@@ -173,6 +173,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -180,4 +181,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index e6b89b06fd5e07570e8786756e196b31b986d00c..ab02b6366056fd3c189963e485e31db1f08f4ec6 100644 (file)
@@ -152,6 +152,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -159,4 +160,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index bf2576b8586064af8de75f4453ace1405dd90846..d5bb35baa6c7a61bcd829b29b311e818d8a7d6a1 100644 (file)
@@ -111,6 +111,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -118,4 +119,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 25682a02b577329c90fe2d28e6dac827539734a2..22981f131224ab891cf5b1037f30bb71bfdb2989 100644 (file)
@@ -692,6 +692,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -699,4 +700,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 68f0b3c4b496eb90fdd2489694574cd25fdd1ff2..3a789566a6136c745bb9a5a3f50d024924e35c5e 100644 (file)
@@ -293,6 +293,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -300,4 +301,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 9ec4a4446d5a090489c1f2d76d520ed59d95cf66..2f2fad59e9f6140336984e3d1885451fad2d8ece 100644 (file)
@@ -181,6 +181,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -188,4 +189,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 4e6e5212fd0f903b7fef54c3f600bcafa3c85630..329f795af89360204dfc984951621a94a588842e 100644 (file)
@@ -1403,6 +1403,7 @@ class USERPREF_PT_extensions(bpy.types.Panel):
 
 from bpy.props import *
 
+
 class WM_OT_extension_enable(bpy.types.Operator):
     "Enable an extension"
     bl_idname = "wm.extension_enable"
@@ -1415,7 +1416,7 @@ class WM_OT_extension_enable(bpy.types.Operator):
         ext = context.user_preferences.extensions.new()
         module_name = self.properties.module
         ext.module = module_name
-        
+
         try:
             mod = __import__(module_name)
             mod.register()
@@ -1441,7 +1442,7 @@ class WM_OT_extension_disable(bpy.types.Operator):
             mod.unregister()
         except:
             traceback.print_exc()
-        
+
         extensions = context.user_preferences.extensions
         ok = True
         while ok: # incase its in more then once.
@@ -1461,7 +1462,7 @@ class WM_OT_extension_install(bpy.types.Operator):
     bl_label = "Install Extension"
 
     module = StringProperty(name="Module", description="Module name of the extension to disable")
-    
+
     path = StringProperty(name="File Path", description="File path to write file to")
     filename = StringProperty(name="File Name", description="Name of the file")
     directory = StringProperty(name="Directory", description="Directory of the file")
@@ -1478,7 +1479,7 @@ class WM_OT_extension_install(bpy.types.Operator):
         if os.path.exists(path_dest):
             self.report({'WARNING'}, "File already installed to '%s'\n" % path_dest)
             return {'CANCELLED'}
-        
+
         if os.path.exists(path_dest):
             self.report({'WARNING'}, "File already installed to '%s'\n" % path_dest)
             return {'CANCELLED'}
@@ -1498,7 +1499,7 @@ class WM_OT_extension_install(bpy.types.Operator):
         if not paths:
             self.report({'ERROR'}, "No 'extensions' path could be found in " + str(bpy.utils.script_paths()))
             return {'CANCELLED'}
-        
+
         wm = context.manager
         wm.add_fileselect(self)
         return {'RUNNING_MODAL'}
@@ -1910,7 +1911,7 @@ classes = [
     USERPREF_PT_file,
     USERPREF_PT_input,
     USERPREF_PT_extensions,
-    
+
     WM_OT_extension_enable,
     WM_OT_extension_disable,
     WM_OT_extension_install,
@@ -1931,6 +1932,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -1938,4 +1940,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index 3a1bca75baa3143072f5a327eb85f5960183757f..37a2337fe135aa0effdcc23360b70195c2dd909c 100644 (file)
@@ -80,7 +80,7 @@ class VIEW3D_HT_header(bpy.types.Header):
                 row.prop(toolsettings, "proportional_editing", text="", icon_only=True)
                 if toolsettings.proportional_editing != 'DISABLED':
                     row.prop(toolsettings, "proportional_editing_falloff", text="", icon_only=True)
-            
+
             # paint save
             if mode_string == 'PAINT_TEXTURE':
                 row.operator("image.save_dirty", text="Save Edited")
@@ -719,17 +719,17 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
             props.path_iter = "selected_editable_objects"
             props.path_item = "data.spot_size"
             props.input_scale = 0.01
-            
+
             props = layout.operator("wm.context_modal_mouse", text="Distance")
             props.path_iter = "selected_editable_objects"
             props.path_item = "data.distance"
             props.input_scale = 0.1
-            
+
             props = layout.operator("wm.context_modal_mouse", text="Clip Start")
             props.path_iter = "selected_editable_objects"
             props.path_item = "data.shadow_buffer_clip_start"
             props.input_scale = 0.05
-            
+
             props = layout.operator("wm.context_modal_mouse", text="Clip End")
             props.path_iter = "selected_editable_objects"
             props.path_item = "data.shadow_buffer_clip_end"
@@ -1262,7 +1262,7 @@ class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
         totface = mesh.total_face_sel
         totedge = mesh.total_edge_sel
         totvert = mesh.total_vert_sel
-        
+
         # the following is dependent on selection modes
         # we don't really want that
 #        if selection_mode[0]: # vert
@@ -1300,38 +1300,38 @@ class VIEW3D_MT_edit_mesh_extrude(bpy.types.Menu):
         if totvert == 0:
             return ()
         elif totedge == 0:
-            return (0,3)
+            return (0, 3)
         elif totface == 0:
-            return (0,2,3)
+            return (0, 2, 3)
         else:
-            return (0,1,2,3)
-        
-        
+            return (0, 1, 2, 3)
+
         # should never get here
         return ()
 
     def draw(self, context):
         layout = self.layout
         layout.operator_context = 'INVOKE_REGION_WIN'
-        
-        def region_menu(): 
+
+        def region_menu():
             layout.operator("view3d.edit_mesh_extrude_move_normal", text="Region")
-        
+
         def face_menu():
             layout.operator("mesh.extrude_faces_move", text="Individual Faces")
-        
+
         def edge_menu():
             layout.operator("mesh.extrude_edges_move", text="Edges Only")
-        
+
         def vert_menu():
             layout.operator("mesh.extrude_vertices_move", text="Vertices Only")
-        
+
         menu_funcs = region_menu, face_menu, edge_menu, vert_menu
-        
+
         for i in self.extrude_options(context):
             func = menu_funcs[i]
             func()
 
+
 class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
     "Extrude individual elements and move"
     bl_label = "Extrude Individual and Move"
@@ -1344,19 +1344,20 @@ class VIEW3D_OT_edit_mesh_extrude_individual_move(bpy.types.Operator):
         totface = mesh.total_face_sel
         totedge = mesh.total_edge_sel
         totvert = mesh.total_vert_sel
-        
+
         if selection_mode[2] and totface == 1:
-            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate = {"constraint_orientation":"NORMAL", "constraint_axis":[False, False, True]})
+            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": "NORMAL", "constraint_axis": [False, False, True]})
         elif selection_mode[2] and totface > 1:
             return bpy.ops.mesh.extrude_faces_move('INVOKE_REGION_WIN')
-        elif selection_mode[1] and totedge >= 1: 
+        elif selection_mode[1] and totedge >= 1:
             return bpy.ops.mesh.extrude_edges_move('INVOKE_REGION_WIN')
-        else: 
+        else:
             return bpy.ops.mesh.extrude_vertices_move('INVOKE_REGION_WIN')
-    
+
     def invoke(self, context, event):
         return self.execute(context)
 
+
 class VIEW3D_OT_edit_mesh_extrude_move(bpy.types.Operator):
     "Extrude and move along normals"
     bl_label = "Extrude and Move on Normals"
@@ -1368,17 +1369,18 @@ class VIEW3D_OT_edit_mesh_extrude_move(bpy.types.Operator):
         totface = mesh.total_face_sel
         totedge = mesh.total_edge_sel
         totvert = mesh.total_vert_sel
-        
+
         if totface >= 1 or totvert == 1:
-            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate = {"constraint_orientation":"NORMAL", "constraint_axis":[False, False, True]})
-        elif totedge == 1: 
-            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate = {"constraint_orientation":"NORMAL", "constraint_axis":[True, True, False]})
+            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": "NORMAL", "constraint_axis": [False, False, True]})
+        elif totedge == 1:
+            return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN', TRANSFORM_OT_translate={"constraint_orientation": "NORMAL", "constraint_axis": [True, True, False]})
         else:
             return bpy.ops.mesh.extrude_region_move('INVOKE_REGION_WIN')
-    
+
     def invoke(self, context, event):
         return self.execute(context)
 
+
 class VIEW3D_MT_edit_mesh_vertices(bpy.types.Menu):
     bl_label = "Vertices"
 
@@ -2258,6 +2260,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -2265,4 +2268,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-
index e45d79f622e75650440a7d18120e9be1d2432130..6de4ba6ce347ce14146d993376a3b2081b265b4b 100644 (file)
@@ -1029,6 +1029,7 @@ def register():
     for cls in classes:
         register(cls)
 
+
 def unregister():
     unregister = bpy.types.unregister
     for cls in classes:
@@ -1036,4 +1037,3 @@ def unregister():
 
 if __name__ == "__main__":
     register()
-