diff options
author | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 13:09:00 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2012-01-19 13:09:00 +0400 |
commit | 879c13bbfc79d997ce9148d24c26704fbe6e3b50 (patch) | |
tree | c63d74cd192ce04073d59f196f5525afa80b48d1 /source/blender/editors | |
parent | 4786541285f6f190922ec9857753d620c528f181 (diff) |
rename rgb_float_to_byte, rgb_byte_to_float to rgb_float_to_uchar, rgb_uchar_to_float and swap args (math functions mostly have dest arg first like strcpy).
Diffstat (limited to 'source/blender/editors')
4 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index f0f3b8f4123..a0082b3258f 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -186,7 +186,7 @@ static void acf_generic_channel_color(bAnimContext *ac, bAnimListElem *ale, floa } /* copy the colors over, transforming from bytes to floats */ - rgb_byte_to_float(cp, color); + rgb_uchar_to_float(color, cp); } else { // FIXME: what happens when the indention is 1 greater than what it should be (due to grouping)? diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c index 176ffd91e3b..511f1524fae 100644 --- a/source/blender/editors/space_sequencer/sequencer_draw.c +++ b/source/blender/editors/space_sequencer/sequencer_draw.c @@ -143,7 +143,7 @@ static void get_seq_color3ubv(Scene *curscene, Sequence *seq, unsigned char col[ case SEQ_COLOR: if (colvars->col) { - rgb_float_to_byte(colvars->col, col); + rgb_float_to_uchar(col, colvars->col); } else { col[0] = col[1] = col[2] = 128; } diff --git a/source/blender/editors/space_view3d/drawarmature.c b/source/blender/editors/space_view3d/drawarmature.c index 17cb1ce2995..2d77ab20808 100644 --- a/source/blender/editors/space_view3d/drawarmature.c +++ b/source/blender/editors/space_view3d/drawarmature.c @@ -1966,7 +1966,7 @@ static void draw_pose_bones(Scene *scene, View3D *v3d, ARegion *ar, Base *base, unsigned char col[4]; float col_f[4]; glGetFloatv(GL_CURRENT_COLOR, col_f); /* incase this is not set below */ - rgb_float_to_byte(col_f, col); + rgb_float_to_uchar(col, col_f); col[3]= 255; if (v3d->zbuf) glDisable(GL_DEPTH_TEST); diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index 193f9b1f49f..441665377c7 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -4100,7 +4100,7 @@ static void draw_new_particle_system(Scene *scene, View3D *v3d, RegionView3D *rv if(v3d->zbuf) glDepthMask(1); if((ma) && (part->draw_col == PART_DRAW_COL_MAT)) { - rgb_float_to_byte(&(ma->r), tcol); + rgb_float_to_uchar(tcol, &(ma->r)); copy_v3_v3(ma_col, &ma->r); } @@ -6152,7 +6152,7 @@ static void drawRBpivot(bRigidBodyJointConstraint *data) float curcol[4]; unsigned char tcol[4]; glGetFloatv(GL_CURRENT_COLOR, curcol); - rgb_float_to_byte(curcol, tcol); + rgb_float_to_uchar(tcol, curcol); tcol[3]= 255; eul_to_mat4(mat,&data->axX); @@ -6775,7 +6775,7 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) float curcol[4]; unsigned char tcol[4]; glGetFloatv(GL_CURRENT_COLOR, curcol); - rgb_float_to_byte(curcol, tcol); + rgb_float_to_uchar(tcol, curcol); tcol[3]= 255; view3d_cached_text_draw_add(zero, ob->id.name+2, 10, 0, tcol); } |