Source code for foundry.frameserver.nuke.bases

[docs]class RenderQueueObserverMixin(object): def onRenderQueued(self, script, frameRanges, nodeName, views): pass def onFrameRenderQueued(self, script, frame, nodeName): pass def onFrameRenderInProgress(self, script, frame, nodeName): pass def onFrameRendered(self, script, frame, nodeName): pass def onFrameRenderCancelled(self, script, frame, nodeName): pass def onFrameRenderError(self, script, frame, nodeName, error): pass
class IBackgroundRenderer(object): """A interface which should be implemented by all background renderers.""" def renderFrames(self, scriptPath, frameRanges, nodeName, views, priority): """Request background renderer to render the given framerange from the given script. @param scriptPath: Full file path to the script which is needs rendering @param start: Frame to start at @param end: Frame to end at @param priority: An integer representing the priority of the job """ raise NotImplementedError def renderScript(self, scriptPath): """Request background renderer to render the given script in full. @param scriptPath: Full file path to the script which is needs rendering """ raise NotImplementedError def cancelFrames(self, scriptPath, nodeName): """Request background renderer to cancel all queued frames for the given script. @param scriptPath: Full file path to the script which is needs cancelling """ raise NotImplementedError def addBackgroundRenderObserver(self, observer): """Add an observer which should be notified about the status of the frames being rendered. The concrete implementation of this interface should call all the methods on the observer in order to properly update the progress in the UI. See help(hiero.core.BackgroundRenderObserver) to see the observers interface. @param observer: An instance of hiero.core.BackgroundRenderObserver """ raise NotImplementedError def removeBackgroundRenderObserver(self, observer): """Remove the given existing observer if it exists.""" raise NotImplementedError def isRunning(self, timeout=1): """Get renderers status to determine if it is responding and if it is in a useable state. @param timeout: time in seconds to wait for a response. Defaults to 1. @return Boolean """ raise NotImplementedError