Changeset View
Changeset View
Standalone View
Standalone View
source/blender/compositor/operations/COM_TextureOperation.cc
| Show First 20 Lines • Show All 69 Lines • ▼ Show 20 Lines | if (this->m_texture != nullptr && this->m_texture->use_nodes && | ||||
| ntreeTexEndExecTree(this->m_texture->nodetree->execdata); | ntreeTexEndExecTree(this->m_texture->nodetree->execdata); | ||||
| } | } | ||||
| NodeOperation::deinitExecution(); | NodeOperation::deinitExecution(); | ||||
| } | } | ||||
| void TextureBaseOperation::determineResolution(unsigned int resolution[2], | void TextureBaseOperation::determineResolution(unsigned int resolution[2], | ||||
| unsigned int preferredResolution[2]) | unsigned int preferredResolution[2]) | ||||
| { | { | ||||
| if (preferredResolution[0] == 0 || preferredResolution[1] == 0) { | /* Determine inputs resolutions. */ | ||||
| int width = this->m_rd->xsch * this->m_rd->size / 100; | unsigned int temp[2]; | ||||
| int height = this->m_rd->ysch * this->m_rd->size / 100; | NodeOperation::determineResolution(temp, preferredResolution); | ||||
| resolution[0] = width; | |||||
| resolution[1] = height; | /* We don't use inputs resolutions because they are only used as parameters, not image data. */ | ||||
| } | |||||
| else { | |||||
| resolution[0] = preferredResolution[0]; | resolution[0] = preferredResolution[0]; | ||||
| resolution[1] = preferredResolution[1]; | 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); | ||||
| ▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines | |||||