Changeset View
Changeset View
Standalone View
Standalone View
add_curve_sapling/utils.py
| Show First 20 Lines • Show All 1,602 Lines • ▼ Show 20 Lines | def addTree(props): | ||||
| bpy.context.scene.collection.objects.link(treeOb) | bpy.context.scene.collection.objects.link(treeOb) | ||||
| # treeOb.location=bpy.context.scene.cursor.location attractUp | # treeOb.location=bpy.context.scene.cursor.location attractUp | ||||
| cu.dimensions = '3D' | cu.dimensions = '3D' | ||||
| cu.fill_mode = 'FULL' | cu.fill_mode = 'FULL' | ||||
| cu.bevel_depth = bevelDepth | cu.bevel_depth = bevelDepth | ||||
| cu.bevel_resolution = bevelRes | cu.bevel_resolution = bevelRes | ||||
| cu.use_uv_as_generated = True | |||||
| # Fix the scale of the tree now | # Fix the scale of the tree now | ||||
| scaleVal = scale + uniform(-scaleV, scaleV) | scaleVal = scale + uniform(-scaleV, scaleV) | ||||
| scaleVal += copysign(1e-6, scaleVal) # Move away from zero to avoid div by zero | scaleVal += copysign(1e-6, scaleVal) # Move away from zero to avoid div by zero | ||||
| pruneBase = min(pruneBase, baseSize) | pruneBase = min(pruneBase, baseSize) | ||||
| # If pruning is turned on we need to draw the pruning envelope | # If pruning is turned on we need to draw the pruning envelope | ||||
| if prune: | if prune: | ||||
| ▲ Show 20 Lines • Show All 397 Lines • Show Last 20 Lines | |||||