Closed goddardl closed 8 years ago
Closing this, after using the following script to manually verify that we do indeed now support negative display window origins.
import Gaffer
import GafferImage
import IECore
__children = {}
__children["ImageReader"] = GafferImage.ImageReader( "ImageReader" )
parent.addChild( __children["ImageReader"] )
__children["ImageReader"]["fileName"].setValue( '/disk1/data/images/big_buck_bunny_05010.png' )
__children["ImageReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ImageReader"]["__uiPosition"].setValue( IECore.V2f( 9.59999752, 1.50000095 ) )
__children["Crop"] = GafferImage.Crop( "Crop" )
parent.addChild( __children["Crop"] )
__children["Crop"]["area"].setValue( IECore.Box2i( IECore.V2i( -10, -20 ), IECore.V2i( 1910, 1060 ) ) )
__children["Crop"]["area"]["min"]["x"].setValue( -10 )
__children["Crop"]["area"]["min"]["y"].setValue( -20 )
__children["Crop"]["area"]["max"]["x"].setValue( 1910 )
__children["Crop"]["area"]["max"]["y"].setValue( 1060 )
__children["Crop"]["affectDataWindow"].setValue( False )
__children["Crop"]["resetOrigin"].setValue( False )
__children["Crop"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["Crop"]["__uiPosition"].setValue( IECore.V2f( 9.60081196, -7.66406155 ) )
__children["ImageWriter"] = GafferImage.ImageWriter( "ImageWriter" )
parent.addChild( __children["ImageWriter"] )
__children["ImageWriter"]["fileName"].setValue( '/tmp/test.exr' )
__children["ImageWriter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ImageWriter"]["__uiPosition"].setValue( IECore.V2f( 8.10163498, -16.828125 ) )
__children["ImageReader1"] = GafferImage.ImageReader( "ImageReader1" )
parent.addChild( __children["ImageReader1"] )
__children["ImageReader1"]["fileName"].setValue( '/tmp/test.exr' )
__children["ImageReader1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = IECore.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["ImageReader1"]["__uiPosition"].setValue( IECore.V2f( 26.6522923, 1.77567101 ) )
__children["Crop"]["in"].setInput( __children["ImageReader"]["out"] )
__children["ImageWriter"]["in"].setInput( __children["Crop"]["out"] )
del __children
The GafferImage module does not support negative display windows despite the GafferImage.Format class providing a setDisplayWindow() method.
The ImageView, ImageReader and ImageWriter classes are all known to ignore negative display windows and will have to be corrected too when a fix is available.