mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Assets: Allow downloading asset with already downloaded asset active
When selecting multiple assets, the "Download Assets" entry in the context menu was only visible if the right-clicked on asset was not downloaded yet. The operator downloads all selected assets if needed, so it should instead be in the context menu when any of the selected assets is online. Regardless of which one the context menu was spawned from. The operator poll already does this correctly, the Python UI definition was based on the active asset only. Instead of duplicating logic, use the operator poll to decide if the operator should be visible in the context menu.
This commit is contained in:
parent
d6ec967599
commit
c856aed5a7
1 changed files with 1 additions and 2 deletions
|
|
@ -866,9 +866,8 @@ class ASSETBROWSER_MT_context_menu(AssetBrowserMenu, Menu):
|
|||
layout = self.layout
|
||||
st = context.space_data
|
||||
params = st.params
|
||||
asset = context.asset
|
||||
|
||||
if asset and asset.is_online:
|
||||
if bpy.ops.asset.assets_download.poll():
|
||||
layout.operator("asset.assets_download")
|
||||
layout.separator()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue