Package nuke :: Class Format
[hide private]
[frames] | no frames]

Class Format

object --+
         |
        nuke.Format

A format.

Instance Methods [hide private]
 
__init__(...)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
a new object with type S, a subtype of T
__new__(T, S, ...)
None
add(self, name)
Add this instance to a list of "named" formats.
[x, y]
fromUV(self, u, v)
Transform a UV coordinate in the range 0-1 into the format's XY range.
int
height(self)
Return the height of image file in pixels.
string
name(self)
Returns the user-visible name of the format.
float
pixelAspect(self)
Returns the pixel aspect ratio (pixel width divided by pixel height) for this format.
Format
scaled(sx, sy, tx, ty)
Scale and translate this format by sx, sy, tx and ty.
None
setHeight(self, newHeight)
Set the height of image file in pixels.
None
setName(self, name)
Set name of this format.
None
setPixelAspect(self, aspectRatio)
Set a new pixel aspect ratio for this format.
None
setWidth(self, newWidth)
Set the width of image file in pixels.newWidth is the new width for the image; it should be a positive integer.
(u, v)
toUV(self, x, y)
Back-transform an XY coordinate in the format's space into UV space.
int
width(self)
Return the width of image file in pixels.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(...)
(Constructor)

 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__

__new__(T, S, ...)

 
Returns: a new object with type S, a subtype of T
Overrides: object.__new__

add(self, name)

 

Add this instance to a list of "named" formats. The name parameter is the name of the list to add the format to.

Returns: None

fromUV(self, u, v)

 

Transform a UV coordinate in the range 0-1 into the format's XY range. Returns a list containing the x and y coordinates.

Parameters:
  • u - The U coordinate.
  • v - The V coordinate.
Returns: [x, y]
[x, y]

scaled(sx, sy, tx, ty)

 

Scale and translate this format by sx, sy, tx and ty.

Parameters:
  • sx - Scale factor in X.@param sy: Scale factor in Y.@param tx: Offset factor in X.@param ty: Offset factor in Y.@return: Format.
Returns: Format

setHeight(self, newHeight)

 

Set the height of image file in pixels. newHeight is the new height for the image; it should be a positive integer.

Returns: None

setName(self, name)

 

Set name of this format. The name parameter is the new name for the format.

Returns: None

setPixelAspect(self, aspectRatio)

 

Set a new pixel aspect ratio for this format. The aspectRatio parameter is the new ratio, found by dividing the desired pixel width by the desired pixel height.

Returns: None

toUV(self, x, y)

 

Back-transform an XY coordinate in the format's space into UV space.

Parameters:
  • x - The X coordinate.
  • y - The Y coordinate.
Returns: (u, v)
[u, v].