Changeset View
Changeset View
Standalone View
Standalone View
source/blender/python/mathutils/mathutils_Color.c
| Context not available. | |||||
| } | } | ||||
| } | } | ||||
| /* -----------------PROTCOL DECLARATIONS-------------------------- */ | /* -----------------PROTOCOL DECLARATIONS-------------------------- */ | ||||
| static PySequenceMethods Color_SeqMethods = { | static PySequenceMethods Color_SeqMethods = { | ||||
| (lenfunc) Color_len, /* sq_length */ | (lenfunc) Color_len, /* sq_length */ | ||||
| (binaryfunc) NULL, /* sq_concat */ | (binaryfunc) NULL, /* sq_concat */ | ||||
| Context not available. | |||||
| } | } | ||||
| PyErr_Format(PyExc_TypeError, | PyErr_Format(PyExc_TypeError, | ||||
| "Color multiplication: not supported between " | "Color division: not supported between " | ||||
| "'%.200s' and '%.200s' types", | "'%.200s' and '%.200s' types", | ||||
| Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); | Py_TYPE(v1)->tp_name, Py_TYPE(v2)->tp_name); | ||||
| return NULL; | return NULL; | ||||
| Context not available. | |||||
| return v1; | return v1; | ||||
| } | } | ||||
| /* multiplication in-place: obj *= obj */ | /* division in-place: obj /= obj */ | ||||
| static PyObject *Color_idiv(PyObject *v1, PyObject *v2) | static PyObject *Color_idiv(PyObject *v1, PyObject *v2) | ||||
| { | { | ||||
| ColorObject *color = (ColorObject *)v1; | ColorObject *color = (ColorObject *)v1; | ||||
| Context not available. | |||||
| {NULL, NULL, 0, NULL} | {NULL, NULL, 0, NULL} | ||||
| }; | }; | ||||
| /* ------------------PY_OBECT DEFINITION-------------------------- */ | /* ------------------PY_OBJECT DEFINITION-------------------------- */ | ||||
| PyDoc_STRVAR(color_doc, | PyDoc_STRVAR(color_doc, | ||||
| ".. class:: Color(rgb)\n" | ".. class:: Color(rgb)\n" | ||||
| "\n" | "\n" | ||||
| Context not available. | |||||