Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorToni Alatalo <antont@kyperjokki.fi>2006-02-07 21:33:01 +0300
committerToni Alatalo <antont@kyperjokki.fi>2006-02-07 21:33:01 +0300
commit3fe6fca3f6ef8391298332802b26883c21ad655d (patch)
tree41b909cd3b9c6323a98d529072b44ed8cd58645b /source/blender/python/api2_2x/sceneRender.c
parent617b7b00ca0f7510ed271c26737666d524fc11f8 (diff)
additions to make the orange rendering preparation script work, sorry undocumented again (we are testing this now and gotta commit to get this to other compus at studio, Stivs make a note to bug me about the doc or someone add it.. :o)
Diffstat (limited to 'source/blender/python/api2_2x/sceneRender.c')
-rw-r--r--source/blender/python/api2_2x/sceneRender.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/sceneRender.c b/source/blender/python/api2_2x/sceneRender.c
index 10de6e05aee..e9d9d0749a4 100644
--- a/source/blender/python/api2_2x/sceneRender.c
+++ b/source/blender/python/api2_2x/sceneRender.c
@@ -104,6 +104,8 @@ static PyObject *RenderData_SetBackbufPath( BPy_RenderData * self,
static PyObject *RenderData_GetBackbufPath( BPy_RenderData * self );
static PyObject *RenderData_EnableBackbuf( BPy_RenderData * self,
PyObject * args );
+static PyObject *RenderData_EnableThreads( BPy_RenderData * self,
+ PyObject * args );
static PyObject *RenderData_SetFtypePath( BPy_RenderData * self,
PyObject * args );
static PyObject *RenderData_GetFtypePath( BPy_RenderData * self );
@@ -283,6 +285,9 @@ static PyMethodDef BPy_RenderData_methods[] = {
{"enableBackbuf", ( PyCFunction ) RenderData_EnableBackbuf,
METH_VARARGS,
"(bool) - enable/disable the backbuf image\n"},
+ {"enableThreads", ( PyCFunction ) RenderData_EnableThreads,
+ METH_VARARGS,
+ "(bool) - enable/disable threaded rendering\n"},
{"setFtypePath", ( PyCFunction ) RenderData_SetFtypePath, METH_VARARGS,
"(string) - get/set the path to output the Ftype file\n"},
{"getFtypePath", ( PyCFunction ) RenderData_GetFtypePath, METH_NOARGS,
@@ -572,6 +577,7 @@ PyObject *Render_Init( void )
PyModule_AddIntConstant( submodule, "BEST", PY_BEST );
PyModule_AddIntConstant( submodule, "SKYDOME", PY_SKYDOME );
PyModule_AddIntConstant( submodule, "GIFULL", PY_FULL );
+ PyModule_AddIntConstant( submodule, "OPENEXR", R_OPENEXR );
return ( submodule );
}
@@ -1087,6 +1093,13 @@ PyObject *RenderData_EnableBackbuf( BPy_RenderData * self, PyObject * args )
&self->renderContext->bufflag );
}
+//------------------------------------RenderData.EnableThreads() --------
+PyObject *RenderData_EnableThreads( BPy_RenderData * self, PyObject * args )
+{
+ return M_Render_BitToggleInt( args, R_THREADS,
+ &self->renderContext->mode );
+}
+
//------------------------------------RenderData.SetFtypePath() ---------
PyObject *RenderData_SetFtypePath( BPy_RenderData * self, PyObject * args )
{
@@ -1526,6 +1539,9 @@ PyObject *RenderData_SetImageType( BPy_RenderData * self, PyObject * args )
return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
"expected constant" ) );
+ //this same logic and more is in buttons_scene.c imegetype_pup code
+ //but only in generating strings for the popup menu, no way to reuse that :(
+
if( type == R_AVIRAW )
self->renderContext->imtype = R_AVIRAW;
else if( type == R_AVIJPEG )
@@ -1534,6 +1550,7 @@ PyObject *RenderData_SetImageType( BPy_RenderData * self, PyObject * args )
else if( type == R_AVICODEC )
self->renderContext->imtype = R_AVICODEC;
#endif
+
else if( type == R_QUICKTIME && G.have_quicktime )
self->renderContext->imtype = R_QUICKTIME;
else if( type == R_TARGA )
@@ -1556,6 +1573,12 @@ PyObject *RenderData_SetImageType( BPy_RenderData * self, PyObject * args )
self->renderContext->imtype = R_IRIZ;
else if( type == R_FTYPE )
self->renderContext->imtype = R_FTYPE;
+
+#ifdef WITH_OPENEXR
+ else if( type == R_OPENEXR)
+ self->renderContext->imtype = R_OPENEXR;
+#endif
+
else
return ( EXPP_ReturnPyObjError( PyExc_AttributeError,
"unknown constant - see modules dict for help" ) );