Package nukescripts :: Module flipbooking :: Class FlipbookApplication
[hide private]
[frames] | no frames]

Class FlipbookApplication

source code

object --+
         |
        FlipbookApplication
Known Subclasses:

An interface, for so far as Python supports it. To add support for a flipbook this needs to be subclassed and the 3 methods implemented. The default implementation just raises an exception so any sub implementer will soon find out whether his implementation works.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
name(self)
Return the name of the flipbook.
source code
 
path(self)
Return the executable path required to run a flipbook.
source code
 
cacheDir(self)
Return the preferred directory for rendering.
source code
 
runFromNode(self, nodeToFlipbook, frameRanges, views, options)
Execute the flipbook on a node.
source code
 
run(self, path, frameRanges, views, options)
Execute the flipbook on a path.
source code
 
capabilities(self)
Return the capabilities of the flipbook application in a dict.
source code
 
dialogKnobs(self, dialog)
This is called when the user has selected this flipbook application, and will be interested in any knobs that you might have to show for custom settings.
source code
 
dialogKnobChanged(self, dialog, knob)
Called whenever this flipbook is selected and one of the knobs added in dialogKnobs was changed.
source code
 
getExtraOptions(self, flipbookDialog, nodeToFlipbook)
Called whenever this flipbook is selected to retrieve extra options from the node selected to flipbook and the flipbook dialog.
source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

name(self)

source code 

Return the name of the flipbook.

Returns:
String

path(self)

source code 

Return the executable path required to run a flipbook.

Returns:
String

cacheDir(self)

source code 

Return the preferred directory for rendering.

Returns:
String

runFromNode(self, nodeToFlipbook, frameRanges, views, options)

source code 

Execute the flipbook on a node. This method will use the node's filename to call run()

Parameters:
  • node - The node to run the flipbook
  • frameRanges - A FrameRanges object representing the range that should be flipbooked. Note that in 6.2v1-2 this was a FrameRange object.
  • views - A list of strings comprising of the views to flipbook. Willnot be more than the maximum supported by the flipbook.
  • options - A dictionary of options to use. This may contain the keys pixelAspect, roi, dimensions, audio and lut. These contain a float, a dict with bounding box dimensions, a dict with width and height, a path to audio file and a string indicating the LUT conversion to apply.
Returns:
None

run(self, path, frameRanges, views, options)

source code 

Execute the flipbook on a path.

Parameters:
  • path - The path to run the flipbook on. This will be similar to /path/to/foo%03d.exr
  • frameRanges - A FrameRanges object representing the range that should be flipbooked. Note that in 6.2v1-2 this was a FrameRange object.
  • views - A list of strings comprising of the views to flipbook. Willnot be more than the maximum supported by the flipbook.
  • options - A dictionary of options to use. This may contain the keys pixelAspect, roi, dimensions, audio and lut. These contain a float, a dict with bounding box dimensions, a dict with width and height, a path to audio file and a string indicating the LUT conversion to apply.
Returns:
None

capabilities(self)

source code 
Return the capabilities of the flipbook application in a dict. Currently used are:
canPreLaunch: bool, whether the flipbook can display a frames that are still being rendered by Nuke.
maximumViews: int, the number of views supported by this flipbook, should be 1 or higher.
fileTypes: list, the extensions of the file types supported by this format. Must all be lowercase, e.g ["exr", "jpg", ...].
           A wildcard ["*"] can also be used to indicate support for any file type Nuke supports
"roi: bool, whether the flipbook supports region-of-interest
@return: dict with the capabilities above.

dialogKnobs(self, dialog)

source code 

This is called when the user has selected this flipbook application, and will be interested in any knobs that you might have to show for custom settings.

Parameters:
  • dialog - The FlipbookDialog that has requested the knobs to be added to it, e.g. dialog.addKnob(...)
Returns:
None

dialogKnobChanged(self, dialog, knob)

source code 

Called whenever this flipbook is selected and one of the knobs added in dialogKnobs was changed.

Parameters:
  • dialog - The FlipbookDialog that contains the knob
  • knob - The knob added in dialogKnobs that was modified.
Returns:
None

getExtraOptions(self, flipbookDialog, nodeToFlipbook)

source code 

Called whenever this flipbook is selected to retrieve extra options from the node selected to flipbook and the flipbook dialog.

Parameters:
  • flipbookDialog - the flipbook dialog
  • nodeToFlipbook - node selected to flipbook
Returns:
a dictionary with the extra options