[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2864] contrib/py/scripts/addons: tabs to spaces

Campbell Barton ideasman42 at gmail.com
Wed Jan 4 05:27:01 CET 2012


Revision: 2864
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2864
Author:   campbellbarton
Date:     2012-01-04 04:27:00 +0000 (Wed, 04 Jan 2012)
Log Message:
-----------
tabs to spaces

Modified Paths:
--------------
    contrib/py/scripts/addons/add_mesh_walls/Blocks.py
    contrib/py/scripts/addons/curve_tools.py
    contrib/py/scripts/addons/development_class_viewer.py
    contrib/py/scripts/addons/io_export_dxf/primitive_exporters/mesh_exporter.py
    contrib/py/scripts/addons/lamp_geographical_sun.py
    contrib/py/scripts/addons/mesh_inset_extrude.py
    contrib/py/scripts/addons/mesh_vertex_slide.py

Modified: contrib/py/scripts/addons/add_mesh_walls/Blocks.py
===================================================================
--- contrib/py/scripts/addons/add_mesh_walls/Blocks.py	2012-01-04 04:26:33 UTC (rev 2863)
+++ contrib/py/scripts/addons/add_mesh_walls/Blocks.py	2012-01-04 04:27:00 UTC (rev 2864)
@@ -13,9 +13,9 @@
 # You should have received a copy of the GNU General Public License
 # along with this program. If not, write to:
 #
-#	the Free Software Foundation Inc.
-#	51 Franklin Street, Fifth Floor
-#	Boston, MA 02110-1301, USA
+#   the Free Software Foundation Inc.
+#   51 Franklin Street, Fifth Floor
+#   Boston, MA 02110-1301, USA
 #
 # or go online at: http://www.gnu.org/licenses/ to view license options.
 #
@@ -49,35 +49,35 @@
 
 #A few constants
 SMALL = 0.000000000001
-NOTZERO = 0.01 # for values that must be != 0; see UI options/variables - 
+NOTZERO = 0.01 # for values that must be != 0; see UI options/variables -
 # sort of a bug to be fixed.
 PI = math.pi
 
 #global variables
 
 #General masonry Settings
