nuke.Format
- class nuke.Format
Bases:
object
A format.
Methods
Add this instance to a list of "named" formats.
Transform a UV coordinate in the range 0-1 into the format's XY range.
Return the height of image file in pixels.
Returns the user-visible name of the format.
Returns the pixel aspect ratio (pixel width divided by pixel height) for this format.
Return the right edge of image file in pixels.
Scale and translate this format by sx, sy, tx and ty.
Set the height of image file in pixels.
Set name of this format.
Set a new pixel aspect ratio for this format.
Set the right edge of image file in pixels.
Set the top edge of image file in pixels.
Set the width of image file in pixels.newWidth is the new width for the image; it should be a positive integer.
Set the left edge of image file in pixels.
Set the bottom edge of image file in pixels.
Return the top edge of image file in pixels.
Back-transform an XY coordinate in the format's space into UV space.
Return the width of image file in pixels.
Return the left edge of image file in pixels.
Return the bottom edge of image file in pixels.
- add(name) None
Add this instance to a list of “named” formats. The name parameter is the name of the list to add the format to.
- fromUV(u, v) [x, y]
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]
- height() int
Return the height of image file in pixels.
- name() string
Returns the user-visible name of the format.
- pixelAspect() float
Returns the pixel aspect ratio (pixel width divided by pixel height) for this format.
- r() int
Return the right edge of image file in pixels.
- scaled(sx, sy, tx, ty) Format
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.
- setHeight(newHeight) None
Set the height of image file in pixels. newHeight is the new height for the image; it should be a positive integer.
- setName(name) None
Set name of this format. The name parameter is the new name for the format.
- setPixelAspect(aspectRatio) None
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.
- setR(newR) None
Set the right edge of image file in pixels. newR is the new right edge for the image; it should be a positive integer.
- setT(newT) None
Set the top edge of image file in pixels. newY is the new top edge for the image; it should be a positive integer.
- setWidth(newWidth) None
Set the width of image file in pixels.newWidth is the new width for the image; it should be a positive integer.
- setX(newX) None
Set the left edge of image file in pixels. newX is the new left edge for the image; it should be a positive integer.
- setY(newY) None
Set the bottom edge of image file in pixels. newY is the new bottom edge for the image; it should be a positive integer.
- t() int
Return the top edge of image file in pixels.
- toUV(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].
- width() int
Return the width of image file in pixels.
- x() int
Return the left edge of image file in pixels.
- y() int
Return the bottom edge of image file in pixels.