Differential D5069 Diff 15889 source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_OutputFileMultiViewOperation.cpp
| Show First 20 Lines • Show All 41 Lines • ▼ Show 20 Lines | |||||
| /************************************ OpenEXR Singlelayer Multiview ******************************/ | /************************************ OpenEXR Singlelayer Multiview ******************************/ | ||||
| OutputOpenExrSingleLayerMultiViewOperation::OutputOpenExrSingleLayerMultiViewOperation( | OutputOpenExrSingleLayerMultiViewOperation::OutputOpenExrSingleLayerMultiViewOperation( | ||||
| const RenderData *rd, | const RenderData *rd, | ||||
| const bNodeTree *tree, | const bNodeTree *tree, | ||||
| DataType datatype, | DataType datatype, | ||||
| ImageFormatData *format, | ImageFormatData *format, | ||||
| const char *path, | const char *path, | ||||
| const ColorManagedViewSettings *viewSettings, | |||||
| const ColorManagedDisplaySettings *displaySettings, | |||||
| const char *viewName) | const char *viewName) | ||||
| : OutputSingleLayerOperation( | : OutputSingleLayerOperation(rd, tree, datatype, format, path, viewName) | ||||
| rd, tree, datatype, format, path, viewSettings, displaySettings, viewName) | |||||
| { | { | ||||
| } | } | ||||
| void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filename) | void *OutputOpenExrSingleLayerMultiViewOperation::get_handle(const char *filename) | ||||
| { | { | ||||
| size_t width = this->getWidth(); | size_t width = this->getWidth(); | ||||
| size_t height = this->getHeight(); | size_t height = this->getHeight(); | ||||
| SceneRenderView *srv; | SceneRenderView *srv; | ||||
| ▲ Show 20 Lines • Show All 200 Lines • ▼ Show 20 Lines | |||||
| /******************************** Stereo3D ******************************/ | /******************************** Stereo3D ******************************/ | ||||
| OutputStereoOperation::OutputStereoOperation(const RenderData *rd, | OutputStereoOperation::OutputStereoOperation(const RenderData *rd, | ||||
| const bNodeTree *tree, | const bNodeTree *tree, | ||||
| DataType datatype, | DataType datatype, | ||||
| ImageFormatData *format, | ImageFormatData *format, | ||||
| const char *path, | const char *path, | ||||
| const char *name, | const char *name, | ||||
| const ColorManagedViewSettings *viewSettings, | |||||
| const ColorManagedDisplaySettings *displaySettings, | |||||
| const char *viewName) | const char *viewName) | ||||
| : OutputSingleLayerOperation( | : OutputSingleLayerOperation(rd, tree, datatype, format, path, viewName) | ||||
| rd, tree, datatype, format, path, viewSettings, displaySettings, viewName) | |||||
| { | { | ||||
| BLI_strncpy(this->m_name, name, sizeof(this->m_name)); | BLI_strncpy(this->m_name, name, sizeof(this->m_name)); | ||||
| this->m_channels = get_datatype_size(datatype); | this->m_channels = get_datatype_size(datatype); | ||||
| } | } | ||||
| void *OutputStereoOperation::get_handle(const char *filename) | void *OutputStereoOperation::get_handle(const char *filename) | ||||
| { | { | ||||
| size_t width = this->getWidth(); | size_t width = this->getWidth(); | ||||
| ▲ Show 20 Lines • Show All 58 Lines • ▼ Show 20 Lines | if (BKE_scene_multiview_is_render_view_last(this->m_rd, this->m_viewName)) { | ||||
| ibuf[i] = IMB_allocImBuf(width, height, this->m_format->planes, 0); | ibuf[i] = IMB_allocImBuf(width, height, this->m_format->planes, 0); | ||||
| ibuf[i]->channels = this->m_channels; | ibuf[i]->channels = this->m_channels; | ||||
| ibuf[i]->rect_float = rectf; | ibuf[i]->rect_float = rectf; | ||||
| ibuf[i]->mall |= IB_rectfloat; | ibuf[i]->mall |= IB_rectfloat; | ||||
| ibuf[i]->dither = this->m_rd->dither_intensity; | ibuf[i]->dither = this->m_rd->dither_intensity; | ||||
| /* do colormanagement in the individual views, so it doesn't need to do in the stereo */ | /* do colormanagement in the individual views, so it doesn't need to do in the stereo */ | ||||
| IMB_colormanagement_imbuf_for_write( | IMB_colormanagement_imbuf_for_write(ibuf[i], | ||||
| ibuf[i], true, false, this->m_viewSettings, this->m_displaySettings, this->m_format); | true, | ||||
| false, | |||||
| &this->m_format->view_settings, | |||||
| &this->m_format->display_settings, | |||||
| this->m_format); | |||||
| IMB_prepare_write_ImBuf(IMB_isfloat(ibuf[i]), ibuf[i]); | IMB_prepare_write_ImBuf(IMB_isfloat(ibuf[i]), ibuf[i]); | ||||
| } | } | ||||
| /* create stereo buffer */ | /* create stereo buffer */ | ||||
| ibuf[2] = IMB_stereo3d_ImBuf(this->m_format, ibuf[0], ibuf[1]); | ibuf[2] = IMB_stereo3d_ImBuf(this->m_format, ibuf[0], ibuf[1]); | ||||
| BKE_image_path_from_imformat(filename, | BKE_image_path_from_imformat(filename, | ||||
| this->m_path, | this->m_path, | ||||
| Show All 18 Lines | |||||