
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Configuring the Asset Browser
The entry point for extending the Katana asset browser is the method configureAssetBrowser(), which must be implemented in your AssetWidgetDelegate plug-in. configureAssetBrowser() takes a single browser argument, which is the Katana Asset Browser to configure. At its core the Asset Browser is a Qt dialog window (QDialog) with additional utility methods. The most useful of these are:
• addBrowserTab()
Add a new tab to the Asset Browser.
Note: The custom browser tab added using addBrowserTab() should emit a selectionValidSignal signal to indicate a change in selection validity and therefore the state of the Asset Browser Accept button, for example:
browserTab.selectionValidSignal.emit(browserTab.selectionValid())
The browser dialog listens for this signal from the currently viewed tab and sets the enabled state of its Accept button accordingly.
• addFileBrowserTab()
Add a standard file browser tab to the Asset Browser.
• getCurrentIndex()
Return the index of the currently open tab.
• setCurrentIndex()
Set the currently open tab.
The base implementation of configureAssetBrowser() sets the window title from the given hints and creates a file browser tab. If you want to avoid creating a file browser tab, implement a shouldAddFileTabToAssetBrowser() method with a return value of False.
The following methods exist but need minimal implementation:
• setSaveMode()
Tells us whether the browser is invoked for opening a file or for saving one. If saveMode is True, then the browser has been opened for saving a file.
• selectionValid()
Checks whether the current asset path refers to a valid asset. For a file browser dialog window this returns false if a chosen path does not exist.
• setLocation()
Sets the default location with which to open the browser.
• getExtraOptions()
This is used to support a versionUp and a publish option for LookFileBake and create a new Katana file. If those options are displayed in the custom user interface Katana retrieves them using this method:
{"versionUp" : "False" / "True", "publish" : "False" / "True" }
Note: The function getExtraOptions() should return a dict.
Sorry you didn't find this helpful
Why wasn't this helpful? (check all that apply)
Thanks for your feedback.
If you can't find what you're looking for or you have a workflow question, please try Foundry Support.
If you have any thoughts on how we can improve our learning content, please email the Documentation team using the button below.
Thanks for taking time to give us feedback.