
Search is based on keyword.
Ex: "Procedures"
Do not search with natural language
Ex: "How do I write a new procedure?"
Implementing A Custom Asset Control Widget
The entry point that Katana needs, in order to create a custom asset control widget is the createAssetControlWidget() method of our custom AssetWidgetDelegate class.
The createAssetControlWidget() method instantiates the SimpleMockAssetControlWidget, which must inherit from BaseAssetControlWidget. BaseAssetControlWidget is a QT QWidget with an HBoxLayout. createAssetControlWidget() then adds the control widget to the parent layout. The parent is a QWidget and part of the Parameter tab.
The following methods must be implemented by an asset control widget:
• buildWidgets()
This is invoked by the BaseAssetControlWidget constructor to build the child widgets. This is where most of the work happens.
• setValue()
Updates this widget with the given Asset ID.
• getValue()
Return the Asset ID from this widget.
• setReadOnly()
Enable/Disable editing of this widget.
The BaseAssetControlWidget supplies an emitValueChanged() method for notifying Katana that the user has changed the Asset ID in the widget. This must be called when the value in the UI has changed.
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.