Blender Git Loki
Git Commits -> Revision 74330c6
Revision 74330c6 by Bastien Montagne (ui-preview-buttons) April 15, 2015, 20:15 (GMT) |
Initial support for icon/preview/thumbnail of files, including py API. All this is rather rough at the edges still, but seems to be working from quick tests. Basically, it: * Rework a bi BKE_icon, adding a special kind of icons, which type is 0, and which own a PreviewImage in their obj field. * Add helper to generate such icon from a file path. * Add RNA API (to bpy.data currently). So now, one can request a 'Preview' for a given path, that preview has an icon_id that can be passed as 'icon_value' parameters of UILayout functions. Main issue currently is, if you request several time same path, you'll get different icons/previews each time, maybe we want to store paths in another ghash instead? |
Commit Details:
Full Hash: 74330c659599dd25a8e85781fb3258dbdab02255
Parent Commit: 5879462
Lines Changed: +229, -64
18 Modified Paths:
/source/blender/blenkernel/BKE_icons.h (+9, -3) (Diff)
/source/blender/blenkernel/intern/icons.c (+107, -7) (Diff)
/source/blender/blenkernel/intern/image.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/material.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -1) (Diff)
/source/blender/blenlib/BLI_utildefines.h (+5, -0) (Diff)
/source/blender/editors/include/UI_interface_icons.h (+0, -3) (Diff)
/source/blender/editors/interface/interface_icons.c (+25, -19) (Diff)
/source/blender/editors/render/render_preview.c (+1, -1) (Diff)
/source/blender/editors/render/render_update.c (+8, -8) (Diff)
/source/blender/editors/space_image/image_ops.c (+1, -1) (Diff)
/source/blender/imbuf/intern/thumbs.c (+0, -2) (Diff)
/source/blender/makesdna/DNA_ID.h (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_brush.c (+2, -2) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+4, -8) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+60, -3) (Diff)
/source/blender/blenkernel/intern/icons.c (+107, -7) (Diff)
/source/blender/blenkernel/intern/image.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/material.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/texture.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/world.c (+1, -1) (Diff)
/source/blender/blenlib/BLI_utildefines.h (+5, -0) (Diff)
/source/blender/editors/include/UI_interface_icons.h (+0, -3) (Diff)
/source/blender/editors/interface/interface_icons.c (+25, -19) (Diff)
/source/blender/editors/render/render_preview.c (+1, -1) (Diff)
/source/blender/editors/render/render_update.c (+8, -8) (Diff)
/source/blender/editors/space_image/image_ops.c (+1, -1) (Diff)
/source/blender/imbuf/intern/thumbs.c (+0, -2) (Diff)
/source/blender/makesdna/DNA_ID.h (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_brush.c (+2, -2) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+4, -8) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+60, -3) (Diff)