openexr, touch and noOverwrite setting access from py api
authorCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2008 14:15:34 +0000 (14:15 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 23 Jan 2008 14:15:34 +0000 (14:15 +0000)
source/blender/python/api2_2x/doc/Scene.py
source/blender/python/api2_2x/sceneRender.c

index 77e33e143f5b3084b3bebbbd64de3a13b78185fb..caa5b56e8d56282577ec27af345c2174631ea7a4 100644 (file)
@@ -117,6 +117,16 @@ class Scene:
        @ivar render: The scenes L{render<Render.RenderData>} settings. (read only)
        @type radiosity: RenderData
        @ivar radiosity: The scenes L{radiosity<Radio>} settings. (read only)
+       @type halfFloat: OpenEXR's half float option
+       @ivar halfFloat: boolean
+       @type zbuf: OpenEXR's save zbuf option
+       @ivar zbuf: boolean
+       @type preview: OpenEXR's save preview option
+       @ivar preview: boolean
+       @type touch: enable creating empty image files while they are rendered.
+       @ivar touch: boolean
+       @type noOverwrite: Skip rendering existing image files
+       @ivar noOverwrite: boolean
        """
 
        def getName():
index 5f71cfc4bd192e13e2104e001a6566515696bb36..ec160ddf4cee6d5fbf32552d31202a310d22a80d 100644 (file)
@@ -1948,6 +1948,18 @@ static int RenderData_setIValueAttrClamp( BPy_RenderData *self, PyObject *value,
 /* handlers for other getting/setting attributes                           */
 /***************************************************************************/
 
+static PyObject *RenderData_getSubImTypeBits( BPy_RenderData *self, void* type )
+{
+       return EXPP_getBitfield( &self->renderContext->subimtype, (int)type, 'h' );
+}
+
+static int RenderData_setSubImTypeBits( BPy_RenderData* self, PyObject *value,
+               void* type )
+{
+       return EXPP_setBitfield( value, &self->renderContext->subimtype,
+                       (int)type, 'h' );
+}
+
 static PyObject *RenderData_getModeBit( BPy_RenderData *self, void* type )
 {
        return EXPP_getBitfield( &self->renderContext->mode,
@@ -2419,6 +2431,16 @@ static PyGetSetDef BPy_RenderData_getseters[] = {
         (getter)RenderData_getModeBit, (setter)RenderData_setModeBit,
         "Ray tracing enabled",
         (void *)R_RAYTRACE},
+         
+       {"touch",
+        (getter)RenderData_getModeBit, (setter)RenderData_setModeBit,
+        "Create an empry file with the frame name before rendering",
+        (void *)R_TOUCH},
+       {"noOverwrite",
+        (getter)RenderData_getModeBit, (setter)RenderData_setModeBit,
+        "Skip rendering existing image files",
+        (void *)R_NO_OVERWRITE},
+         
 /* R_GAUSS unused */
 /* R_FBUF unused */
 /* R_THREADS unused */
@@ -2601,6 +2623,19 @@ static PyGetSetDef BPy_RenderData_getseters[] = {
         "Active rendering layer",
         NULL},
 
+       {"halfFloat",
+     (getter)RenderData_getSubImTypeBits, (setter)RenderData_setSubImTypeBits,
+     "'Half' openexr option enabled",
+     (void *)R_OPENEXR_HALF},
+       {"zbuf",
+     (getter)RenderData_getSubImTypeBits, (setter)RenderData_setSubImTypeBits,
+     "'ZBuf' openexr option enabled",
+     (void *)R_OPENEXR_ZBUF},
+       {"preview",
+     (getter)RenderData_getSubImTypeBits, (setter)RenderData_setSubImTypeBits,
+     "'preview' openexr option enabled",
+     (void *)R_PREVIEW_JPG},
+
        {"yafrayGIMethod",
         (getter)RenderData_getYafrayGIMethod, (setter)RenderData_setYafrayGIMethod,
         "Global illumination method",