alexcy23 opened this issue on Feb 17, 2006 ยท 5 posts
alexcy23 posted Fri, 17 February 2006 at 8:18 AM
I am new to the Poser screen so excuse my ignorance please. What I basically want to do is the following: I take one figure and I create an animation sequence with it. For example running. Then I want to export that animation,ie 60 frames in image files. And I want to do that same image sequence from different angles. Ie. 360 degrees can give 20 angles (each spaced 18 degrees apart) so at the end I will have a sequence of images for every specific angle. I rotate the figure about the Y-axis to change the viewing angle. I want python once I give the command to export my image files for angle 0, then rotate my figure by 18 degrees and export again and so on until it reaches a full circle.. Can somebody please help to do that since I never before worked with Python. Thank you
svdl posted Fri, 17 February 2006 at 10:20 AM
It can be done. But I'd advise rotating the camera, not the figure. Here's how it goes (more or less, you'll probably have to tweak the script somewhat):
import poser
exportPath="c:animations"
scene = poser.Scene()
for anglecount in range(20):
angle=anglecount*18
scene.Camera("Main Camera").Parameter("yRot").SetValue(angle)
sequenceName="angle" + str(angle)
for framenum in range(scene.NumFrames()):
renderName=sequenceName + "frame" + str(framenum)
scene.Render()
scene.SaveImage("jpg",os.path.join(exportPath,renderName)
You should set the render options before running the script. Hope this helps, Steven.
The pen is mightier than the sword. But if you literally want to have some impact, use a typewriter
mkrueger posted Fri, 17 February 2006 at 1:37 PM
Missing a ")" at the end there! ;)
alexcy23 posted Sat, 18 February 2006 at 3:07 AM
Hey I tried the above script but I am getting an error in the line with "scene.camera ..." It says: File "", line 15, in ? AttributeError: Camera Can you please help me? Thank you
nruddock posted Sat, 18 February 2006 at 4:30 AM
There is no "Camera" method, replace with "Actor" and see if that works.