I am trying to automate the creation of assets in a Blender file, but when I try to call bpy.ops.asset.mark() it reports “No data-block selected that supports asset operation” even though an object is selected.
I assume because this is only intended to be called from the outliner. I have tried overriding the context, but haven’t be able to figure it out.
You can reproduce this by typing:
Into the scripting interface and running the script.
Does anyone know of a way to mark an asset using the python API?