Index: source/blender/python/api2_2x/doc/Object.py =================================================================== --- source/blender/python/api2_2x/doc/Object.py (revision 15590) +++ source/blender/python/api2_2x/doc/Object.py (working copy) @@ -374,6 +374,8 @@ @type matrixOldWorld: Matrix @ivar matrixWorld: Same as L{mat}. Read-only. @type matrixWorld: Matrix + @ivar negativeScale: Value is true if the object has negative scale. For mesh objects negative scale will cause the normals of the mesh to be flipped when the matrix (see L{matrix}) is applied to the mesh. + @type negativeScale: boolean @ivar colbits: The Material usage mask. A set bit #n means: the Material #n in the Object's material list is used. Otherwise, the Material #n of the Objects Data material list is displayed. Index: source/blender/python/api2_2x/Object.c =================================================================== --- source/blender/python/api2_2x/Object.c (revision 15590) +++ source/blender/python/api2_2x/Object.c (working copy) @@ -4436,6 +4436,19 @@ GET_INT_FROM_POINTER(type), 'h' ); } +static PyObject *Object_getNegativeScale( BPy_Object *self, void *type) +{ + float vec[3]; + + /* test object matrix for negative scale */ + Crossf(vec, self->object->obmat[0], self->object->obmat[1]); + if (Inpf(vec, self->object->obmat[2]) < 0){ + return EXPP_incr_ret_True(); + }else{ + return EXPP_incr_ret_False(); + } +} + static PyObject *Object_getLayers( BPy_Object * self ) { int layers, bit; @@ -4990,6 +5003,10 @@ (getter)Object_getMatrixOldWorld, (setter)NULL, "old-type worldspace matrix (prior to Blender 2.34)", NULL}, + {"negativeScale", + (getter)Object_getNegativeScale, (setter)NULL, + "Value is true if the object has negative scale", + NULL}, {"data", (getter)get_obj_data, (setter)NULL, "The Datablock object linked to this object",