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-03-18 00:39:28 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-03-18 00:39:28 +0400
commit91580c0929f96562895d262d621745956c3ad35e (patch)
tree7338f08f832189bca3b98e8e6308a0115b475de5 /source/blender/makesrna/intern/rna_mesh.c
parent8b7ea6fc90c43a7d2b04a5ced81614776bbba77c (diff)
swap BMLoopCol r/b color, requires subversion bump.
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol. Loading old files works, saving legacy format works too. What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge. (it wont crash but the blue and red will be swapped on vertex color layers).
Diffstat (limited to 'source/blender/makesrna/intern/rna_mesh.c')
-rw-r--r--source/blender/makesrna/intern/rna_mesh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c
index ec56004f253..f7dee561250 100644
--- a/source/blender/makesrna/intern/rna_mesh.c
+++ b/source/blender/makesrna/intern/rna_mesh.c
@@ -432,18 +432,18 @@ static void rna_MeshLoopColor_color_get(PointerRNA *ptr, float *values)
{
MLoopCol *mcol = (MLoopCol *)ptr->data;
- values[2] = (&mcol->r)[0]/255.0f;
- values[1] = (&mcol->r)[1]/255.0f;
- values[0] = (&mcol->r)[2]/255.0f;
+ values[0] = (&mcol->r)[0] / 255.0f;
+ values[1] = (&mcol->r)[1] / 255.0f;
+ values[2] = (&mcol->r)[2] / 255.0f;
}
static void rna_MeshLoopColor_color_set(PointerRNA *ptr, const float *values)
{
MLoopCol *mcol = (MLoopCol *)ptr->data;
- (&mcol->r)[2] = (char)(CLAMPIS(values[0]*255.0f, 0, 255));
- (&mcol->r)[1] = (char)(CLAMPIS(values[1]*255.0f, 0, 255));
- (&mcol->r)[0] = (char)(CLAMPIS(values[2]*255.0f, 0, 255));
+ (&mcol->r)[0] = (char)(CLAMPIS(values[0] * 255.0f, 0, 255));
+ (&mcol->r)[1] = (char)(CLAMPIS(values[1] * 255.0f, 0, 255));
+ (&mcol->r)[2] = (char)(CLAMPIS(values[2] * 255.0f, 0, 255));
}
static int rna_Mesh_texspace_editable(PointerRNA *ptr)