Brush Assets: Add asset operations to shelf context menu #118017

Merged
Hans Goudey merged 1 commits from HooglyBoogly/blender:brush-assets-shelf-context-menu into brush-assets-project 2024-02-08 23:47:52 +01:00
1 changed files with 7 additions and 0 deletions

View File

@ -8807,6 +8807,13 @@ class BrushAssetShelf:
paint_settings = UnifiedPaintPanel.paint_settings(bpy.context)
return paint_settings.brush_asset_reference if paint_settings else None
@classmethod
def draw_context_menu(self, context, asset, layout):
# Currently this menu adds operators that deal with the affected brush and don't take the
# asset into account. Luckily that is okay for now, since right clicking in the grid view
# also activates the item.
layout.menu_contents("VIEW3D_MT_brush_context_menu")
class VIEW3D_AST_brush_sculpt(BrushAssetShelf, bpy.types.AssetShelf):
mode = 'SCULPT'