Changes the `asset_poll()` and `draw_context_menu()` methods for asset
shelves to use the `AssetRepresentation` type, instead of `AssetHandle`.
The latter should be removed, so it's better to avoid using it in the
asset shelf BPY to avoid future compatibility breakage. This is possible
now with d421ebac5e.
Was printing the following warning:
Warning: 'MyAssetShelf' does not contain '_AST_' with prefix and suffix
I followed some other template for the naming, apparently the "Ui Tool
Simple" one, but that doesn't print the warning.
When creating a new main window, the `context.object` attribute wouldn't
exist, causing an error message to be printed.
Rather than checking if the attribute extists, query the mode from
context directly (this is always available), rather than querying it
through the active object.
Adds a new "Ui Asset Shelf" template to the script editor, demonstrating
how scripts can register own asset shelves. The asset shelf is designed
as a new standard UI element that add-ons, application templates and the
like can use, so this is useful. It's also useful as a quick way to test
and customize the asset shelf.
The script is only available in the UI if the "Asset Shelf" experimental
feature is enabled in the Preferences.