Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_CompositorOperation.cpp
| Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Lines | CompositorOperation::CompositorOperation() : NodeOperation() | ||||
| this->m_depthBuffer = NULL; | this->m_depthBuffer = NULL; | ||||
| this->m_imageInput = NULL; | this->m_imageInput = NULL; | ||||
| this->m_alphaInput = NULL; | this->m_alphaInput = NULL; | ||||
| this->m_depthInput = NULL; | this->m_depthInput = NULL; | ||||
| this->m_useAlphaInput = false; | this->m_useAlphaInput = false; | ||||
| this->m_active = false; | this->m_active = false; | ||||
| this->m_scene = NULL; | |||||
| this->m_sceneName[0] = '\0'; | this->m_sceneName[0] = '\0'; | ||||
| this->m_viewName = NULL; | this->m_viewName = NULL; | ||||
| } | } | ||||
| void CompositorOperation::initExecution() | void CompositorOperation::initExecution() | ||||
| { | { | ||||
| if (!this->m_active) | if (!this->m_active) | ||||
| return; | return; | ||||
| Show All 11 Lines | |||||
| } | } | ||||
| void CompositorOperation::deinitExecution() | void CompositorOperation::deinitExecution() | ||||
| { | { | ||||
| if (!this->m_active) | if (!this->m_active) | ||||
| return; | return; | ||||
| if (!isBreaked()) { | if (!isBreaked()) { | ||||
| Render *re = RE_GetRender(this->m_sceneName); | Render *re = RE_GetSceneRender(this->m_scene); | ||||
| RenderResult *rr = RE_AcquireResultWrite(re); | RenderResult *rr = RE_AcquireResultWrite(re); | ||||
| if (rr) { | if (rr) { | ||||
| RenderView *rv = RE_RenderViewGetByName(rr, this->m_viewName); | RenderView *rv = RE_RenderViewGetByName(rr, this->m_viewName); | ||||
| if (rv->rectf != NULL) { | if (rv->rectf != NULL) { | ||||
| MEM_freeN(rv->rectf); | MEM_freeN(rv->rectf); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 122 Lines • ▼ Show 20 Lines | |||||
| void CompositorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) | void CompositorOperation::determineResolution(unsigned int resolution[2], unsigned int preferredResolution[2]) | ||||
| { | { | ||||
| int width = this->m_rd->xsch * this->m_rd->size / 100; | int width = this->m_rd->xsch * this->m_rd->size / 100; | ||||
| int height = this->m_rd->ysch * this->m_rd->size / 100; | int height = this->m_rd->ysch * this->m_rd->size / 100; | ||||
| // check actual render resolution with cropping it may differ with cropped border.rendering | // check actual render resolution with cropping it may differ with cropped border.rendering | ||||
| // FIX for: [31777] Border Crop gives black (easy) | // FIX for: [31777] Border Crop gives black (easy) | ||||
| Render *re = RE_GetRender(this->m_sceneName); | Render *re = RE_GetSceneRender(this->m_scene); | ||||
| if (re) { | if (re) { | ||||
| RenderResult *rr = RE_AcquireResultRead(re); | RenderResult *rr = RE_AcquireResultRead(re); | ||||
| if (rr) { | if (rr) { | ||||
| width = rr->rectx; | width = rr->rectx; | ||||
| height = rr->recty; | height = rr->recty; | ||||
| } | } | ||||
| RE_ReleaseResult(re); | RE_ReleaseResult(re); | ||||
| } | } | ||||
| Show All 9 Lines | |||||