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:
authorWillian Padovani Germano <wpgermano@gmail.com>2003-05-21 23:58:31 +0400
committerWillian Padovani Germano <wpgermano@gmail.com>2003-05-21 23:58:31 +0400
commit89e9090c861839e7f4289c13f26ab12d4b503610 (patch)
treed9127dc65337136f6f2fc39da0ad44dc046e99dc /source/blender/python/api2_2x/Camera.h
parent000f92e204b54d117789209b00fee88f279be6e1 (diff)
Implemented the compare callback for Camera, Image, Lamp and Text types:
Following a suggestion made by Jordi Rovira i Bonet, the comparison now is made via the pointers to the Blender objects, not their py wrappers.
Diffstat (limited to 'source/blender/python/api2_2x/Camera.h')
-rw-r--r--source/blender/python/api2_2x/Camera.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/python/api2_2x/Camera.h b/source/blender/python/api2_2x/Camera.h
index 94a70313b89..419cd9f0f6d 100644
--- a/source/blender/python/api2_2x/Camera.h
+++ b/source/blender/python/api2_2x/Camera.h
@@ -192,6 +192,7 @@ static void CameraDeAlloc (C_Camera *self);
static int CameraPrint (C_Camera *self, FILE *fp, int flags);
static int CameraSetAttr (C_Camera *self, char *name, PyObject *v);
static PyObject *CameraGetAttr (C_Camera *self, char *name);
+static int CameraCompare (C_Camera *a, C_Camera *b);
static PyObject *CameraRepr (C_Camera *self);
/*****************************************************************************/
@@ -218,7 +219,7 @@ static PyTypeObject Camera_Type =
(printfunc)CameraPrint, /* tp_print */
(getattrfunc)CameraGetAttr, /* tp_getattr */
(setattrfunc)CameraSetAttr, /* tp_setattr */
- 0, /* tp_compare */
+ (cmpfunc)CameraCompare, /* tp_compare */
(reprfunc)CameraRepr, /* tp_repr */
0, /* tp_as_number */
0, /* tp_as_sequence */