Example #1
0
static PointerRNA rna_RenderEngine_camera_override_get(PointerRNA *ptr)
{
	RenderEngine *engine = (RenderEngine *)ptr->data;

	if (engine->re) {
		Object *cam = RE_GetCamera(engine->re);
		return rna_pointer_inherit_refine(ptr, &RNA_Object, cam);
	}
	else {
		return rna_pointer_inherit_refine(ptr, &RNA_Object, engine->camera_override);
	}
}
Example #2
0
static void screen_opengl_render_write(OGLRender *oglrender)
{
	Scene *scene = oglrender->scene;
	RenderResult *rr;
	bool ok;
	char name[FILE_MAX];
	Object *camera = RE_GetCamera(oglrender->re);

	rr = RE_AcquireResultRead(oglrender->re);

	BKE_image_path_from_imformat(
	        name, scene->r.pic, oglrender->bmain->name, scene->r.cfra,
	        &scene->r.im_format, (scene->r.scemode & R_EXTENSION) != 0, false, NULL);

	/* write images as individual images or stereo */
	ok = RE_WriteRenderViewsImage(oglrender->reports, rr, scene, camera, false, name);

	RE_ReleaseResultImage(oglrender->re);

	if (ok) printf("OpenGL Render written to '%s'\n", name);
	else printf("OpenGL Render failed to write '%s'\n", name);
}