io_export_blend
io_export_blend copied to clipboard
Preview not created when marking export as asset
Report from BlenderMarket:
i get no preview after exporting selected object and marking it as Asset when exporting. I only see an icon and name in Asset Library.
Additional information:
I can add that I export from 3D view, selecting object and using quick menu command, where I added export to blend command.
i Can’t find export to blend under right click menu.
Linking the conversation so we can reply again if there's an update: https://blendermarket.com/inbox/conversations/83670 Hope you don't mind that I replied for you on the second question since it was an easy answer
I dug into this a little bit and found that the preview does show up if we wait a bit for the generate process to finish before exporting.
A simple time.sleep(0.1) will fix the issue in most cases, but how long the preview takes depends on the complexity of the object / material.
Ideally, we would be able to wait until a preview image is detected or a max time limit is reached and then do the export. We can detect the image with preview.image_size[0] , but looping the time.sleep function with a while loop doesn't seem to work well in Blender. Instead, we're supposed to use app timers, but I have yet to get that working like their examples.
https://github.com/CGCookie/io_export_blend/pull/20 has the simple fix that will satisfy the user who asked about it, but I'd still like to find a proper solution.