Asset shelf: Use asset representation for asset shelf BPY methods
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.
This commit is contained in:
@@ -11,7 +11,7 @@ class MyAssetShelf(bpy.types.AssetShelf):
|
||||
|
||||
@classmethod
|
||||
def asset_poll(cls, asset):
|
||||
return asset.file_data.id_type in {'MATERIAL', 'OBJECT'}
|
||||
return asset.id_type in {'MATERIAL', 'OBJECT'}
|
||||
|
||||
|
||||
def register():
|
||||
|
||||
Reference in New Issue
Block a user