Was having a brainstorm, thought my idea might have some userfulness for others, just wanted to get some input before I get started.
Background (Non Required Reading). I have an addon which users append blender object resources out of a “library” of objects in another .blend file. This is fine, works great. I even have the operator enum generated dynamically (once per addon load). Now that I’m getting fresh with bgl, I would love to have a tiled set of images mapped to objects in the “library” that I can draw on screen to give the user more than just an object name when it comes time to append. I would like to do the following on a blend file.
What I need (Semi Required Reading).
for each object
1. snap the view to each object in a scene (not to bad) (potentially local z and maybe an “obit down” view)
2. zoom to a certain level (some 3d view calcs) hopefully making my screenshot framed correctly
2a. redraw the screen?
3. grab a screenshot (not a rendering…but Im not opposed to a render)
4. tile all the screenshots into a grid of 32x32 or 64x64 pixel thumbnails. (I think i’ll have to write pixel data…blah)
This doesn’t need to be dynamic. I would just run it once on the resource blend file, and leave the image in the resource blend file.
- Do I need to put this on a modal timer so that the screen updates? (I think so)
- How can I do this without involving external image editors. Ideally my users could edit their library, click “update library” so to speak and this would be good to go.
- Can I limit the screenshot function to just a few pixels? http://www.blender.org/documentation/blender_python_api_2_64_release/bpy.ops.screen.html?highlight=screenshot#bpy.ops.screen.screenshot has a boolean option for fullscreen, but I don’t see an option for defining the region.
Any suggestions before I start hacking away? I’ll probably start playing with it this weekend.
Thanks for your time,
thinking out loud,