Page MenuHome

Asset Browser: Add selected_ids to filebrowser context
Needs ReviewPublic

Authored by Angus Stanton (abstanton) on Aug 1 2022, 5:05 PM.

Details

Summary

Adds selected_ids member to the filebrowser context.
This allows the 'Clear Asset' context menu operator
to clear multiple assets.
Updates the asset_ops.c logic to use 'selected_ids'
if available, and fallback to 'id' if it is not.

Diff Detail

Repository
rB Blender
Branch
asset-browser-selected-ids (branched from master)
Build Status
Buildable 23224
Build 23224: arc lint + arc unit

Event Timeline

Angus Stanton (abstanton) requested review of this revision.Aug 1 2022, 5:05 PM
Angus Stanton (abstanton) created this revision.
Julian Eisel (Severin) requested changes to this revision.Aug 2 2022, 6:59 PM

Thanks for this! Small fix needed, otherwise looks okay.

source/blender/editors/space_file/space_file.c
967

Needs a null-check for id. Only assets stored in the current files will have one.

This revision now requires changes to proceed.Aug 2 2022, 6:59 PM

Add null check to selected_ids retrieval