Basically, it:
- Reworks a bit BKE_icon, adding a special kind of icons, which type is 0, and which has a PreviewImage in their obj field.
- Add helper to generate such icon from a file path (including a hash to avoid re-generating a preview for an already processed path).
- Add RNA API (to bpy.data currently - because we may want to use that in background mode too).
So now, one can request a 'Preview' for a given path, that preview has an icon_id
that can be passed as 'icon_value' parameters of UILayout functions.
Note this work is partially based on code from asset-experiments branch.
patch co-worked with @Inês Almeida (brita_).