Importomatic

class ImportomaticAPI.AssetModule

Bases: object

Variables:Deprecated – ✨ New in Katana 4.0v2: Flag that states whether a particular type of AssetModule is considered deprecated, and should no longer be used.
Deprecated = False
classmethod GetAllRegisteredHandlers()
static GetAssetType(node)
classmethod GetCreateCallbackNames()
static GetCustomAssetName(node, paramName='__importomaticName')
classmethod GetHandlerForNode(node)
classmethod GetHandlerForType(typeName)
classmethod GetTypeNames()
classmethod GetUtilCallbackNames()
classmethod HasBatchCreateCallback(filetype)
classmethod IsCreateCallbackDeprecated(name)
Return type:bool
Parameters:name (str) – The text registered for a menu item that is used to create a particular type of Importomatic asset.
Returns:Flag that states whether the type of Importomatic asset that is created when using the creation callback with the given name is considered deprecated. If no creation callback matches the given name, False is returned.
See:RegisterCreateCallback
Since:Katana 4.0v2
classmethod RegisterBatchCreateCallback(filetype, callback)
classmethod RegisterCreateCallback(name, callback, postCallback=None, deprecated=False)

Adds a menu item for creating an Importomatic asset of a particular type to the Add tool button’s menu of Importomatic nodes that are edited in the Parameters tab.

Uses the given name as the menu item’s text, and to identify the creation callback in API functions like TriggerCreateCallback.

When the menu item is chosen, the given callback is called in order to create the asset. After updating the Importomatic node’s internals, the given post-create callback (if any) is called.

Parameters:
  • name (str) – The text to use for a menu item that triggers the given callback.
  • callback (callable) – The callable object to call for creating an asset of a particular type.
  • postCallback (callable or None) – A callable object to call after creating an asset of a particular type, and after updating the Importomatic node’s internals.
  • deprecated (bool) – A flag that indicates whether assets of the particular type are considered deprecated. Menu items that represent deprecated types of Importomatic assets appear in a separate section titled Deprecated within the Add tool button’s menu.
classmethod RegisterType(typeName, handler)
classmethod RegisterUtilCallback(name, callback)
static SetAssetType(node, typeName)
static SetCustomAssetName(node, assetName, paramName='__importomaticName')
classmethod TriggerBatchCreateCallback(filetype, node, assetId, locationExpression)
classmethod TriggerCreateCallback(name, node)
classmethod TriggerPostCreateCallback(name, node, nodesAdded)
addToContextMenu(menu, importomaticNode, node)
freeze()
getAssetTreeRoot(node)
getEditor(node, widgetParent)
getPrimarySpref(node)
getSecondarySprefList(node)
setItemState(node, item)
setPrimarySprefVersion(node, version)
setSecondaryItemState(node, item, index)
setSecondarySprefVersion(node, index, version)
thaw()
class ImportomaticAPI.AssetTreeChild

Bases: object

acceptDrop(dropItem, index)
acceptsDrop(dropItem, index)
addNodeObservers(callback)
addToContextMenu(menu, importomaticNode)
canDuplicate()
delete()
duplicateItem()
getAssetId()
getChildren()
getCustomVersionTagNames()
getDefaultOpenState()
getEditor(widgetParent)
getItemKey()
isDeletable()
isDraggable()
isIgnorable()
isIgnored()
isSelectable()
isVersionSettable()
setAssetId(assetId)
setIgnored(state)
setItemState(item)