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>2012-05-26 15:01:01 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-05-26 15:01:01 +0400
commit63788b47d6e805a97aac1501d3e64e1ada7e40b3 (patch)
tree4a0f33da8af8081ec87cc9846dc83cc39f8b2289 /source/blender/python/mathutils
parente727056c2e34857dd5556e66c9858506eb63e987 (diff)
add vector versions of hsv_to_rgb, rgb_to_hsv & rgb_to_hsv_compat
Diffstat (limited to 'source/blender/python/mathutils')
-rw-r--r--source/blender/python/mathutils/mathutils_Color.c6
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;