Skip to content

Instantly share code, notes, and snippets.

@chadcooper
Created April 2, 2013 00:41
Show Gist options
  • Save chadcooper/5289034 to your computer and use it in GitHub Desktop.
Save chadcooper/5289034 to your computer and use it in GitHub Desktop.
def get_render_quality(in_quality):
"""
Takes a human-friendly render output quality and translates it into the
respective Vue setting.
"""
quality_dict = {"Preview" : VuePython.PRS_Preview,
"Final" : VuePython.PRS_Final}
if in_quality in quality_dict.keys():
vue_qual_code = quality_dict[in_quality]
else:
vue_qual_code = VuePython.PRS_Preview
return vue_qual_code
def render_image(render_quality):
""" Renders main view out to jpeg """
SetRenderOutput(VuePython.RO_Disk, out_file)
SetRenderQuality(get_render_quality(render_quality))
SetPictureWidth(1920)
Render(True)
CloseRenderDialog()
Refresh()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment