diff options
author | Ton Roosendaal <ton@blender.org> | 2006-01-11 00:41:37 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2006-01-11 00:41:37 +0300 |
commit | d594594cbe9c9eb3bc3c8a7708601e68693d324d (patch) | |
tree | f8d7156197e1d5d5e27156d0dbe11a8b94671bf0 /source/blender/src/butspace.c | |
parent | a0a3597b8b0d5be7a9161046cb1f8b4a60f44a35 (diff) |
Orange: more work on float/exr buffers;
- EXR now saves and reads Zbuffers correctly
- EXR reading didn't set alpha to 1 yet when no alpha buffer was present
- ImageWindow: the "black point" only checked for the r value... now is OK
- ImageWindow: Curves panal has button "reset"
- ImageWindow: hold LMB drag shows rgba and z values. With SHIFT or CTRL it
applies black/white point whilte dragging too
- ImageWindow: saving file copied the entire buffer... removed that. Also
made the header print clear; this save only saves in own file type.
- Curves: zoom and drag now gets clamped by the Clipping value
- Imbuf: duplicate buffer only copied one quarter of to new buffer
Diffstat (limited to 'source/blender/src/butspace.c')
-rw-r--r-- | source/blender/src/butspace.c | 29 |
1 files changed, 21 insertions, 8 deletions
diff --git a/source/blender/src/butspace.c b/source/blender/src/butspace.c index 84d051c887a..0041f49f018 100644 --- a/source/blender/src/butspace.c +++ b/source/blender/src/butspace.c @@ -262,16 +262,29 @@ static void curvemap_buttons_zoom_in(void *cumap_v, void *unused) static void curvemap_buttons_zoom_out(void *cumap_v, void *unused) { CurveMapping *cumap = cumap_v; - float d; + float d, d1; - /* we allow 20 times zoom */ + /* we allow 20 times zoom, but dont view outside clip */ if( (cumap->curr.xmax - cumap->curr.xmin) < 20.0f*(cumap->clipr.xmax - cumap->clipr.xmin) ) { - d= 0.15f*(cumap->curr.xmax - cumap->curr.xmin); - cumap->curr.xmin-= d; - cumap->curr.xmax+= d; - d= 0.15f*(cumap->curr.ymax - cumap->curr.ymin); - cumap->curr.ymin-= d; - cumap->curr.ymax+= d; + d= d1= 0.15f*(cumap->curr.xmax - cumap->curr.xmin); + + if(cumap->curr.xmin-d < cumap->clipr.xmin) + d1= cumap->curr.xmin - cumap->clipr.xmin; + cumap->curr.xmin-= d1; + + if(cumap->curr.xmax+d > cumap->clipr.xmax) + d1= -cumap->curr.xmax + cumap->clipr.xmax; + cumap->curr.xmax+= d1; + + d= d1= 0.15f*(cumap->curr.ymax - cumap->curr.ymin); + + if(cumap->curr.ymin-d < cumap->clipr.ymin) + d1= cumap->curr.ymin - cumap->clipr.ymin; + cumap->curr.ymin-= d1; + + if(cumap->curr.ymax+d > cumap->clipr.ymax) + d1= -cumap->curr.ymax + cumap->clipr.ymax; + cumap->curr.ymax+= d1; } } |