Importomatic¶
- class ImportomaticAPI.AssetModule¶
Bases:
object- Variables:
Deprecated – E{|}sparklesE{|} B{New in Katana 4.0v2}: Flag that states whether a particular type of
AssetModuleis considered deprecated, and should no longer be used.
- Deprecated = False¶
- classmethod RegisterType(typeName, handler)¶
- classmethod GetAllRegisteredHandlers()¶
- static GetAssetType(node)¶
- static SetAssetType(node, typeName)¶
- static GetCustomAssetName(node, paramName='__importomaticName')¶
- static SetCustomAssetName(node, assetName, paramName='__importomaticName')¶
- classmethod GetHandlerForType(typeName)¶
- classmethod GetHandlerForNode(node)¶
- classmethod GetTypeNames()¶
- classmethod RegisterCreateCallback(name, callback, postCallback=None, deprecated=False)¶
Adds a menu item for creating an Importomatic asset of a particular type to the B{Add} tool button’s menu of Importomatic nodes that are edited in the B{Parameters} tab.
Uses the given
nameas the menu item’s text, and to identify the creation callback in API functions likeTriggerCreateCallback().When the menu item is chosen, the given
callbackis 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 (
callableorNone) – 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 B{Deprecated} within the B{Add} tool button’s menu.
- classmethod RegisterBatchCreateCallback(filetype, callback)¶
- classmethod GetCreateCallbackNames()¶
- 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,Falseis returned.- See:
- Since:
Katana 4.0v2
- classmethod TriggerCreateCallback(name, node)¶
- classmethod TriggerPostCreateCallback(name, node, nodesAdded)¶
- classmethod TriggerBatchCreateCallback(filetype, node, assetId, locationExpression)¶
- classmethod HasBatchCreateCallback(filetype)¶
- classmethod RegisterUtilCallback(name, callback)¶
- classmethod GetUtilCallbackNames()¶
- setItemState(node, item)¶
- getEditor(node, widgetParent)¶
- addToContextMenu(menu, importomaticNode, node)¶
- getPrimarySpref(node)¶
- setPrimarySprefVersion(node, version)¶
- getSecondarySprefList(node)¶
- setSecondarySprefVersion(node, index, version)¶
- setSecondaryItemState(node, item, index)¶
- freeze()¶
- thaw()¶
- getAssetTreeRoot(node)¶
- class ImportomaticAPI.AssetTreeChild¶
Bases:
object- setItemState(item)¶
- isSelectable()¶
- isDraggable()¶
- getAssetId()¶
- setAssetId(assetId)¶
- isVersionSettable()¶
- getChildren()¶
- acceptsDrop(dropItem, index)¶
- acceptDrop(dropItem, index)¶
- getEditor(widgetParent)¶
- getItemKey()¶
- isIgnorable()¶
- isIgnored()¶
- setIgnored(state)¶
- isDeletable()¶
- delete()¶
- canDuplicate()¶
- duplicateItem()¶
- addToContextMenu(menu, importomaticNode)¶
- addNodeObservers(callback)¶
- getDefaultOpenState()¶
- getCustomVersionTagNames()¶