How to set dimension of rendered image?

Scripting in Blender with Python, and working on the API

Moderators: jesterKing, stiv

Post Reply
Posts: 1
Joined: Sat Jun 30, 2012 11:41 am

How to set dimension of rendered image?

Post by obmana » Sat Jun 30, 2012 11:46 am


I render a scene from Python:

Code: Select all

and get image with dimension 960x540 or similar. How can I set resolution of rendered image to be 640x480 for example, without using GUI?


Posts: 1
Joined: Fri Jul 06, 2012 9:25 pm

Post by clayh » Mon Jul 09, 2012 10:08 pm

Do something like this before rendering the scene:

Code: Select all

# Get the scene
scene =["Scene"]

# Set render resolution
scene.render.resolution_x = 64
scene.render.resolution_y = 32
scene.render.resolution_percentage = 100

Posts: 894
Joined: Sun Apr 05, 2009 7:42 pm
Location: Germany

Post by CoDEmanX » Tue Jul 10, 2012 8:51 pm


Code: Select all

scene =["Scene"] 

Code: Select all

scene = bpy.context.scene
and it will always take the current scene
I'm sitting, waiting, wishing, building Blender in superstition...

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests