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:
authorJeroen Bakker <j.bakker@atmind.nl>2012-05-21 18:05:47 +0400
committerJeroen Bakker <j.bakker@atmind.nl>2012-05-21 18:05:47 +0400
commitc55bb6eae27142a34446440ef3433d5bd7597598 (patch)
tree748dd558cf0b475517acf03e08d80516dae7395c /source/blender/compositor/operations/COM_BokehImageOperation.cpp
parentc3e1fce77552b5626d2939710cb6d0020891d218 (diff)
* Bokeh Image angle now has rnge from -720 to +720 degrees
Diffstat (limited to 'source/blender/compositor/operations/COM_BokehImageOperation.cpp')
-rw-r--r--source/blender/compositor/operations/COM_BokehImageOperation.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/compositor/operations/COM_BokehImageOperation.cpp b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
index 4bc738052f6..0279b9a5bdf 100644
--- a/source/blender/compositor/operations/COM_BokehImageOperation.cpp
+++ b/source/blender/compositor/operations/COM_BokehImageOperation.cpp
@@ -38,7 +38,10 @@ void BokehImageOperation::initExecution()
this->circularDistance = getWidth()/2;
this->flapRad = (M_PI*2)/this->data->flaps;
this->flapRadAdd = (this->data->angle/360.0)*M_PI*2;
- if (this->flapRadAdd>M_PI) {
+ while (this->flapRadAdd<0.0f) {
+ this->flapRadAdd+=M_PI*2;
+ }
+ while (this->flapRadAdd>M_PI) {
this->flapRadAdd-=M_PI*2;
}
}