problems on linux

Hallo,

im facing a problem with python on linux. basically, the script below moves the camera in different directions, renders the scene and subsequently saves an image (JPEG) of this scene away. following the script:

----SCRIPT----
import Blender
from Blender import *
from Blender.Scene import Render

OutPath = ‘PATH’

Steps = 6
StepWidth = .5
RotationsPerStep = 5
RotationDegree = .5

example = Blender.Camera.Get(‘Cam’)
#example.LocX=1
#example.RotX=0

for i in range (1, Steps+1):
example.LocZ = 1
example.LocX = 0
example.LocX = example.LocX +((i-1)*StepWidth)

for j in range (1, RotationsPerStep+1):
		
	if j == 1:
		example.LocZ = example.LocZ
	else:
		example.LocZ = example.LocZ +((j-1)*RotationDegree)

	scn = Scene.GetCurrent()
	context = scn.getRenderingContext()
	scn.setName('ss')
	Render.EnableDispWin()
	context.extensions = True
	context.sizePreset(Render.PAL)
	context.imageType = Render.JPEG
	context.render()
	context.setRenderPath(OutPath)
	FileName = PICNAME

context.saveRenderedImage(FileName)

Render.CloseRenderWindow()

-----SCRIPT END--------------------

running it like this on linux, the shell prompts:

"PATH/PICNAME SaveTo -> "

and the script is stuck. Apparently, the destination path for the image is somewhat missing (just an educated guess). on mac (os x 10.5) everything works fine. any hints or suggestions are highly appreciated.

Best

Don’t you need to set the variable “OutPath” to some valid folder name? And the variable “PICNAME” to your actual file name?

I don’t know Linux pathing, but wouldn’t it be like “home/user/myuser/desktop/myframe.jpg”

Launch blender form a Terminal with ./blender
In the code use
print("My variable content is: “+yourstringvariablehere+”
")
to see the value of the string in the terminal. Don’t forget the new line character or it only will print when you exit blender instead immediately. That is the way I actually debug python addon scripts in blender.