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
path: root/source
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2011-04-02 11:04:34 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-02 11:04:34 +0400
commit3bc59fe77130a6975c85d8be8606cb289d5b1e55 (patch)
tree0148992dfcd8b6fe3abca28496263c2232f6613b /source
parent7690086d20c58872659da30e1ee7ebf404681f46 (diff)
fix [#26732] Colorband bug with compositing.
reported on IRC but submitted to the tracker for example file reference.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/intern/texture.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index e8c4a21d041..5dbaee2a7b8 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -342,8 +342,11 @@ int do_colorband(ColorBand *coba, float in, float out[4])
if(cbd2->pos!=cbd1->pos)
fac= (in-cbd1->pos)/(cbd2->pos-cbd1->pos);
- else
- fac= 0.0f;
+ else {
+ /* was setting to 0.0 in 2.56 & previous, but this
+ * is incorrect for the last element, see [#26732] */
+ fac= (a != coba->tot) ? 0.0f : 1.0f;
+ }
if (coba->ipotype==4) {
/* constant */