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>2013-12-03 23:09:25 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2013-12-03 23:35:45 +0400
commit46eef60d93fd0d52ed4b94750f7a3248db5594ee (patch)
tree234bd4dba7f241afec6e8c1a4057fb886b37878c /source/blender/compositor
parent462751688449108899a821f500cffc03658d6e3d (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/compositor')
-rw-r--r--source/blender/compositor/nodes/COM_DefocusNode.cpp2
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_BoxMaskOperation.cpp2
-rw-r--r--source/blender/compositor/operations/COM_EllipseMaskOperation.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/source/blender/compositor/nodes/COM_DefocusNode.cpp b/source/blender/compositor/nodes/COM_DefocusNode.cpp
index b6dd0e526ae..c2bd8997525 100644
--- a/source/blender/compositor/nodes/COM_DefocusNode.cpp
+++ b/source/blender/compositor/nodes/COM_DefocusNode.cpp
@@ -85,7 +85,7 @@ void DefocusNode::convertToOperations(ExecutionSystem *graph, CompositorContext
BokehImageOperation *bokeh = new BokehImageOperation();
NodeBokehImage *bokehdata = new NodeBokehImage();
- bokehdata->angle = RAD2DEGF(data->rotation);
+ bokehdata->angle = data->rotation;
bokehdata->rounding = 0.0f;
bokehdata->flaps = data->bktype;
if (data->bktype < 3) {
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 82de750de72..6617fc62ab8 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -35,7 +35,7 @@ void BokehImageOperation::initExecution()
this->m_inverseRounding = 1.0f - this->m_data->rounding;
this->m_circularDistance = getWidth() / 2;
this->m_flapRad = (float)(M_PI * 2) / this->m_data->flaps;
- this->m_flapRadAdd = (this->m_data->angle / 360.0f) * (float)(M_PI * 2.0);
+ this->m_flapRadAdd = this->m_data->angle;
while (this->m_flapRadAdd < 0.0f) {
this->m_flapRadAdd += (float)(M_PI * 2.0);
}
diff --git a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
index 4dd92aec4c8..4e956905311 100644
--- a/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_BoxMaskOperation.cpp
@@ -38,7 +38,7 @@ void BoxMaskOperation::initExecution()
{
this->m_inputMask = this->getInputSocketReader(0);
this->m_inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD((double)this->m_data->rotation);
+ const double rad = (double)this->m_data->rotation;
this->m_cosine = cos(rad);
this->m_sine = sin(rad);
this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();
diff --git a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
index d7cc2ec9272..bc1a6848a57 100644
--- a/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
+++ b/source/blender/compositor/operations/COM_EllipseMaskOperation.cpp
@@ -38,7 +38,7 @@ void EllipseMaskOperation::initExecution()
{
this->m_inputMask = this->getInputSocketReader(0);
this->m_inputValue = this->getInputSocketReader(1);
- const double rad = DEG2RAD((double)this->m_data->rotation);
+ const double rad = (double)this->m_data->rotation;
this->m_cosine = cos(rad);
this->m_sine = sin(rad);
this->m_aspectRatio = ((float)this->getWidth()) / this->getHeight();