Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_TextureOperation.cc
| Show First 20 Lines • Show All 66 Lines • ▼ Show 20 Lines | void TextureBaseOperation::deinitExecution() | ||||
| this->m_pool = nullptr; | this->m_pool = nullptr; | ||||
| if (this->m_texture != nullptr && this->m_texture->use_nodes && | if (this->m_texture != nullptr && this->m_texture->use_nodes && | ||||
| this->m_texture->nodetree != nullptr && this->m_texture->nodetree->execdata != nullptr) { | this->m_texture->nodetree != nullptr && this->m_texture->nodetree->execdata != nullptr) { | ||||
| ntreeTexEndExecTree(this->m_texture->nodetree->execdata); | ntreeTexEndExecTree(this->m_texture->nodetree->execdata); | ||||
| } | } | ||||
| NodeOperation::deinitExecution(); | NodeOperation::deinitExecution(); | ||||
| } | } | ||||
| void TextureBaseOperation::determineResolution(unsigned int resolution[2], | |||||
| unsigned int preferredResolution[2]) | |||||
| { | |||||
| if (preferredResolution[0] == 0 || preferredResolution[1] == 0) { | |||||
| int width = this->m_rd->xsch * this->m_rd->size / 100; | |||||
| int height = this->m_rd->ysch * this->m_rd->size / 100; | |||||
| resolution[0] = width; | |||||
| resolution[1] = height; | |||||
| } | |||||
| else { | |||||
| resolution[0] = preferredResolution[0]; | |||||
| resolution[1] = preferredResolution[1]; | |||||
| } | |||||
| } | |||||
| void TextureAlphaOperation::executePixelSampled(float output[4], | void TextureAlphaOperation::executePixelSampled(float output[4], | ||||
| float x, | float x, | ||||
| float y, | float y, | ||||
| PixelSampler sampler) | PixelSampler sampler) | ||||
| { | { | ||||
| float color[4]; | float color[4]; | ||||
| TextureBaseOperation::executePixelSampled(color, x, y, sampler); | TextureBaseOperation::executePixelSampled(color, x, y, sampler); | ||||
| output[0] = color[3]; | output[0] = color[3]; | ||||
| ▲ Show 20 Lines • Show All 64 Lines • Show Last 20 Lines | |||||