Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_OutputFileOperation.cpp
| Show First 20 Lines • Show All 175 Lines • ▼ Show 20 Lines | |||||
| } | } | ||||
| OutputSingleLayerOperation::OutputSingleLayerOperation( | OutputSingleLayerOperation::OutputSingleLayerOperation( | ||||
| 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) | ||||
| { | { | ||||
| this->m_rd = rd; | this->m_rd = rd; | ||||
| this->m_tree = tree; | this->m_tree = tree; | ||||
| this->addInputSocket(datatype); | this->addInputSocket(datatype); | ||||
| this->m_outputBuffer = NULL; | this->m_outputBuffer = NULL; | ||||
| this->m_datatype = datatype; | this->m_datatype = datatype; | ||||
| this->m_imageInput = NULL; | this->m_imageInput = NULL; | ||||
| this->m_format = format; | this->m_format = format; | ||||
| BLI_strncpy(this->m_path, path, sizeof(this->m_path)); | BLI_strncpy(this->m_path, path, sizeof(this->m_path)); | ||||
| this->m_viewSettings = viewSettings; | |||||
| this->m_displaySettings = displaySettings; | |||||
| this->m_viewName = viewName; | this->m_viewName = viewName; | ||||
| } | } | ||||
| void OutputSingleLayerOperation::initExecution() | void OutputSingleLayerOperation::initExecution() | ||||
| { | { | ||||
| this->m_imageInput = getInputSocketReader(0); | this->m_imageInput = getInputSocketReader(0); | ||||
| this->m_outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_datatype); | this->m_outputBuffer = init_buffer(this->getWidth(), this->getHeight(), this->m_datatype); | ||||
| } | } | ||||
| Show All 17 Lines | if (this->getWidth() * this->getHeight() != 0) { | ||||
| char filename[FILE_MAX]; | char filename[FILE_MAX]; | ||||
| const char *suffix; | const char *suffix; | ||||
| ibuf->channels = size; | ibuf->channels = size; | ||||
| ibuf->rect_float = this->m_outputBuffer; | ibuf->rect_float = this->m_outputBuffer; | ||||
| ibuf->mall |= IB_rectfloat; | ibuf->mall |= IB_rectfloat; | ||||
| ibuf->dither = this->m_rd->dither_intensity; | ibuf->dither = this->m_rd->dither_intensity; | ||||
| IMB_colormanagement_imbuf_for_write( | IMB_colormanagement_imbuf_for_write(ibuf, | ||||
| ibuf, true, false, m_viewSettings, m_displaySettings, this->m_format); | true, | ||||
| false, | |||||
| &this->m_format->view_settings, | |||||
| &this->m_format->display_settings, | |||||
| this->m_format); | |||||
| suffix = BKE_scene_multiview_view_suffix_get(this->m_rd, this->m_viewName); | suffix = BKE_scene_multiview_view_suffix_get(this->m_rd, this->m_viewName); | ||||
| BKE_image_path_from_imformat(filename, | BKE_image_path_from_imformat(filename, | ||||
| this->m_path, | this->m_path, | ||||
| BKE_main_blendfile_path_from_global(), | BKE_main_blendfile_path_from_global(), | ||||
| this->m_rd->cfra, | this->m_rd->cfra, | ||||
| this->m_format, | this->m_format, | ||||
| ▲ Show 20 Lines • Show All 137 Lines • Show Last 20 Lines | |||||