Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2014-04-02 14:59:48 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-04-02 15:03:11 +0400
commit4faef1e10c9d1177eae6350b4471206e91afaff8 (patch)
tree507726457b31e3d27bac0669f709c2bf26804455 /source/blenderplayer
parent11ee2d8b97ddbdde9ef5a7b77df2b9f9eb2d0e91 (diff)
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
Diffstat (limited to 'source/blenderplayer')
-rw-r--r--source/blenderplayer/bad_level_call_stubs/stubs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c
index 619624b01b5..2c3e4677837 100644
--- a/source/blenderplayer/bad_level_call_stubs/stubs.c
+++ b/source/blenderplayer/bad_level_call_stubs/stubs.c
@@ -521,7 +521,8 @@ void uiTemplateHeader(struct uiLayout *layout, struct bContext *C) RET_NONE
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop) RET_NONE
struct uiLayout *uiTemplateModifier(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr) RET_NULL
struct uiLayout *uiTemplateConstraint(struct uiLayout *layout, struct PointerRNA *ptr) RET_NULL
-void uiTemplatePreview(struct uiLayout *layout, struct ID *id, int show_buttons, struct ID *parent, struct MTex *slot) RET_NONE
+void uiTemplatePreview(struct uiLayout *layout, struct bContext *C, struct ID *id, int show_buttons, struct ID *parent,
+ struct MTex *slot, const char *preview_id) RET_NONE
void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int rows, int cols) RET_NONE
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, int levels, int brush) RET_NONE
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int expand) RET_NONE