|
Blender
V2.59
|
Go to the source code of this file.
Defines | |
| #define | COLOR_SIZE 3 |
Functions | |
| static PyObject * | Color_new (PyTypeObject *type, PyObject *args, PyObject *kwds) |
| static PyObject * | Color_ToTupleExt (ColorObject *self, int ndigits) |
| PyDoc_STRVAR (Color_copy_doc,".. function:: copy()\n""\n"" Returns a copy of this color.\n""\n"" :return: A copy of the color.\n"" :rtype: :class:`Color`\n""\n"" .. note:: use this to get a copy of a wrapped color with\n"" no reference to the original data.\n") | |
| static PyObject * | Color_copy (ColorObject *self) |
| static PyObject * | Color_repr (ColorObject *self) |
| static PyObject * | Color_richcmpr (PyObject *a, PyObject *b, int op) |
| static int | Color_len (ColorObject *UNUSED(self)) |
| static PyObject * | Color_item (ColorObject *self, int i) |
| static int | Color_ass_item (ColorObject *self, int i, PyObject *value) |
| static PyObject * | Color_slice (ColorObject *self, int begin, int end) |
| static int | Color_ass_slice (ColorObject *self, int begin, int end, PyObject *seq) |
| static PyObject * | Color_subscript (ColorObject *self, PyObject *item) |
| static int | Color_ass_subscript (ColorObject *self, PyObject *item, PyObject *value) |
| static PyObject * | Color_add (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_iadd (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_sub (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_isub (PyObject *v1, PyObject *v2) |
| static PyObject * | color_mul_float (ColorObject *color, const float scalar) |
| static PyObject * | Color_mul (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_div (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_imul (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_idiv (PyObject *v1, PyObject *v2) |
| static PyObject * | Color_neg (ColorObject *self) |
| static PyObject * | Color_getChannel (ColorObject *self, void *type) |
| static int | Color_setChannel (ColorObject *self, PyObject *value, void *type) |
| static PyObject * | Color_getChannelHSV (ColorObject *self, void *type) |
| static int | Color_setChannelHSV (ColorObject *self, PyObject *value, void *type) |
| static PyObject * | Color_getHSV (ColorObject *self, void *UNUSED(closure)) |
| static int | Color_setHSV (ColorObject *self, PyObject *value, void *UNUSED(closure)) |
| PyDoc_STRVAR (color_doc,"This object gives access to Colors in Blender.") | |
| PyObject * | newColorObject (float *col, int type, PyTypeObject *base_type) |
| PyObject * | newColorObject_cb (PyObject *cb_user, int cb_type, int cb_subtype) |
Variables | |
| static PySequenceMethods | Color_SeqMethods |
| static PyMappingMethods | Color_AsMapping |
| static PyNumberMethods | Color_NumMethods |
| static PyGetSetDef | Color_getseters [] |
| static struct PyMethodDef | Color_methods [] |
| PyTypeObject | color_Type |
| #define COLOR_SIZE 3 |
Definition at line 37 of file mathutils_Color.c.
Referenced by Color_add(), Color_ass_item(), Color_ass_slice(), Color_ass_subscript(), Color_iadd(), Color_idiv(), Color_imul(), Color_isub(), Color_item(), Color_len(), color_mul_float(), Color_neg(), Color_new(), Color_richcmpr(), Color_slice(), Color_sub(), Color_subscript(), Color_ToTupleExt(), and newColorObject().
| static PyObject* Color_add | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 368 of file mathutils_Color.c.
References add_vn_vnvn(), BaseMath_ReadCallback, COLOR_SIZE, ColorObject_Check, newColorObject(), NULL, and Py_NEW.
| static int Color_ass_item | ( | ColorObject * | self, |
| int | i, | ||
| PyObject * | value | ||
| ) | [static] |
Definition at line 195 of file mathutils_Color.c.
References BaseMath_WriteIndexCallback, COLOR_SIZE, and i.
Referenced by Color_ass_subscript(), and Color_setChannel().
| static int Color_ass_slice | ( | ColorObject * | self, |
| int | begin, | ||
| int | end, | ||
| PyObject * | seq | ||
| ) | [static] |
Definition at line 245 of file mathutils_Color.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), COLOR_SIZE, i, mathutils_array_parse(), MIN2, and size().
Referenced by Color_ass_subscript().
| static int Color_ass_subscript | ( | ColorObject * | self, |
| PyObject * | item, | ||
| PyObject * | value | ||
| ) | [static] |
Definition at line 312 of file mathutils_Color.c.
References Color_ass_item(), Color_ass_slice(), COLOR_SIZE, and i.
| static PyObject* Color_copy | ( | ColorObject * | self | ) | [static] |
Definition at line 103 of file mathutils_Color.c.
References BaseMath_ReadCallback, newColorObject(), NULL, and Py_NEW.
| static PyObject* Color_div | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 511 of file mathutils_Color.c.
References BaseMath_ReadCallback, color_mul_float(), ColorObject_Check, and NULL.
| static PyObject* Color_getChannel | ( | ColorObject * | self, |
| void * | type | ||
| ) | [static] |
Definition at line 652 of file mathutils_Color.c.
References Color_item(), and GET_INT_FROM_POINTER.
| static PyObject* Color_getChannelHSV | ( | ColorObject * | self, |
| void * | type | ||
| ) | [static] |
Definition at line 663 of file mathutils_Color.c.
References BaseMath_ReadCallback, GET_INT_FROM_POINTER, i, NULL, and rgb_to_hsv().
| static PyObject* Color_getHSV | ( | ColorObject * | self, |
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 704 of file mathutils_Color.c.
References BaseMath_ReadCallback, NULL, and rgb_to_hsv().
| static PyObject* Color_iadd | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 391 of file mathutils_Color.c.
References add_vn_vn(), BaseMath_ReadCallback, BaseMath_WriteCallback, COLOR_SIZE, ColorObject_Check, and NULL.
| static PyObject* Color_idiv | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 570 of file mathutils_Color.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, MakeCursor::color, COLOR_SIZE, mul_vn_fl(), and NULL.
| static PyObject* Color_imul | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 545 of file mathutils_Color.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, MakeCursor::color, COLOR_SIZE, mul_vn_fl(), and NULL.
| static PyObject* Color_isub | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 438 of file mathutils_Color.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, COLOR_SIZE, ColorObject_Check, NULL, and sub_vn_vn().
| static PyObject* Color_item | ( | ColorObject * | self, |
| int | i | ||
| ) | [static] |
Definition at line 176 of file mathutils_Color.c.
References BaseMath_ReadIndexCallback, COLOR_SIZE, i, and NULL.
Referenced by Color_getChannel(), and Color_subscript().
| static int Color_len | ( | ColorObject * | UNUSEDself | ) | [static] |
Definition at line 170 of file mathutils_Color.c.
References COLOR_SIZE.
| static PyObject* Color_mul | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 469 of file mathutils_Color.c.
References BaseMath_ReadCallback, BLI_assert, color_mul_float(), ColorObject_Check, and NULL.
| static PyObject* color_mul_float | ( | ColorObject * | color, |
| const float | scalar | ||
| ) | [static] |
Definition at line 461 of file mathutils_Color.c.
References COLOR_SIZE, mul_vn_vn_fl(), newColorObject(), and Py_NEW.
Referenced by Color_div(), and Color_mul().
| static PyObject* Color_neg | ( | ColorObject * | self | ) | [static] |
Definition at line 602 of file mathutils_Color.c.
References BaseMath_ReadCallback, COLOR_SIZE, negate_vn_vn(), newColorObject(), NULL, and Py_NEW.
| static PyObject* Color_new | ( | PyTypeObject * | type, |
| PyObject * | args, | ||
| PyObject * | kwds | ||
| ) | [static] |
Definition at line 41 of file mathutils_Color.c.
References COLOR_SIZE, mathutils_array_parse(), newColorObject(), NULL, and Py_NEW.
| static PyObject* Color_repr | ( | ColorObject * | self | ) | [static] |
Definition at line 114 of file mathutils_Color.c.
References BaseMath_ReadCallback, Color_ToTupleExt(), and NULL.
| static PyObject* Color_richcmpr | ( | PyObject * | a, |
| PyObject * | b, | ||
| int | op | ||
| ) | [static] |
Definition at line 131 of file mathutils_Color.c.
References BaseMath_ReadCallback, COLOR_SIZE, ColorObject_Check, EXPP_VectorsAreEqual(), and NULL.
| static int Color_setChannel | ( | ColorObject * | self, |
| PyObject * | value, | ||
| void * | type | ||
| ) | [static] |
Definition at line 657 of file mathutils_Color.c.
References Color_ass_item(), and GET_INT_FROM_POINTER.
| static int Color_setChannelHSV | ( | ColorObject * | self, |
| PyObject * | value, | ||
| void * | type | ||
| ) | [static] |
Definition at line 676 of file mathutils_Color.c.
References BaseMath_ReadCallback, BaseMath_WriteCallback, CLAMP(), GET_INT_FROM_POINTER, hsv_to_rgb(), i, and rgb_to_hsv().
| static int Color_setHSV | ( | ColorObject * | self, |
| PyObject * | value, | ||
| void * | UNUSEDclosure | ||
| ) | [static] |
Definition at line 721 of file mathutils_Color.c.
References BaseMath_WriteCallback, CLAMP(), hsv_to_rgb(), and mathutils_array_parse().
| static PyObject* Color_slice | ( | ColorObject * | self, |
| int | begin, | ||
| int | end | ||
| ) | [static] |
Definition at line 223 of file mathutils_Color.c.
References BaseMath_ReadCallback, CLAMP(), COLOR_SIZE, MIN2, and NULL.
Referenced by Color_subscript().
| static PyObject* Color_sub | ( | PyObject * | v1, |
| PyObject * | v2 | ||
| ) | [static] |
Definition at line 415 of file mathutils_Color.c.
References BaseMath_ReadCallback, COLOR_SIZE, ColorObject_Check, newColorObject(), NULL, Py_NEW, and sub_vn_vnvn().
| static PyObject* Color_subscript | ( | ColorObject * | self, |
| PyObject * | item | ||
| ) | [static] |
Definition at line 275 of file mathutils_Color.c.
References Color_item(), COLOR_SIZE, Color_slice(), i, and NULL.
| static PyObject* Color_ToTupleExt | ( | ColorObject * | self, |
| int | ndigits | ||
| ) | [static] |
Definition at line 71 of file mathutils_Color.c.
References COLOR_SIZE, double_round(), and i.
Referenced by Color_repr().
| PyObject* newColorObject | ( | float * | col, |
| int | type, | ||
| PyTypeObject * | base_type | ||
| ) |
Definition at line 825 of file mathutils_Color.c.
References COLOR_SIZE, copy_v3_v3(), NULL, Py_NEW, Py_WRAP, and zero_v3().
Referenced by Color_add(), Color_copy(), color_mul_float(), Color_neg(), Color_new(), Color_sub(), newColorObject_cb(), and pyrna_math_object_from_array().
| PyObject* newColorObject_cb | ( | PyObject * | cb_user, |
| int | cb_type, | ||
| int | cb_subtype | ||
| ) |
Definition at line 858 of file mathutils_Color.c.
References newColorObject(), and Py_NEW.
Referenced by pyrna_math_object_from_array().
| PyDoc_STRVAR | ( | Color_copy_doc | , |
| ".. function:: copy()\n""\n"" Returns a copy of this color.\n""\n"" :return: A copy of the color.\n"" :rtype: :class:`Color`\n""\n"" .. note:: use this to get a copy of a wrapped color with\n"" no reference to the original data.\n" | |||
| ) |
| PyDoc_STRVAR | ( | color_doc | , |
| "This object gives access to Colors in Blender." | |||
| ) |
PyMappingMethods Color_AsMapping [static] |
{
(lenfunc)Color_len,
(binaryfunc)Color_subscript,
(objobjargproc)Color_ass_subscript
}
Definition at line 358 of file mathutils_Color.c.
PyGetSetDef Color_getseters[] [static] |
{
{(char *)"r", (getter)Color_getChannel, (setter)Color_setChannel, (char *)"Red color channel.\n\n:type: float", (void *)0},
{(char *)"g", (getter)Color_getChannel, (setter)Color_setChannel, (char *)"Green color channel.\n\n:type: float", (void *)1},
{(char *)"b", (getter)Color_getChannel, (setter)Color_setChannel, (char *)"Blue color channel.\n\n:type: float", (void *)2},
{(char *)"h", (getter)Color_getChannelHSV, (setter)Color_setChannelHSV, (char *)"HSV Hue component in [0, 1].\n\n:type: float", (void *)0},
{(char *)"s", (getter)Color_getChannelHSV, (setter)Color_setChannelHSV, (char *)"HSV Saturation component in [0, 1].\n\n:type: float", (void *)1},
{(char *)"v", (getter)Color_getChannelHSV, (setter)Color_setChannelHSV, (char *)"HSV Value component in [0, 1].\n\n:type: float", (void *)2},
{(char *)"hsv", (getter)Color_getHSV, (setter)Color_setHSV, (char *)"HSV Values in [0, 1].\n\n:type: float triplet", (void *)0},
{(char *)"is_wrapped", (getter)BaseMathObject_getWrapped, (setter)NULL, BaseMathObject_Wrapped_doc, NULL},
{(char *)"owner", (getter)BaseMathObject_getOwner, (setter)NULL, BaseMathObject_Owner_doc, NULL},
{NULL, NULL, NULL, NULL, NULL}
}
Definition at line 743 of file mathutils_Color.c.
struct PyMethodDef Color_methods[] [static] |
{
{"__copy__", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc},
{"copy", (PyCFunction) Color_copy, METH_NOARGS, Color_copy_doc},
{NULL, NULL, 0, NULL}
}
Definition at line 761 of file mathutils_Color.c.
PyNumberMethods Color_NumMethods [static] |
Definition at line 614 of file mathutils_Color.c.
PySequenceMethods Color_SeqMethods [static] |
{
(lenfunc) Color_len,
(binaryfunc) NULL,
(ssizeargfunc) NULL,
(ssizeargfunc) Color_item,
NULL,
(ssizeobjargproc) Color_ass_item,
NULL,
(objobjproc) NULL,
(binaryfunc) NULL,
(ssizeargfunc) NULL,
}
Definition at line 345 of file mathutils_Color.c.
| PyTypeObject color_Type |
Definition at line 771 of file mathutils_Color.c.
Referenced by PyInit_mathutils().