Skip to content

Commit 484941d

Browse files
committed
Distortion: STMap can not be identity + update doc
1 parent 0300669 commit 484941d

1 file changed

Lines changed: 8 additions & 11 deletions

File tree

Distortion/Distortion.cpp

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ enum DistortionPluginEnum
191191
#define kParamChannelVChoice kParamChannelV "Choice"
192192

193193
#define kParamChannelA "channelA"
194-
#define kParamChannelALabel "Alpha Channel", "Input Alpha channel from UV. The Output alpha is set to this value. If \"Unpremult UV\" is checked, the UV values are divided by alpha."
194+
#define kParamChannelALabel "Alpha Channel", "Input Alpha channel from UV. The Output alpha is multiplied by this value. If \"Unpremult UV\" is checked, the UV values are divided by alpha."
195195

196196
#define kParamChannelAChoice kParamChannelA "Choice"
197197

@@ -238,10 +238,10 @@ enum WrapEnum
238238

239239

240240
#define kParamUVOffset "uvOffset"
241-
#define kParamUVOffsetLabel "UV Offset", "Offset to apply to the U and V channel (useful if these were stored in a file that cannot handle negative numbers)"
241+
#define kParamUVOffsetLabel "UV Offset", "Offset to subtract from the U and V channel (useful if these were stored in a file that cannot handle negative numbers)"
242242

243243
#define kParamUVScale "uvScale"
244-
#define kParamUVScaleLabel "UV Scale", "Scale factor to apply to the U and V channel (useful if these were stored in a file that can only store integer values)"
244+
#define kParamUVScaleLabel "UV Scale", "Scale factor to apply to the U and V channel after subtracting the offset (useful if these were stored in a file that can only store integer values)"
245245

246246
#define kParamFormat kParamGeneratorExtent
247247
#define kParamFormatLabel "Format", "Reference format for lens distortion."
@@ -2749,12 +2749,9 @@ DistortionPlugin::isIdentity(const IsIdentityArguments &args,
27492749
{
27502750
const double time = args.time;
27512751

2752-
if ( (_plugin == eDistortionPluginIDistort) || (_plugin == eDistortionPluginSTMap) ) {
2753-
if ( !_uvClip || !_uvClip->isConnected() ) {
2754-
identityClip = _srcClip;
2755-
2756-
return true;
2757-
}
2752+
if (_plugin == eDistortionPluginSTMap) {
2753+
// output has geometry from UV and colors from srcClip.
2754+
return false;
27582755
}
27592756
if (_plugin == eDistortionPluginLensDistortion) {
27602757
OutputModeEnum outputMode = _outputMode ? (OutputModeEnum)_outputMode->getValue() : eOutputModeImage;
@@ -3022,7 +3019,7 @@ DistortionPlugin::getRegionOfDefinition(const RegionOfDefinitionArguments &args,
30223019

30233020
switch (_plugin) {
30243021
case eDistortionPluginSTMap: {
3025-
if (_uvClip) {
3022+
if (_uvClip && _srcClip->isConnected()) {
30263023
// IDistort: RoD is the same as uv map
30273024
rod = _uvClip->getRegionOfDefinition(time);
30283025

@@ -3031,7 +3028,7 @@ DistortionPlugin::getRegionOfDefinition(const RegionOfDefinitionArguments &args,
30313028
break;
30323029
}
30333030
case eDistortionPluginIDistort: {
3034-
if (_srcClip) {
3031+
if (_srcClip && _srcClip->isConnected()) {
30353032
// IDistort: RoD is the same as srcClip
30363033
rod = _srcClip->getRegionOfDefinition(time);
30373034

0 commit comments

Comments
 (0)