-settings = {'w': 1.2, 'wv': 0.3, 'h': .6, 'hv': 0.3, 'd': 0.3, 'dv': 0.1, 
-            'g': 0.1, 'gv': 0.07, 'gd': 0.01, 'gdv': 0.0, 'b': 0, 'bv': 0, 
-            'f': 0.0, 'fv': 0.0, 't': 0.0, 'sdv': 0.1, 'hwt': 0.5, 'aln':0, 
-            'wm': 0.8, 'hm': 0.3, 'dm':0.1, 
-            'woff':0.0, 'woffv':0.0, 'eoff':0.3, 'eoffv':0.0, 'rwhl':1, 
+settings = {'w': 1.2, 'wv': 0.3, 'h': .6, 'hv': 0.3, 'd': 0.3, 'dv': 0.1,
+            'g': 0.1, 'gv': 0.07, 'gd': 0.01, 'gdv': 0.0, 'b': 0, 'bv': 0,
+            'f': 0.0, 'fv': 0.0, 't': 0.0, 'sdv': 0.1, 'hwt': 0.5, 'aln':0,
+            'wm': 0.8, 'hm': 0.3, 'dm':0.1,
+            'woff':0.0, 'woffv':0.0, 'eoff':0.3, 'eoffv':0.0, 'rwhl':1,
             'hb':0, 'ht':0, 'ge':0, 'physics':0}
-# 'w':width 'wv':widthVariation 
-# 'h':height 'hv':heightVariation 
+# 'w':width 'wv':widthVariation
+# 'h':height 'hv':heightVariation
 # 'd':depth 'dv':depthVariation
-# 'g':grout 'gv':groutVariation 'gd':groutDepth 'gdv':groutDepthVariation 
+# 'g':grout 'gv':groutVariation 'gd':groutDepth 'gdv':groutDepthVariation
 # 'b':bevel 'bv':bevelVariation
-# 'f':flawSize 'fv':flawSizeVariation 'ff':flawFraction 
-# 't':taper 
+# 'f':flawSize 'fv':flawSizeVariation 'ff':flawFraction
+# 't':taper
 # 'sdv':subdivision(distance or angle)
-# 'hwt':row height effect on block widths in the row (0=no effect, 
+# 'hwt':row height effect on block widths in the row (0=no effect,
 #     1=1:1 relationship, negative values allowed, 0.5 works well)
 # 'aln':alignment(0=none, 1=rows w/features, 2=features w/rows)
 #     (currently un-used)
 # 'wm':width minimum 'hm':height minimum 'dm':depth minimum
-# 'woff':row start offset(fraction of width) 
+# 'woff':row start offset(fraction of width)
 # 'woffv':width offset variation(fraction of width)
-# 'eoff':edge offset 'eoffv':edge offset variation 
+# 'eoff':edge offset 'eoffv':edge offset variation
 # 'rwhl':row height lock(1 is all blocks in row have same height)
 # 'hb':bottom row height 'ht': top row height 'ge': grout the edges
 # 'physics': set up for physics
@@ -91,16 +91,16 @@
 
 radialized = 0 # Radiating from one point - round/disc; instead of square
 slope = 0 # Warp/slope; curved over like a vaulted tunnel
-# 'bigblock': merge adjacent blocks into single large blocks 
+# 'bigblock': merge adjacent blocks into single large blocks
 bigBlock = 0 # Merge blocks
 
 # Gaps in blocks for various apertures.
 #openingSpecs = []
-openingSpecs = [{'w':0.5, 'h':0.5, 'x':0.8, 'z':2.7, 'rp':1, 'b':0.0, 
+openingSpecs = [{'w':0.5, 'h':0.5, 'x':0.8, 'z':2.7, 'rp':1, 'b':0.0,
                  'v':0, 'vl':0, 't':0, 'tl':0}]
-# 'w': opening width, 'h': opening height, 
-# 'x': horizontal position, 'z': vertical position, 
-# 'rp': make multiple openings, with a spacing of x, 
+# 'w': opening width, 'h': opening height,
+# 'x': horizontal position, 'z': vertical position,
+# 'rp': make multiple openings, with a spacing of x,
 # 'b': bevel the opening, inside only, like an arrow slit.
 # 'v': height of the top arch, 'vl':height of the bottom arch,
 # 't': thickness of the top arch, 'tl': thickness of the bottom arch
@@ -115,7 +115,7 @@
 # Add blocks to make steps.
 stepMod = 0
 stepSpecs = {'x':0.0, 'z':-10, 'w':10.0, 'h':10.0,
-	'v':0.7, 't':1.0, 'd':1.0 }
+    'v':0.7, 't':1.0, 'd':1.0 }
 # 'x': horizontal start position, 'z': vertical start position,
 # 'w': step area width, 'h': step area height,
 # 'v': riser height, 't': tread width, 'd': block depth (step size; offset from wall)
@@ -145,9 +145,9 @@
         t = 0.3 + random()
         tl = 0.3 + random()
         rn = random()*2
-        openingSpecs += [{'w':3.1 + rn, 'h':0.3 + rn, 'x':float(x), 
-                          'z':float(z), 'rp':0, 'b':0., 
-                          'v':float(v), 'vl':float(vl), 
+        openingSpecs += [{'w':3.1 + rn, 'h':0.3 + rn, 'x':float(x),
+                          'z':float(z), 'rp':0, 'b':0.,
+                          'v':float(v), 'vl':float(vl),
                           't':float(t), 'tl':float(tl)}]
     return dims, openingSpecs
 
@@ -155,29 +155,29 @@
 
 
 #For filling a linear space with divisions
-def fill(left, right, avedst, mindst=0.0, dev=0.0, pad=(0.0,0.0), num=0, 
+def fill(left, right, avedst, mindst=0.0, dev=0.0, pad=(0.0,0.0), num=0,
          center=0):
     __doc__ = '''\
-	Fills a linear range with points and returns an ordered list of those points 
-	including the end points.
+    Fills a linear range with points and returns an ordered list of those points
+    including the end points.
 
-	left: the lower boundary
-	right: the upper boundary
-	avedst: the average distance between points
-	mindst: the minimum distance between points
-	dev: the maximum random deviation from avedst
-	pad: tends to move the points near the bounds right (positive) or 
-	    left (negative).
-	    element 0 pads the lower bounds, element 1 pads the upper bounds
-	num: substitutes a numerical limit for the right limit.  fill will then make
-	    a num+1 element list
-	center: flag to center the elements in the range, 0 == disabled
+    left: the lower boundary
+    right: the upper boundary
+    avedst: the average distance between points
+    mindst: the minimum distance between points
+    dev: the maximum random deviation from avedst
+    pad: tends to move the points near the bounds right (positive) or
+        left (negative).
+        element 0 pads the lower bounds, element 1 pads the upper bounds
+    num: substitutes a numerical limit for the right limit.  fill will then make
+        a num+1 element list
+    center: flag to center the elements in the range, 0 == disabled
         '''
 
     poslist = [left]
     curpos = left+pad[0]
 
-    # Set offset by average spacing, then add blocks (fall through); 
+    # Set offset by average spacing, then add blocks (fall through);
     # if not at right edge.
     if center:
         curpos += ((right-left-mindst*2)%avedst)/2+mindst
@@ -205,8 +205,8 @@
 
     # make block edges
     else:
-        while True: # loop for blocks	
-            curpos += avedst+rndd()*dev		
+        while True: # loop for blocks
+            curpos += avedst+rndd()*dev
             if curpos-poslist[-1]<mindst:
                 curpos = poslist[-1]+mindst+rnd()*dev/2
             # close off edges at limit
@@ -218,31 +218,31 @@
 
 
 #For generating block geometry
-def MakeABlock(bounds, segsize, vll=0, Offsets=None, FaceExclude=[], 
+def MakeABlock(bounds, segsize, vll=0, Offsets=None, FaceExclude=[],
                bevel=0, xBevScl=1):
     __doc__ = '''\
-	MakeABlock returns lists of points and faces to be made into a square
+    MakeABlock returns lists of points and faces to be made into a square
             cornered block, subdivided along the length, with optional bevels.
-	bounds: a list of boundary positions:
+    bounds: a list of boundary positions:
         0:left, 1:right, 2:bottom, 3:top, 4:back, 5:front
-	segsize: the maximum size before lengthwise subdivision occurs
-	vll: the number of vertexes already in the mesh. len(mesh.verts) should 
+    segsize: the maximum size before lengthwise subdivision occurs
+    vll: the number of vertexes already in the mesh. len(mesh.verts) should
             give this number.
-	Offsets: list of coordinate delta values.
-		Offsets are lists, [x,y,z] in
-			[
-			0:left_bottom_back,
-			1:left_bottom_front,
-			2:left_top_back,
-			3:left_top_front,
-			4:right_bottom_back,
-			5:right_bottom_front,
-			6:right_top_back,
-			7:right_top_front,
-			]
-	FaceExclude: list of faces to exclude from the faces list.  see bounds above for indicies
-	xBevScl: how much to divide the end (+- x axis) bevel dimensions.  Set to current average radius to compensate for angular distortion on curved blocks
-	'''
+    Offsets: list of coordinate delta values.
+        Offsets are lists, [x,y,z] in
+            [
+            0:left_bottom_back,
+            1:left_bottom_front,
+            2:left_top_back,
+            3:left_top_front,
+            4:right_bottom_back,
+            5:right_bottom_front,
+            6:right_top_back,
+            7:right_top_front,
+            ]
+    FaceExclude: list of faces to exclude from the faces list.  see bounds above for indicies
+    xBevScl: how much to divide the end (+- x axis) bevel dimensions.  Set to current average radius to compensate for angular distortion on curved blocks
+    '''
 
     slices = fill(bounds[0], bounds[1], segsize, segsize, center=1)
     points = []
@@ -305,18 +305,18 @@
 #For generating Keystone Geometry
 def MakeAKeystone(xpos, width, zpos, ztop, zbtm, thick, bevel, vll=0, FaceExclude=[], xBevScl=1):
     __doc__ = '''\
-	MakeAKeystone returns lists of points and faces to be made into a square cornered keystone, with optional bevels.
-	xpos: x position of the centerline
-	width: x width of the keystone at the widest point (discounting bevels)
-	zpos: z position of the widest point
-	ztop: distance from zpos to the top
-	zbtm: distance from zpos to the bottom
-	thick: thickness
+    MakeAKeystone returns lists of points and faces to be made into a square cornered keystone, with optional bevels.
+    xpos: x position of the centerline
+    width: x width of the keystone at the widest point (discounting bevels)
+    zpos: z position of the widest point
+    ztop: distance from zpos to the top
+    zbtm: distance from zpos to the bottom
+    thick: thickness

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list