nukescripts.pyQtExamples.flipbookingExample.ExampleRVFlipbook

class nukescripts.pyQtExamples.flipbookingExample.ExampleRVFlipbook[source]

Bases: nukescripts.flipbooking.FlipbookApplication

This is an example implementation of how to deal with implementing a flipbook application other than FrameCycler for Nuke. This script needs to be modified in several places before it can work, so please read all of the notes marked with TODO and modify them where necessary.

Methods

cacheDir

Return the preferred directory for rendering.

capabilities

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.

dialogKnobChanged

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

dialogKnobs

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.

getExtraOptions

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

name

Return the name of the flipbook.

path

Return the executable path required to run a flipbook.

run

Execute the flipbook on a path.

runFromNode

Execute the flipbook on a node.

cacheDir()[source]

Return the preferred directory for rendering. :return: String

capabilities()[source]

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.

dialogKnobChanged(dialog, knob)

Called whenever this flipbook is selected and one of the knobs added in dialogKnobs was changed. :param dialog: The FlipbookDialog that contains the knob :param knob: The knob added in dialogKnobs that was modified. :return: None

dialogKnobs(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. :param dialog: The FlipbookDialog that has requested the knobs to be added to it, e.g. dialog.addKnob(…) :return: None

getExtraOptions(flipbookDialog, nodeToFlipbook)

Called whenever this flipbook is selected to retrieve extra options from the node selected to flipbook and the flipbook dialog. :param flipbookDialog: the flipbook dialog :param nodeToFlipbook: node selected to flipbook :return: a dictionary with the extra options

name()[source]

Return the name of the flipbook. :return: String

path()[source]

Return the executable path required to run a flipbook. :return: String

run(filename, frameRanges, views, options)[source]

Execute the flipbook on a path. :param path: The path to run the flipbook on. This will be similar to /path/to/foo%03d.exr :param frameRanges: A FrameRanges object representing the range that should be flipbooked. Note that in 6.2v1-2 this was a FrameRange object. :param views: A list of strings comprising of the views to flipbook. Willnot be more than the maximum supported by the flipbook. :param 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. :return: None

runFromNode(nodeToFlipbook, frameRanges, views, options)

Execute the flipbook on a node. This method will use the node’s filename to call run() :param node: The node to run the flipbook :param frameRanges: A FrameRanges object representing the range that should be flipbooked. Note that in 6.2v1-2 this was a FrameRange object. :param views: A list of strings comprising of the views to flipbook. Willnot be more than the maximum supported by the flipbook. :param 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. :return: None