diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-12-03 23:09:25 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-12-03 23:35:45 +0400 |
commit | 46eef60d93fd0d52ed4b94750f7a3248db5594ee (patch) | |
tree | 234bd4dba7f241afec6e8c1a4057fb886b37878c /source/blender/blenkernel/intern/sca.c | |
parent | 462751688449108899a821f500cffc03658d6e3d (diff) |
Cleanup: Internal degrees removal.
This patch changes most of the reamining degrees usage in internal code into radians.
I let a few which I know off asside, for reasons explained below - and I'm not sure to have found out all of them.
WARNING: this introduces forward incompatibility, which means files saved from this version won't open 100% correctly
in previous versions (a few angle properties would use radians values as degrees...).
Details:
- Data:
-- Lamp.spotsize: Game engine exposed this setting in degrees, to not break the API here I kept it as such
(using getter/setter functions), still using radians internally.
-- Mesh.smoothresh: Didn't touch to this one, as we will hopefully replace it completely by loop normals currently in dev.
- Modifiers:
-- EdgeSplitModifierData.split_angle, BevelModifierData.bevel_angle: Done.
- Postprocessing:
-- WipeVars.angle (sequencer's effect), NodeBokehImage.angle, NodeBoxMask.rotation, NodeEllipseMask.rotation: Done.
- BGE:
-- bConstraintActuator: Orientation type done (the minloc[0] & maxloc[0] cases). Did not touch to 'limit location' type,
it can also limit rotation, but it exposes through RNA the same limit_min/limit_max, which hence
can be either distance or angle values, depending on the mode. Will leave this to BGE team.
-- bSoundActuator.cone_outer_angle_3d, bSoundActuator.cone_inner_angle_3d: Done (note I kept degrees in BGE itself,
as it seems this is the expected value here...).
-- bRadarSensor.angle: Done.
Reviewers: brecht, campbellbarton, sergey, gaiaclary, dfelinto, moguri, jbakker, lukastoenne, howardt
Reviewed By: brecht, campbellbarton, sergey, gaiaclary, moguri, jbakker, lukastoenne, howardt
Thanks to all!
Differential Revision: http://developer.blender.org/D59
Diffstat (limited to 'source/blender/blenkernel/intern/sca.c')
-rw-r--r-- | source/blender/blenkernel/intern/sca.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/sca.c b/source/blender/blenkernel/intern/sca.c index 7c374fd5d78..b0b64cac802 100644 --- a/source/blender/blenkernel/intern/sca.c +++ b/source/blender/blenkernel/intern/sca.c @@ -44,6 +44,7 @@ #include "DNA_object_types.h" #include "BLI_blenlib.h" +#include "BLI_math.h" #include "BKE_global.h" #include "BKE_main.h" #include "BKE_library.h" @@ -405,8 +406,8 @@ void init_actuator(bActuator *act) sa->sound3D.rolloff_factor = 1.0f; sa->sound3D.reference_distance = 1.0f; sa->sound3D.max_gain = 1.0f; - sa->sound3D.cone_inner_angle = 360.0f; - sa->sound3D.cone_outer_angle = 360.0f; + sa->sound3D.cone_inner_angle = DEG2RADF(360.0f); + sa->sound3D.cone_outer_angle = DEG2RADF(360.0f); sa->sound3D.max_distance = FLT_MAX; break; case ACT_OBJECT: |