I have a large collection of models that I’d like to batch mark as asset. I use a .bat file to open the .blend and then mark as asset and then save and quit. It works but the issue is the preview. The models I’m trying to mark as asset already have rendered preview images. I just want to assign the corresponding image preview to the asset. This is what I’ve got so far:
for obj in bpy.data.objects:
if obj.type == “MESH”:
name = obj.name + “.jpg”
dir = “C:\path\” + name
It gives an error of course. The asset marking is working, just need to assign the images as asset previews.