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:
authorMatt Ebb <matt@mke3.net>2010-01-03 11:37:18 +0300
committerMatt Ebb <matt@mke3.net>2010-01-03 11:37:18 +0300
commit251ef0a47f34806b911ab18b59f604dd0ef3ea5b (patch)
tree23574564a0d36337c8d2338197c1527cc77e76ca /source/blender/editors/include
parentca4a5f309eed9922eb7d5188173942f36a5adc0d (diff)
Changes to Brush texture workflow
This changes how textures are accessed from Brushes, with the intention of simplifying the workflow, and reducing the amount of clicking. Rather than the previous texture slots (which didn't work as a stack anyway), brushes now have a single texture linked. Rather than taking time having to set up your slots in advance, you can now select and change textures directly as you sculpt/paint on the fly. For complex brushes, node textures can be used, or for fast access, it's easy to make a duplicate of your brush with the texture you like and assign a hotkey. Brush textures can now be chosen from a new Textures panel in the brush tool properties - click on the thumbnail to open a texture selector. This is done using a new variation on the ID template - the number of rows and columns to display in the popup can be customised in the UI scripts.
Diffstat (limited to 'source/blender/editors/include')
-rw-r--r--source/blender/editors/include/UI_interface.h14
-rw-r--r--source/blender/editors/include/UI_interface_icons.h4
2 files changed, 12 insertions, 6 deletions
diff --git a/source/blender/editors/include/UI_interface.h b/source/blender/editors/include/UI_interface.h
index 77a8ea8e912..1cca811d909 100644
--- a/source/blender/editors/include/UI_interface.h
+++ b/source/blender/editors/include/UI_interface.h
@@ -126,11 +126,12 @@ typedef struct uiLayout uiLayout;
#define UI_TEXT_LEFT 64
#define UI_ICON_LEFT 128
#define UI_ICON_SUBMENU 256
+#define UI_ICON_PREVIEW 512
/* control for button type block */
-#define UI_MAKE_TOP 512
-#define UI_MAKE_DOWN 1024
-#define UI_MAKE_LEFT 2048
-#define UI_MAKE_RIGHT 4096
+#define UI_MAKE_TOP 1024
+#define UI_MAKE_DOWN 2048
+#define UI_MAKE_LEFT 4096
+#define UI_MAKE_RIGHT 8192
/* button align flag, for drawing groups together */
#define UI_BUT_ALIGN (15<<14)
@@ -427,6 +428,7 @@ struct PointerRNA *uiButGetOperatorPtrRNA(uiBut *but);
#define UI_ID_FAKE_USER 256
#define UI_ID_PIN 512
#define UI_ID_BROWSE_RENDER 1024
+#define UI_ID_PREVIEWS 2048
#define UI_ID_FULL (UI_ID_RENAME|UI_ID_BROWSE|UI_ID_ADD_NEW|UI_ID_OPEN|UI_ID_ALONE|UI_ID_DELETE|UI_ID_LOCAL)
typedef void (*uiIDPoinFuncFP)(struct bContext *C, char *str, struct ID **idpp);
@@ -451,7 +453,7 @@ uiBut *uiDefIconTextBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg,
uiBut *uiDefKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *spoin, char *tip);
uiBut *uiDefHotKeyevtButS(uiBlock *block, int retval, char *str, short x1, short y1, short x2, short y2, short *keypoin, short *modkeypoin, char *tip);
-uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, char *tip);
+uiBut *uiDefSearchBut(uiBlock *block, void *arg, int retval, int icon, int maxlen, short x1, short y1, short x2, short y2, float a1, float a2, char *tip);
void uiBlockPickerButtons(struct uiBlock *block, float *col, float *hsv, float *old, char *hexcol, char mode, short retval);
void uiBlockColorbandButtons(struct uiBlock *block, struct ColorBand *coba, struct rctf *butr, int event);
@@ -641,6 +643,8 @@ void uiTemplateHeader(uiLayout *layout, struct bContext *C, int menus);
void uiTemplateDopeSheetFilter(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr);
void uiTemplateID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *newop, char *openop, char *unlinkop);
+void uiTemplateIDPreview(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
+ char *newop, char *openop, char *unlinkop, int rows, int cols);
void uiTemplateAnyID(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
char *proptypename, char *text);
void uiTemplatePathBuilder(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, char *propname,
diff --git a/source/blender/editors/include/UI_interface_icons.h b/source/blender/editors/include/UI_interface_icons.h
index afe6a2b9dcb..69e75d0e7c4 100644
--- a/source/blender/editors/include/UI_interface_icons.h
+++ b/source/blender/editors/include/UI_interface_icons.h
@@ -55,7 +55,9 @@ int UI_icon_get_width(int icon_id);
int UI_icon_get_height(int icon_id);
void UI_icon_draw(float x, float y, int icon_id);
-void UI_icon_draw_preview(float x, float y, int icon_id, int nocreate);
+void UI_icon_draw_preview(float x, float y, int icon_id);
+void UI_icon_draw_preview_aspect(float x, float y, int icon_id, float aspect);
+void UI_icon_draw_preview_aspect_size(float x, float y, int icon_id, float aspect, int size);
void UI_icon_draw_aspect(float x, float y, int icon_id, float aspect, float alpha);
void UI_icon_draw_aspect_color(float x, float y, int icon_id, float aspect, float *rgb);