Hi I made one add on which can save and load custom props (drive shape keys) and pose bone transform for Armature characters as preset.json with some options.
Then I hope to enhance it which will generate preview image(jpg, or png) with json. (eg When I save "preset.json" from add on UI button,it will auto generate preset.png of current scene preview)
I suppose I can use this module,, bpy.utils submodule (bpy.utils.previews) but do not know clear, how actually it work. What I hope to know is, function whici may generate preview with path which user decided.
I suspect I can mix the funciton with my custom operator class to save json..(so when save the json, same name image file will be genrated as perview)
If someone experience same thing, would you teach me how you achive it(with simple code)?
I suppose I may need to use the bpy.utils.submodule(bpy.utils.previews) but even though I read doc and example (which use the image as UI widgt, but I need not, I only need to know how generate current scene preview as image file)
Though my final goal is same, but I now get some steps, then change tittle.. what I planned is,
- render and save view port open GL image with current user scene setting, when save preset.json from my add on UI button
Then I hope to make render and save function, which render view port(Open GL) image and save the image "without image editor>render-image>save"
I plan to use bpy.ops.render.opengl(), to render sumbnail , is there good way, "without open image editor(Render image) and choose slots" but save to the directory with file name, as arguments?
Have someone alrady made simillar (simple) custom funciton ?