svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / gameengine / VideoTexture / ImageMix.cpp
index 2560467c3db4d08f7f85b7916945def3f7adb099..573daef88da9505db60b0d19cbc0ed1a5a1f963b 100644 (file)
@@ -1,4 +1,6 @@
-/* $Id$
+/** \file gameengine/VideoTexture/ImageMix.cpp
+ *  \ingroup bgevideotex
+ */
 -----------------------------------------------------------------------------
 This source file is part of VideoTexture library
 
@@ -63,7 +65,7 @@ ExceptionID ImageSizesNotMatch;
 ExpDesc ImageSizesNotMatchDesc (ImageSizesNotMatch, "Image sizes of sources are different");
 
 // calculate image from sources and set its availability
-void ImageMix::calcImage (unsigned int texId)
+void ImageMix::calcImage (unsigned int texId, double ts)
 {
        // check source sizes
        if (!checkSourceSizes()) THRWEXCP(ImageSizesNotMatch, S_OK);
@@ -132,7 +134,7 @@ PyObject * setWeight (PyImage * self, PyObject * args)
                if (!getImageMix(self)->setWeight(id, weight))
                {
                        // if not set, report error
-                       PyErr_SetString(PyExc_RuntimeError, "Invalid id of source");;
+                       PyErr_SetString(PyExc_RuntimeError, "Invalid id of source");
                        return NULL;
                }
        // return none
@@ -154,6 +156,7 @@ static PyMethodDef imageMixMethods[] =
 // attributes structure
 static PyGetSetDef imageMixGetSets[] =
 { // attributes from ImageBase class
+       {(char*)"valid", (getter)Image_valid, NULL, (char*)"bool to tell if an image is available", NULL},
        {(char*)"image", (getter)Image_getImage, NULL, (char*)"image data", NULL},
        {(char*)"size", (getter)Image_getSize, NULL, (char*)"image size", NULL},
        {(char*)"scale", (getter)Image_getScale, (setter)Image_setScale, (char*)"fast scale of image (near neighbour)", NULL},
@@ -184,7 +187,7 @@ PyTypeObject ImageMixType =
        0,                         /*tp_str*/
        0,                         /*tp_getattro*/
        0,                         /*tp_setattro*/
-       0,                         /*tp_as_buffer*/
+       &imageBufferProcs,         /*tp_as_buffer*/
        Py_TPFLAGS_DEFAULT,        /*tp_flags*/
        "Image mixer",       /* tp_doc */
        0,                             /* tp_traverse */