I'm trying to make a simple script that extrude vertex in random ways, all works without extrude.
I do not know if it's good I wrote, but I do not know how to extrude vertex to the location of the cursor. Any idea what is wrong with my code and how to fix it? I run script in Edit mode with one vertex on the scene.
import bpy
import random
#generate random number
def RN():
return int(random.random()*400)/20
for i in range(1,100):
#set 3d cursor to random location
bpy.context.scene.cursor_location = (RN(),RN(),RN())
#extrude vertex to cursor location - doesn't work
bpy.ops.mesh.dupli_extrude_cursor(rotate_source=True)