Previous Thread  Next Thread

chat icon Redraw() problem

mbibim

Posted: Tue May 20, 2003 5:50 pm
Joined: 10 Apr 2003
Posts: 11
Hello everybody. I've writed a script to move vertices of an object. my script works with Alt+p without any problem. But when I start gameblender, the script starts but i can't see the vertices moving as they should do. I think i have a problem with Redraw() because when i leave gameblender, the vertices had moved properly. So it is a problem a redrawing.
this is my script:

from Blender import *

pg = Mesh.get("porteg")
pd = Mesh.get("ported")

print pg.ouvert

#ouverture

i=0
while i < 20:

# points qui descend
pg.verts[3].co[2] -= 0.1
pg.update()
pd.verts[3].co[2] -= 0.1
pd.update()
Redraw()

# points qui monte
pg.verts[1].co[2] += 0.1
pg.update()
pd.verts[1].co[2] += 0.1
pd.update()
Redraw()
i+=1

i=0
while i < 40:

# points qui vont a gauche
pg.verts[1].co[0] += 0.05
pg.verts[3].co[0] += 0.05
pg.update()
pd.verts[1].co[0] += 0.05
pd.verts[3].co[0] += 0.05
pd.update()
Redraw()
i+=1


Please help me solve my problem. It's very important . If someone wants my blender file to see what it does, let me your @ and i will send it to you.
thanks

biČ
Reply with quote


 
Jump to:  
Powered by phpBB © 2001, 2005 phpBB Group