RenderFarm

class guerilla.RenderFarm

Bases: guerilla.Node

An empty renderfarm interface. To override in plugin.

RenderFarm is the interface which must be inherited and overloaded in order to connect Guerilla to a render manager system and its render farm.

Please refer to the Guerilla Python SDK (section Examples) for detailed information on implementing a render farm interface

Example:

>>> from guerilla import RenderFarm
>>> class PyRenderFarm(RenderFarm):
...
...         def gettemplate(self):
...             if not self.hasPlug('Settings1'):
...                 p1 = self.createplug('Settings1')
...             else:
...                 p1 = self.Settings1
...
...             p1.set('bar')
...             return [
...                 type(self).__name__, [
...                     ['Settings', p1]
...                 ]
...             ]
...
...         def submit(self, jobs, options):
...
...             print self
...             print jobs
...             print options
...
>>> pyrf = PyRenderFarm()
>>> # force selection of new render farm interface
>>> Document().Preferences.FarmInterface.set(type(pyrf).__name__)
static get(name)

Get a RenderFarm interface by its name

Parameters:name (str) – The RenderFarm class name
Returns:The RenderFarm instance
Return type:RenderFarm
static getlocal()

Get the batch or local RenderFarm interface

static getmain()

Get the current active RenderFarm interface

Returns:The current RenderFarm instance
Return type:RenderFarm
gettemplate()

gettemplate method for RenderFarm interface

Note

default method will do nothing

Return type:list
needfiles()

Returns True if the interface needs the jobs file dependencies (to sync them with a server for instance). In this case the file list will be passed to the submit method in options[‘Files’].

Note

default method returns False

Return type:bool
submit(jobs, options)

submit method for RenderFarm interface

Note

default method will do nothing

Return type:bool