Original Post
Hi, im trying to create a script for poser that exports sprites as imagefiles. It is supose to export one image for each fram, then rotate the figure 45 deg and export every frame, and so on until it has gone a whole circle. I'm testing this out with 5 frames so it schoul produce 40 images. I have managed to do this, or, i get it to export my 40 images to the right directory and with the right names, but noting happens in my sceen. My figure does not rotate, and i cant seem to change frames, so now i basicaly have a script that produces 40 images of from the same frame and the same angle. I could need som help... Here is my code: ------
directions = ['a','b','c','d','e','f','g','h']
frames = 5
scene = poser.Scene()
figure = scene.Figure("Figure 1")
body = figure.Actor("Body")
#Iterate through the 8 directions and set the rotation angle
for dir in directions:
if(dir == 'a'):
ang = 180
elif(dir == 'b'):
ang = 135
elif(dir == 'c'):
ang = 90
elif(dir == 'd'):
ang = 45
elif(dir == 'e'):
ang = 0
elif(dir == 'f'):
ang = 315
elif(dir == 'g'):
ang = 270
elif(dir == 'h'):
ang = 225
body.SetAlignmentRotationXYZ(0,ang,0) #Rotate figure??
print dir
#Iterate through my 5 frames
fra = 0
while fra < frames:
print (fra + 1)
path = "export\\"+ str(dir) +"-00"+ str(fra+1)
scene.SaveImage ("png", path)
scene.NextKeyFrame() #Next frame??
fra = fra + 1
------- Any help would me great as doing this by hand would be death... [edit: added code tags -SiCrane] [Edited by - SiCrane on June 8, 2006 7:55:22 AM]