[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [2630] trunk/py/scripts/addons: indentation edits and copy pyrimid from contrib ( where I had made some edits), removed so this wont happen again.

Campbell Barton ideasman42 at gmail.com
Sat Nov 19 17:19:08 CET 2011


Revision: 2630
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=2630
Author:   campbellbarton
Date:     2011-11-19 16:19:08 +0000 (Sat, 19 Nov 2011)
Log Message:
-----------
indentation edits and copy pyrimid from contrib (where I had made some edits), removed so this wont happen again.

Modified Paths:
--------------
    trunk/py/scripts/addons/add_curve_sapling/utils.py
    trunk/py/scripts/addons/add_mesh_BoltFactory/Boltfactory.py
    trunk/py/scripts/addons/add_mesh_BoltFactory/createMesh.py
    trunk/py/scripts/addons/add_mesh_extra_objects/add_mesh_pyramid.py
    trunk/py/scripts/addons/curve_simplify.py
    trunk/py/scripts/addons/io_coat3D/coat.py
    trunk/py/scripts/addons/io_coat3D/tex.py
    trunk/py/scripts/addons/io_export_unreal_psk_psa.py
    trunk/py/scripts/addons/io_import_scene_dxf.py
    trunk/py/scripts/addons/io_import_scene_unreal_psk.py
    trunk/py/scripts/addons/io_scene_fbx/export_fbx.py
    trunk/py/scripts/addons/io_scene_obj/import_obj.py
    trunk/py/scripts/addons/mesh_bsurfaces.py
    trunk/py/scripts/addons/mocap/mocap_constraints.py
    trunk/py/scripts/addons/mocap/mocap_tools.py
    trunk/py/scripts/addons/mocap/retarget.py
    trunk/py/scripts/addons/netrender/master.py
    trunk/py/scripts/addons/object_cloud_gen.py
    trunk/py/scripts/addons/object_fracture/fracture_ops.py
    trunk/py/scripts/addons/space_view3d_copy_attributes.py
    trunk/py/scripts/addons/space_view3d_spacebar_menu.py
    trunk/py/scripts/addons/texture_paint_layer_manager.py

Modified: trunk/py/scripts/addons/add_curve_sapling/utils.py
===================================================================
--- trunk/py/scripts/addons/add_curve_sapling/utils.py	2011-11-19 16:14:12 UTC (rev 2629)
+++ trunk/py/scripts/addons/add_curve_sapling/utils.py	2011-11-19 16:19:08 UTC (rev 2630)
@@ -402,369 +402,369 @@
     return vertsList,facesList,oldRot
 
 def addTree(props):
-        global splitError
-        #startTime = time.time()
-        # Set the seed for repeatable results
-        seed(props.seed)#
-        
-        # Set all other variables
-        levels = props.levels#
-        length = props.length#
-        lengthV = props.lengthV#
-        branches = props.branches#
-        curveRes = props.curveRes#
-        curve = toRad(props.curve)#
-        curveV = toRad(props.curveV)#
-        curveBack = toRad(props.curveBack)#
-        baseSplits = props.baseSplits#
-        segSplits = props.segSplits#
-        splitAngle = toRad(props.splitAngle)#
-        splitAngleV = toRad(props.splitAngleV)#
-        scale = props.scale#
-        scaleV = props.scaleV#
-        attractUp = props.attractUp#
-        shape = int(props.shape)#
-        baseSize = props.baseSize
-        ratio = props.ratio
-        taper = props.taper#
-        ratioPower = props.ratioPower#
-        downAngle = toRad(props.downAngle)#
-        downAngleV = toRad(props.downAngleV)#
-        rotate = toRad(props.rotate)#
-        rotateV = toRad(props.rotateV)#
-        scale0 = props.scale0#
-        scaleV0 = props.scaleV0#
-        prune = props.prune#
-        pruneWidth = props.pruneWidth#
-        pruneWidthPeak = props.pruneWidthPeak#
-        prunePowerLow = props.prunePowerLow#
-        prunePowerHigh = props.prunePowerHigh#
-        pruneRatio = props.pruneRatio#
-        leafScale = props.leafScale#
-        leafScaleX = props.leafScaleX#
-        leafShape = props.leafShape
-        bend = props.bend#
-        leafDist = int(props.leafDist)#
-        bevelRes = props.bevelRes#
-        resU = props.resU#
-        useArm = props.useArm
-        
-        frameRate = props.frameRate
-        windSpeed = props.windSpeed
-        windGust = props.windGust
-        armAnim = props.armAnim
-        
-        leafObj = None
-        
-        # Some effects can be turned ON and OFF, the necessary variables are changed here
-        if not props.bevel:
-            bevelDepth = 0.0
-        else:
-            bevelDepth = 1.0
+    global splitError
+    #startTime = time.time()
+    # Set the seed for repeatable results
+    seed(props.seed)#
+    
+    # Set all other variables
+    levels = props.levels#
+    length = props.length#
+    lengthV = props.lengthV#
+    branches = props.branches#
+    curveRes = props.curveRes#
+    curve = toRad(props.curve)#
+    curveV = toRad(props.curveV)#
+    curveBack = toRad(props.curveBack)#
+    baseSplits = props.baseSplits#
+    segSplits = props.segSplits#
+    splitAngle = toRad(props.splitAngle)#
+    splitAngleV = toRad(props.splitAngleV)#
+    scale = props.scale#
+    scaleV = props.scaleV#
+    attractUp = props.attractUp#
+    shape = int(props.shape)#
+    baseSize = props.baseSize
+    ratio = props.ratio
+    taper = props.taper#
+    ratioPower = props.ratioPower#
+    downAngle = toRad(props.downAngle)#
+    downAngleV = toRad(props.downAngleV)#
+    rotate = toRad(props.rotate)#
+    rotateV = toRad(props.rotateV)#
+    scale0 = props.scale0#
+    scaleV0 = props.scaleV0#
+    prune = props.prune#
+    pruneWidth = props.pruneWidth#
+    pruneWidthPeak = props.pruneWidthPeak#
+    prunePowerLow = props.prunePowerLow#
+    prunePowerHigh = props.prunePowerHigh#
+    pruneRatio = props.pruneRatio#
+    leafScale = props.leafScale#
+    leafScaleX = props.leafScaleX#
+    leafShape = props.leafShape
+    bend = props.bend#
+    leafDist = int(props.leafDist)#
+    bevelRes = props.bevelRes#
+    resU = props.resU#
+    useArm = props.useArm
+    
+    frameRate = props.frameRate
+    windSpeed = props.windSpeed
+    windGust = props.windGust
+    armAnim = props.armAnim
+    
+    leafObj = None
+    
+    # Some effects can be turned ON and OFF, the necessary variables are changed here
+    if not props.bevel:
+        bevelDepth = 0.0
+    else:
+        bevelDepth = 1.0
 
-        if not props.showLeaves:
-            leaves = 0
-        else:
-            leaves = props.leaves
+    if not props.showLeaves:
+        leaves = 0
+    else:
+        leaves = props.leaves
 
-        if props.handleType == '0':
-            handles = 'AUTO'
-        else:
-            handles = 'VECTOR'
+    if props.handleType == '0':
+        handles = 'AUTO'
+    else:
+        handles = 'VECTOR'
 
-        for ob in bpy.data.objects:
-            ob.select = False
+    for ob in bpy.data.objects:
+        ob.select = False
 
-        childP = []
-        stemList = []
+    childP = []
+    stemList = []
 
-        # Initialise the tree object and curve and adjust the settings
-        cu = bpy.data.curves.new('tree','CURVE')
-        treeOb = bpy.data.objects.new('tree',cu)
-        bpy.context.scene.objects.link(treeOb)
+    # Initialise the tree object and curve and adjust the settings
+    cu = bpy.data.curves.new('tree','CURVE')
+    treeOb = bpy.data.objects.new('tree',cu)
+    bpy.context.scene.objects.link(treeOb)
 
-        cu.dimensions = '3D'
-        cu.fill_mode = 'FULL'
-        cu.bevel_depth = bevelDepth
-        cu.bevel_resolution = bevelRes
+    cu.dimensions = '3D'
+    cu.fill_mode = 'FULL'
+    cu.bevel_depth = bevelDepth
+    cu.bevel_resolution = bevelRes
 
-        # Fix the scale of the tree now
-        scaleVal = scale + uniform(-scaleV,scaleV)
+    # Fix the scale of the tree now
+    scaleVal = scale + uniform(-scaleV,scaleV)
 
-        # If pruning is turned on we need to draw the pruning envelope
-        if prune:
-            enHandle = 'VECTOR'
-            enNum = 128
-            enCu = bpy.data.curves.new('envelope','CURVE')
-            enOb = bpy.data.objects.new('envelope',enCu)
-            enOb.parent = treeOb
-            bpy.context.scene.objects.link(enOb)
-            newSpline = enCu.splines.new('BEZIER')
+    # If pruning is turned on we need to draw the pruning envelope
+    if prune:
+        enHandle = 'VECTOR'
+        enNum = 128
+        enCu = bpy.data.curves.new('envelope','CURVE')
+        enOb = bpy.data.objects.new('envelope',enCu)
+        enOb.parent = treeOb
+        bpy.context.scene.objects.link(enOb)
+        newSpline = enCu.splines.new('BEZIER')
+        newPoint = newSpline.bezier_points[-1]
+        newPoint.co = Vector((0,0,scaleVal))
+        (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
+        # Set the coordinates by varying the z value, envelope will be aligned to the x-axis
+        for c in range(enNum):
+            newSpline.bezier_points.add()
             newPoint = newSpline.bezier_points[-1]
-            newPoint.co = Vector((0,0,scaleVal))
+            ratioVal = (c+1)/(enNum)
+            zVal = scaleVal - scaleVal*(1-baseSize)*ratioVal
+            newPoint.co = Vector((scaleVal*pruneWidth*shapeRatio(8,ratioVal,pruneWidthPeak,prunePowerHigh,prunePowerLow),0,zVal))
             (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
-            # Set the coordinates by varying the z value, envelope will be aligned to the x-axis
-            for c in range(enNum):
-                newSpline.bezier_points.add()
-                newPoint = newSpline.bezier_points[-1]
-                ratioVal = (c+1)/(enNum)
-                zVal = scaleVal - scaleVal*(1-baseSize)*ratioVal
-                newPoint.co = Vector((scaleVal*pruneWidth*shapeRatio(8,ratioVal,pruneWidthPeak,prunePowerHigh,prunePowerLow),0,zVal))
-                (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
-            newSpline = enCu.splines.new('BEZIER')
+        newSpline = enCu.splines.new('BEZIER')
+        newPoint = newSpline.bezier_points[-1]
+        newPoint.co = Vector((0,0,scaleVal))
+        (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
+        # Create a second envelope but this time on the y-axis
+        for c in range(enNum):
+            newSpline.bezier_points.add()
             newPoint = newSpline.bezier_points[-1]
-            newPoint.co = Vector((0,0,scaleVal))
+            ratioVal = (c+1)/(enNum)
+            zVal = scaleVal - scaleVal*(1-baseSize)*ratioVal
+            newPoint.co = Vector((0,scaleVal*pruneWidth*shapeRatio(8,ratioVal,pruneWidthPeak,prunePowerHigh,prunePowerLow),zVal))
             (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
-            # Create a second envelope but this time on the y-axis
-            for c in range(enNum):
-                newSpline.bezier_points.add()
-                newPoint = newSpline.bezier_points[-1]
-                ratioVal = (c+1)/(enNum)
-                zVal = scaleVal - scaleVal*(1-baseSize)*ratioVal
-                newPoint.co = Vector((0,scaleVal*pruneWidth*shapeRatio(8,ratioVal,pruneWidthPeak,prunePowerHigh,prunePowerLow),zVal))
-                (newPoint.handle_right_type,newPoint.handle_left_type) = (enHandle,enHandle)
 
-        leafVerts = []
-        leafFaces = []
-        levelCount = []
+    leafVerts = []
+    leafFaces = []
+    levelCount = []
 
-        splineToBone = deque([''])
-        addsplinetobone = splineToBone.append
+    splineToBone = deque([''])
+    addsplinetobone = splineToBone.append
 
-        # Each of the levels needed by the user we grow all the splines
-        for n in range(levels):
-            storeN = n
-            stemList = deque()
-            addstem = stemList.append
-            # If n is used as an index to access parameters for the tree it must be at most 3 or it will reference outside the array index
-            n = min(3,n)
-            vertAtt = attractUp
-            splitError = 0.0
-            # If this is the first level of growth (the trunk) then we need some special work to begin the tree
-            if n == 0:
-                vertAtt = 0.0
+    # Each of the levels needed by the user we grow all the splines
+    for n in range(levels):
+        storeN = n
+        stemList = deque()
+        addstem = stemList.append

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list