diff options
author | Andrew Hale <TrumanBlending@gmail.com> | 2011-07-31 10:15:24 +0400 |
---|---|---|
committer | Andrew Hale <TrumanBlending@gmail.com> | 2011-07-31 10:15:24 +0400 |
commit | c83a0e81314e1c65b7b52b303f2ced9277c19c0b (patch) | |
tree | 45ca1be31cc984ade5afa38ebafec7801f1fde29 /add_curve_sapling | |
parent | 995e6d5808eda44737d0737e02c817bb29213d8a (diff) |
Fixed an issue when levels > 4 were used, causing tree generation failure
Diffstat (limited to 'add_curve_sapling')
-rw-r--r-- | add_curve_sapling/utils.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/add_curve_sapling/utils.py b/add_curve_sapling/utils.py index d9868749..59b79219 100644 --- a/add_curve_sapling/utils.py +++ b/add_curve_sapling/utils.py @@ -589,7 +589,7 @@ def addTree(props): childStems = branches[2]*(0.2 + 0.8*(branchL/p.lengthPar)/lMax) elif storeN <= levels - 2: branchL = (length[n] + uniform(-lengthV[n],lengthV[n]))*(p.lengthPar - 0.6*p.offset) - childStems = branches[n+1]*(1.0 - 0.5*p.offset/p.lengthPar) + childStems = branches[min(3,n+1)]*(1.0 - 0.5*p.offset/p.lengthPar) # If this is the last level before leaves then we need to generate the child points differently else: branchL = (length[n] + uniform(-lengthV[n],lengthV[n]))*(p.lengthPar - 0.6*p.offset) @@ -915,4 +915,4 @@ def addTree(props): for p in armOb.pose.bones: p.rotation_mode = 'XYZ' treeOb.parent = armOb - #print(time.time()-startTime) + #print(time.time()-startTime)
\ No newline at end of file |