Workaround for non-updating image editor when viewer node is opened there with view-transform

This commit is contained in:
Sergey Sharybin
2012-06-20 12:47:08 +00:00
parent 5896702374
commit caa337fb44
2 changed files with 8 additions and 2 deletions

View File

@@ -71,7 +71,9 @@ void ViewerBaseOperation::initImage()
imb_addrectfloatImBuf(ibuf);
anImage->ok = IMA_OK_LOADED;
}
imb_freerectviewImBuf_all(ibuf);
/* now we combine the input with ibuf */
this->outputBuffer = ibuf->rect_float;
this->outputBufferDisplay = (unsigned char *)ibuf->rect;
@@ -85,6 +87,10 @@ void ViewerBaseOperation:: updateImage(rcti *rect)
void ViewerBaseOperation::deinitExecution()
{
ImBuf *ibuf = BKE_image_acquire_ibuf(this->image, this->imageUser, &this->lock);
imb_freerectviewImBuf_all(ibuf);
BKE_image_release_ibuf(this->image, this->lock);
this->outputBuffer = NULL;
}

View File

@@ -705,7 +705,7 @@ void IMB_rect_from_float_with_view_transform(ImBuf *ibuf, int view_transform)
ibuf->channels, ibuf->dither, predivide,
ibuf->x, ibuf->y, ibuf->x, ibuf->x);
}
else {
else if (ibuf->x && ibuf->y) {
ConstConfigRcPtr *config = OCIO_getCurrentConfig();
ConstProcessorRcPtr *processor;
DisplayTransformRcPtr *dt = OCIO_createDisplayTransform();