This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy, bmesh | |
def main(context): | |
bpy.ops.object.mode_set(mode='EDIT') | |
active_obj = bpy.context.active_object | |
me = active_obj.data | |
bm = bmesh.from_edit_mesh(me) | |
verts = bm.verts |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import bpy | |
import bmesh | |
from mathutils import noise | |
def add_perlin_plane(width=1.0, length=1.0, x_res=10, y_res=10, min_z=-0.5, max_z=0.5, noise_scale=0.5, seed=0.0, x_offset=0.0, y_offset=0.0): | |
""" | |
This function takes inputs and returns vertex and face arrays. | |
no actual mesh data creation is done here. | |
""" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fn=5; | |
profiles=[ | |
transform(translation([0,0,-.01]), rectangle_profile([1.9,0.1])), | |
transform(translation([0,0,3.01]), circle_profile(fn=20,r=0.45)), | |
transform(translation([0,0,6.01]), star_profile(r1=.45,r2=.8,n=6)), | |
]; | |
skin(morph(profiles, 20, "cubic")); |