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:
authorTon Roosendaal <ton@blender.org>2006-01-24 13:35:43 +0300
committerTon Roosendaal <ton@blender.org>2006-01-24 13:35:43 +0300
commita126178fd8eade4d7facdeb58bdd6592316e7f0a (patch)
treef4e0940c9cfe20685f1ae4e590c58e777549ba93 /source/blender/blenkernel/intern/colortools.c
parent4db91f978488acf6db6d84345545f011e74c6cd9 (diff)
Orange: made Image window react nicer to compositor output and own Curves;
- Image curves are only applied now when curves panel is in use. Closing the panel will disable curves, reopen Panel enable curves. You can minimize the Curves panel to keep it active. That latter then works as visualization curves are being applied. - Compositor output now also uses Image window curves, if active.
Diffstat (limited to 'source/blender/blenkernel/intern/colortools.c')
-rw-r--r--source/blender/blenkernel/intern/colortools.c27
1 files changed, 27 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 5b4c4ca107f..f9854fae98c 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -569,6 +569,8 @@ void curvemapping_do_image(CurveMapping *cumap, Image *ima)
return;
if(ima->ibuf->rect_float==NULL)
IMB_float_from_rect(ima->ibuf);
+ else if(ima->ibuf->rect==NULL)
+ imb_addrectImBuf(ima->ibuf);
curvemapping_premultiply(cumap, 0);
@@ -588,3 +590,28 @@ void curvemapping_do_image(CurveMapping *cumap, Image *ima)
curvemapping_premultiply(cumap, 1);
}
+
+int curvemapping_RGBA_does_something(CurveMapping *cumap)
+{
+ int a;
+
+ if(cumap->black[0]!=0.0f) return 1;
+ if(cumap->black[1]!=0.0f) return 1;
+ if(cumap->black[2]!=0.0f) return 1;
+ if(cumap->white[0]!=1.0f) return 1;
+ if(cumap->white[1]!=1.0f) return 1;
+ if(cumap->white[2]!=1.0f) return 1;
+
+ for(a=0; a<CM_TOT; a++) {
+ if(cumap->cm[a].curve) {
+ if(cumap->cm[a].totpoint!=2) return 1;
+
+ if(cumap->cm[a].curve[0].x != 0.0f) return 1;
+ if(cumap->cm[a].curve[0].y != 0.0f) return 1;
+ if(cumap->cm[a].curve[1].x != 1.0f) return 1;
+ if(cumap->cm[a].curve[1].y != 1.0f) return 1;
+ }
+ }
+ return 0;
+}
+