diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-05-26 15:01:01 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-05-26 15:01:01 +0400 |
commit | 63788b47d6e805a97aac1501d3e64e1ada7e40b3 (patch) | |
tree | 4a0f33da8af8081ec87cc9846dc83cc39f8b2289 /source/blender/python | |
parent | e727056c2e34857dd5556e66c9858506eb63e987 (diff) |
add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compat
Diffstat (limited to 'source/blender/python')
-rw-r--r-- | source/blender/python/mathutils/mathutils_Color.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/python/mathutils/mathutils_Color.c b/source/blender/python/mathutils/mathutils_Color.c index 0f421f1ddea..59c57e916d4 100644 --- a/source/blender/python/mathutils/mathutils_Color.c +++ b/source/blender/python/mathutils/mathutils_Color.c @@ -723,10 +723,10 @@ static int Color_channel_hsv_set(ColorObject *self, PyObject *value, void *type) if (BaseMath_ReadCallback(self) == -1) return -1; - rgb_to_hsv(self->col[0], self->col[1], self->col[2], &(hsv[0]), &(hsv[1]), &(hsv[2])); + rgb_to_hsv_v(self->col, hsv); CLAMP(f, 0.0f, 1.0f); hsv[i] = f; - hsv_to_rgb(hsv[0], hsv[1], hsv[2], &(self->col[0]), &(self->col[1]), &(self->col[2])); + hsv_to_rgb_v(hsv, self->col); if (BaseMath_WriteCallback(self) == -1) return -1; @@ -764,7 +764,7 @@ static int Color_hsv_set(ColorObject *self, PyObject *value, void *UNUSED(closur CLAMP(hsv[1], 0.0f, 1.0f); CLAMP(hsv[2], 0.0f, 1.0f); - hsv_to_rgb(hsv[0], hsv[1], hsv[2], &(self->col[0]), &(self->col[1]), &(self->col[2])); + hsv_to_rgb_v(hsv, self->col); if (BaseMath_WriteCallback(self) == -1) return -1; |