Exporter Plugins

This module contains the base exporter plugin for hive which is used to export all I/O operations related to assets ie. templates, FBX, .ma reference etc.

class ExporterPlugin

Bases: object

Plugin Interface for handling exporting of hive rigs ie. fbx and MA. It’s the responsibility of subclasses to reimplement the following methods.

To Broadcast progress of the export you should call self.onProgressCallbackFunc(progress, message) If this plugin is being executed from the UI then the callback will be handled from there. However, if you’re executing the plugin through code only or writing your own UI then you can set the callback using myPlugin.onProgressCallbackFunc = myProgressFuncPointer.

By default, the progress callback will simply log to debug.

from zoo.libs.hive import api
r = api.Rig()
r.startSession("myRig")
exporter = r.configuration.exportPluginForId("fbxExport")()
settings = exporter.exportSettings()
settings.outputPath = "myfbxPath.fbx"
exporter.execute(settings)
id = ''
exportSettings()

Method which returns the export settings instance which will be used in execute()

execute(rig, exportOptions)

Client facing method which runs the export process.

Parameters:
  • rig (zoo.libs.hive.base.rig.Rig) – The Hive rig instance to export

  • exportOptions (zoo.libs.utils.general.ObjectDict) – The export options for this exporter to use.

export(rig, exportOptions)

Should be implemented in subclass. This is where all export logic should be contained

Parameters:
  • rig (zoo.libs.hive.base.rig.Rig) – The Hive rig instance to export

  • exportOptions (zoo.libs.utils.general.ObjectDict) – The export options for this exporter to use.

showUserMessage(title, messageType, message)