2
$\begingroup$

I'm trying to figure out in the API where the custom image of a material in the Asset Browser, but I can't figure out where it is stored.

Note: I'm not talking about the image rendered by Cycles, but rather an image that I loaded manually through the operator bpy.ops.ed.lib_id_load_custom_preview()

I would have expected to find the preview stored in some property like this:

D.materials['My mat'].asset_data.preview

Unfortunately it seems difficult to understand where it is stored, and whether it is possible to obtain it via the python API.

$\endgroup$

1 Answer 1

1
$\begingroup$

TL;DNR: Looks like another incomplete part of the asset browser Python API.

It's definitely not in the asset data and there doesn't appear to be an asset op that accesses the information. I think it's yet another part of the Asset Browser that currently doesn't have an API. The only thing I could find relevant was this addon for creating custom snapshots. It validates your assumption about how to read the data; but doesn't appear to use the existing data before it creates a new image.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .