User guide
119
The registered type class CameraModule() is also instantiated when the user selects the module from the menu.
The function setItemState is called, if it exists, which defines the item properties in the Importomatic list.
class CameraModule( ImportomaticAPI.AssetModule ):
def setItemState( self, node, item )
from Katana import UI4, VpCore
ScenegraphIconManager = UI4.Util.ScenegraphIconManager
IconManager = UI4.Util.IconManager
iconPath = os.path.dirname(__file__) + '/camera16. png'
item.setText( ImportomaticAPI.NAME_COLUMN, 'Camera' )
item.setText( ImportomaticAPI.TYPE_COLUMN, 'Camera' )
item.setIcon( ImportomaticAPI.NAME_COLUMN, IconManager.GetIcon( iconPath) )
item.setText( ImportomaticAPI.STATUS_COLUMN, 'Ready' )
16 CREATING NEW IMPORTOMATIC MODULES |