diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2011-11-13 22:03:27 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2011-11-13 22:03:27 +0400 |
commit | fea58943ecf32daa5bd828656d5e1157e6de984a (patch) | |
tree | 34a57950730971670ff3b9fae32826609a41363e /source/blender/makesdna | |
parent | c491b8bf459bcb3bdc1e73fbe3c1f95ff096c335 (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/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_node_types.h | 6 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_texture_types.h | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_node_types.h b/source/blender/makesdna/DNA_node_types.h index 07c2885eff7..1897f8a0353 100644 --- a/source/blender/makesdna/DNA_node_types.h +++ b/source/blender/makesdna/DNA_node_types.h @@ -376,9 +376,10 @@ typedef struct NodeVertexCol { /* qdn: Defocus blur node */ typedef struct NodeDefocus { - char bktype, rotation, preview, gamco; + char bktype, pad_c1, preview, gamco; short samples, no_zbuf; float fstop, maxblur, bthresh, scale; + float rotation, pad_f1; } NodeDefocus; typedef struct NodeScriptDict { @@ -389,8 +390,9 @@ typedef struct NodeScriptDict { /* qdn: glare node */ typedef struct NodeGlare { char quality, type, iter; - char angle, angle_ofs, size, pad[2]; + char angle, pad_c1, size, pad[2]; float colmod, mix, threshold, fade; + float angle_ofs, pad_f1; } NodeGlare; /* qdn: tonemap node */ diff --git a/source/blender/makesdna/DNA_texture_types.h b/source/blender/makesdna/DNA_texture_types.h index ece99c8fc86..619df428f7c 100644 --- a/source/blender/makesdna/DNA_texture_types.h +++ b/source/blender/makesdna/DNA_texture_types.h @@ -278,7 +278,7 @@ typedef struct Tex { } Tex; -/* used for mapping and texture nodes. note: rot is in degrees */ +/* used for mapping and texture nodes. note: rot is now in radians */ typedef struct TexMapping { float loc[3], rot[3], size[3]; |