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:
Diffstat (limited to 'source/blender/python/api2_2x/Image.c')
-rw-r--r--source/blender/python/api2_2x/Image.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/python/api2_2x/Image.c b/source/blender/python/api2_2x/Image.c
index 9d679672f78..56eec3caebb 100644
--- a/source/blender/python/api2_2x/Image.c
+++ b/source/blender/python/api2_2x/Image.c
@@ -318,6 +318,20 @@ static int ImageSetAttr (C_Image *self, char *name, PyObject *value)
}
/*****************************************************************************/
+/* Function: ImageCompare */
+/* Description: This is a callback function for the C_Image type. It */
+/* compares two Image_Type objects. Only the "==" and "!=" */
+/* comparisons are meaninful. Returns 0 for equality and -1 if */
+/* they don't point to the same Blender Image struct. */
+/* In Python it becomes 1 if they are equal, 0 otherwise. */
+/*****************************************************************************/
+static int ImageCompare (C_Image *a, C_Image *b)
+{
+ Image *pa = a->image, *pb = b->image;
+ return (pa == pb) ? 0:-1;
+}
+
+/*****************************************************************************/
/* Function: ImagePrint */
/* Description: This is a callback function for the C_Image type. It */
/* builds a meaninful string to 'print' image objects. */