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:
authorCampbell Barton <ideasman42@gmail.com>2011-12-24 08:58:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-24 08:58:01 +0400
commitb42497b46031b4960d1efb79faf5a1fedd3546bb (patch)
treeed3e6d7600db781d69df0ad77b67968e9dbd9c0a /source/blender/python/mathutils/mathutils_Color.c
parenteb3beca8d4a1c5073992d3f8a30d4e87e4f29430 (diff)
mathutils get/set function rename + minor changes to matrix functions (no functional changes)
Diffstat (limited to 'source/blender/python/mathutils/mathutils_Color.c')
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c
index e0a0deb9a0e..59fc656a380 100644
--- a/source/blender/python/mathutils/mathutils_Color.c
+++ b/source/blender/python/mathutils/mathutils_Color.c
@@ -670,18 +670,18 @@ static PyNumberMethods Color_NumMethods = {
};
/* color channel, vector.r/g/b */
-static PyObject *Color_getChannel(ColorObject * self, void *type)
+static PyObject *Color_channel_get(ColorObject * self, void *type)
{
return Color_item(self, GET_INT_FROM_POINTER(type));
}
-static int Color_setChannel(ColorObject * self, PyObject *value, void * type)
+static int Color_channel_set(ColorObject * self, PyObject *value, void * type)
{
return Color_ass_item(self, GET_INT_FROM_POINTER(type), value);
}
/* color channel (HSV), color.h/s/v */
-static PyObject *Color_getChannelHSV(ColorObject * self, void *type)
+static PyObject *Color_channel_hsv_get(ColorObject * self, void *type)
{
float hsv[3];
int i= GET_INT_FROM_POINTER(type);
@@ -694,7 +694,7 @@ static PyObject *Color_getChannelHSV(ColorObject * self, void *type)
return PyFloat_FromDouble(hsv[i]);
}
-static int Color_setChannelHSV(ColorObject * self, PyObject *value, void * type)
+static int Color_channel_hsv_set(ColorObject * self, PyObject *value, void * type)
{
float hsv[3];
int i= GET_INT_FROM_POINTER(type);
@@ -722,7 +722,7 @@ static int Color_setChannelHSV(ColorObject * self, PyObject *value, void * type)
}
/* color channel (HSV), color.h/s/v */
-static PyObject *Color_getHSV(ColorObject * self, void *UNUSED(closure))
+static PyObject *Color_hsv_get(ColorObject * self, void *UNUSED(closure))
{
float hsv[3];
PyObject *ret;
@@ -739,7 +739,7 @@ static PyObject *Color_getHSV(ColorObject * self, void *UNUSED(closure))
return ret;
}
-static int Color_setHSV(ColorObject * self, PyObject *value, void *UNUSED(closure))
+static int Color_hsv_set(ColorObject * self, PyObject *value, void *UNUSED(closure))
{
float hsv[3];
@@ -762,18 +762,18 @@ static int Color_setHSV(ColorObject * self, PyObject *value, void *UNUSED(closur
/* Python attributes get/set structure: */
/*****************************************************************************/
static PyGetSetDef Color_getseters[] = {
- {(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 *)"r", (getter)Color_channel_get, (setter)Color_channel_set, (char *)"Red color channel.\n\n:type: float", (void *)0},
+ {(char *)"g", (getter)Color_channel_get, (setter)Color_channel_set, (char *)"Green color channel.\n\n:type: float", (void *)1},
+ {(char *)"b", (getter)Color_channel_get, (setter)Color_channel_set, (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 *)"h", (getter)Color_channel_hsv_get, (setter)Color_channel_hsv_set, (char *)"HSV Hue component in [0, 1].\n\n:type: float", (void *)0},
+ {(char *)"s", (getter)Color_channel_hsv_get, (setter)Color_channel_hsv_set, (char *)"HSV Saturation component in [0, 1].\n\n:type: float", (void *)1},
+ {(char *)"v", (getter)Color_channel_hsv_get, (setter)Color_channel_hsv_set, (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 *)"hsv", (getter)Color_hsv_get, (setter)Color_hsv_set, (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},
+ {(char *)"is_wrapped", (getter)BaseMathObject_is_wrapped_get, (setter)NULL, BaseMathObject_is_wrapped_doc, NULL},
+ {(char *)"owner", (getter)BaseMathObject_owner_get, (setter)NULL, BaseMathObject_owner_doc, NULL},
{NULL, NULL, NULL, NULL, NULL} /* Sentinel */
};