Refactor: Get asset data via asset representation, not file
The "active_file" context member as a way to get the active asset should be avoided, in favor of "asset". This moves us away from the file browser backend as basis of the asset system,
This commit is contained in:
@@ -25,11 +25,6 @@ class SpaceAssetInfo:
|
||||
def is_asset_browser_poll(cls, context: Context):
|
||||
return cls.is_asset_browser(context.space_data)
|
||||
|
||||
@classmethod
|
||||
def get_active_asset(cls, context: Context):
|
||||
if active_file := getattr(context, "active_file", None):
|
||||
return active_file.asset_data
|
||||
|
||||
|
||||
class AssetBrowserPanel:
|
||||
bl_space_type = 'FILE_BROWSER'
|
||||
|
||||
Reference in New Issue
Block a user