Redraw() problem

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

mbibim
Posts: 11
Joined: Thu Apr 10, 2003 11:57 pm

Redraw() problem

Postby mbibim » Tue May 20, 2003 6:50 pm

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²

Return to “Python”

Who is online

Users browsing this forum: No registered users and 1 guest