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:
authorBastien Montagne <montagne29@wanadoo.fr>2011-11-13 22:03:27 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2011-11-13 22:03:27 +0400
commitfea58943ecf32daa5bd828656d5e1157e6de984a (patch)
tree34a57950730971670ff3b9fae32826609a41363e /source/blender/blenkernel/intern/texture.c
parentc491b8bf459bcb3bdc1e73fbe3c1f95ff096c335 (diff)
Moving all node angle-type values to radians. This also fixes [#29151] rotate node wrong input (mixing up radians and degrees).
Warning! Angles in nodes have just been moved to consistant Radians values (ANGLE subtype of RNA Float property). You will still see them as degrees in the GUI, though, unless you chose otherwise in Scene properties, Units panel. Conversion from degrees to radians for old files is obviously done at loading time, but if you use a mixed pipeline of trunk and releases, be carefull! Loading a 2.60.4 file (or higher) into any previous version of Blender, your angles in nodes will have odd values (well, radians interpreted as degrees)! And if you save such file in a pre-2.60.4 version, the angle node values will be converted again when loaded in Blender 2.60.4 or higher... This affects following nodes: * Compo: Rotate, Defocus, ChromaMatte, Glare and DirectionalBlur * Shader: Mapping And all future code using the TexMapping struct’s rotation part (its rot memember is now in radians).
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index fcaeacd2eb4..db4d09e38b3 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -229,7 +229,7 @@ void default_tex_mapping(TexMapping *texmap)
void init_tex_mapping(TexMapping *texmap)
{
- float eul[3], smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
+ float smat[3][3], rmat[3][3], mat[3][3], proj[3][3];
if(texmap->projx == PROJ_X && texmap->projy == PROJ_Y && texmap->projz == PROJ_Z &&
is_zero_v3(texmap->loc) && is_zero_v3(texmap->rot) && is_one_v3(texmap->size)) {
@@ -252,10 +252,8 @@ void init_tex_mapping(TexMapping *texmap)
size_to_mat3(smat, texmap->size);
/* rotation */
- eul[0]= DEG2RADF(texmap->rot[0]);
- eul[1]= DEG2RADF(texmap->rot[1]);
- eul[2]= DEG2RADF(texmap->rot[2]);
- eul_to_mat3( rmat,eul);
+ /* XXX TexMapping rotation are now in radians. */
+ eul_to_mat3(rmat, texmap->rot);
/* compose it all */
mul_m3_m3m3(mat, rmat, smat);