Orange: and now for the real exr fun: float buffer support in Image window!
Image as loaded in Blender (from openexr.com): http://www.blender.org/bf/exrcurve1.jpg Image with different white point: http://www.blender.org/bf/exrcurve2.jpg Image with white and black point and a curve: http://www.blender.org/bf/exrcurve3.jpg Use SHIFT+click to set the black point, and CTRL+click for white point. The buttons in the panel work too, of course. The curves work after the black/white range was corrected, so you can stick to curves with a normal 0-1 range. There's also now a general color curve, marked with 'C' button. Note; this currently only maps the float colors to a visible 8 bits per channel rect. You can save it, but when the blender file loads the curve or mapping is not executed until you click in the curves... have to look at that still. Speed for this is also quite unoptimized... still WIP, but fun!
This commit is contained in:
@@ -70,6 +70,7 @@
|
||||
#include "DNA_view3d_types.h"
|
||||
|
||||
#include "BKE_blender.h"
|
||||
#include "BKE_colortools.h"
|
||||
#include "BKE_curve.h"
|
||||
#include "BKE_depsgraph.h"
|
||||
#include "BKE_displist.h"
|
||||
@@ -3895,8 +3896,16 @@ static void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
/* Draw tool is inactive */
|
||||
switch(event) {
|
||||
case LEFTMOUSE:
|
||||
if(G.qual & LR_SHIFTKEY) mouseco_to_curtile();
|
||||
else gesture();
|
||||
if(G.qual & LR_SHIFTKEY) {
|
||||
if(G.sima->image && G.sima->image->tpageflag & IMA_TILES)
|
||||
mouseco_to_curtile();
|
||||
else
|
||||
sima_sample_color();
|
||||
}
|
||||
else if(G.f & G_FACESELECT)
|
||||
gesture();
|
||||
else
|
||||
sima_sample_color();
|
||||
break;
|
||||
case RIGHTMOUSE:
|
||||
if(G.f & G_FACESELECT)
|
||||
@@ -4665,6 +4674,11 @@ void freespacelist(ListBase *lb)
|
||||
else if(sl->spacetype==SPACE_SOUND) {
|
||||
free_soundspace((SpaceSound *)sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMAGE) {
|
||||
SpaceImage *sima= (SpaceImage *)sl;
|
||||
if(sima->cumap)
|
||||
curvemapping_free(sima->cumap);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_NODE) {
|
||||
/* SpaceNode *snode= (SpaceNode *)sl; */
|
||||
}
|
||||
@@ -4697,8 +4711,6 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
else if(sl->spacetype==SPACE_IMASEL) {
|
||||
check_imasel_copy((SpaceImaSel *) sl);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_TEXT) {
|
||||
}
|
||||
else if(sl->spacetype==SPACE_NODE) {
|
||||
SpaceNode *snode= (SpaceNode *)sl;
|
||||
snode->nodetree= NULL;
|
||||
@@ -4738,6 +4750,11 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
}
|
||||
vd->clipbb= MEM_dupallocN(vd->clipbb);
|
||||
}
|
||||
else if(sl->spacetype==SPACE_IMAGE) {
|
||||
SpaceImage *sima= (SpaceImage *)sl;
|
||||
if(sima->cumap)
|
||||
sima->cumap= curvemapping_copy(sima->cumap);
|
||||
}
|
||||
sl= sl->next;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user