Blender Git Commit Log

Git Commits -> Revision 4faef1e

Revision 4faef1e by Bastien Montagne (master)
April 2, 2014, 11:03 (GMT)
Add drag-resize to uiTemplatePreview (mat/tex/etc. preview widget).

This is done by adding a new button type, GRIP, similar to other numbuttons
(scroll, slider, ...), which here controls the preview height.

Then, we add a new DNA struct to be able to save that height in Blend files
(note I choose not to use Panel struct for this, because we would then have the
same limitation we used to have with uiLists, only one preview per panel
and no preview outside panel).

This implies a change to template_preview UI RNA/py API (each preview needs an ID),
but this is backward compatible, as by default datablock type will be used if no ID is
given (which means e.g. all material previews with no ID will have same height).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D342

Commit Details:

Full Hash: 4faef1e10c9d1177eae6350b4471206e91afaff8
Parent Commit: 11ee2d8
Lines Changed: +127, -8

11 Modified Paths:

/source/blender/blenkernel/intern/screen.c (+1, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+2, -0) (Diff)
/source/blender/blenloader/intern/writefile.c (+4, -0) (Diff)
/source/blender/editors/include/UI_interface.h (+3, -1) (Diff)
/source/blender/editors/interface/interface.c (+1, -1) (Diff)
/source/blender/editors/interface/interface_handlers.c (+58, -0) (Diff)
/source/blender/editors/interface/interface_templates.c (+38, -4) (Diff)
/source/blender/editors/interface/interface_widgets.c (+4, -0) (Diff)
/source/blender/makesdna/DNA_screen_types.h (+9, -0) (Diff)
/source/blender/makesrna/intern/rna_ui_api.c (+5, -1) (Diff)
/source/blenderplayer/bad_level_call_stubs/stubs.c (+2, -1) (Diff)
By: Miika HämäläinenLast update: Nov-07-2014 14:18MiikaHweb | 2003-2021