diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 02:05:52 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2010-07-26 02:05:52 +0400 |
commit | ba30ac1230c400a0aab0515cd4d39c546f90c96a (patch) | |
tree | 84d034ce8beaece844e8b434381c8395cc90402b /source | |
parent | 98e26b1b081205730c4392fa884810bb65bd0c21 (diff) |
== Sculpt ==
Minor sculpt cleanups
* Moved the (previously extern) declarations of the brush icon data to ED_datafiles.h
* Set sculpt tool RNA to alphabetical order, quite a long list now
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/include/ED_datafiles.h | 88 | ||||
-rw-r--r-- | source/blender/editors/render/render_preview.c | 63 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_brush.c | 25 |
3 files changed, 101 insertions, 75 deletions
diff --git a/source/blender/editors/include/ED_datafiles.h b/source/blender/editors/include/ED_datafiles.h index 9a5a1a5bea6..2c352abcd00 100644 --- a/source/blender/editors/include/ED_datafiles.h +++ b/source/blender/editors/include/ED_datafiles.h @@ -52,5 +52,93 @@ extern char datatoc_bfont_ttf[]; extern int datatoc_bmonofont_ttf_size; extern char datatoc_bmonofont_ttf[]; +/* Brush icon datafiles */ +/* TODO: this could be simplified by putting all + the brush icons in one file */ +extern int datatoc_add_png_size; +extern char datatoc_add_png[]; + +extern int datatoc_blob_png_size; +extern char datatoc_blob_png[]; + +extern int datatoc_blur_png_size; +extern char datatoc_blur_png[]; + +extern int datatoc_clay_png_size; +extern char datatoc_clay_png[]; + +extern int datatoc_clone_png_size; +extern char datatoc_clone_png[]; + +extern int datatoc_crease_png_size; +extern char datatoc_crease_png[]; + +extern int datatoc_darken_png_size; +extern char datatoc_darken_png[]; + +extern int datatoc_draw_png_size; +extern char datatoc_draw_png[]; + +extern int datatoc_fill_png_size; +extern char datatoc_fill_png[]; + +extern int datatoc_flatten_png_size; +extern char datatoc_flatten_png[]; + +extern int datatoc_grab_png_size; +extern char datatoc_grab_png[]; + +extern int datatoc_inflate_png_size; +extern char datatoc_inflate_png[]; + +extern int datatoc_layer_png_size; +extern char datatoc_layer_png[]; + +extern int datatoc_lighten_png_size; +extern char datatoc_lighten_png[]; + +extern int datatoc_mix_png_size; +extern char datatoc_mix_png[]; + +extern int datatoc_multiply_png_size; +extern char datatoc_multiply_png[]; + +extern int datatoc_nudge_png_size; +extern char datatoc_nudge_png[]; + +extern int datatoc_pinch_png_size; +extern char datatoc_pinch_png[]; + +extern int datatoc_scrape_png_size; +extern char datatoc_scrape_png[]; + +extern int datatoc_smear_png_size; +extern char datatoc_smear_png[]; + +extern int datatoc_smooth_png_size; +extern char datatoc_smooth_png[]; + +extern int datatoc_snake_hook_png_size; +extern char datatoc_snake_hook_png[]; + +extern int datatoc_soften_png_size; +extern char datatoc_soften_png[]; + +extern int datatoc_subtract_png_size; +extern char datatoc_subtract_png[]; + +extern int datatoc_texdraw_png_size; +extern char datatoc_texdraw_png[]; + +extern int datatoc_thumb_png_size; +extern char datatoc_thumb_png[]; + +extern int datatoc_twist_png_size; +extern char datatoc_twist_png[]; + +extern int datatoc_vertexdraw_png_size; +extern char datatoc_vertexdraw_png[]; + + #endif /* ED_DATAFILES_H */ diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 8cbcd0e9402..2342d73768e 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -85,6 +85,7 @@ #include "WM_api.h" #include "WM_types.h" +#include "ED_datafiles.h" #include "ED_render.h" #include "ED_view3d.h" @@ -103,68 +104,6 @@ static int qtest() {return 0;} ImBuf* get_brush_icon(Brush *brush) { - /* Sculpt */ - extern char datatoc_blob_png; - extern char datatoc_clay_png; - extern char datatoc_crease_png; - extern char datatoc_draw_png; - extern char datatoc_fill_png; - extern char datatoc_flatten_png; - extern char datatoc_grab_png; - extern char datatoc_inflate_png; - extern char datatoc_layer_png; - extern char datatoc_nudge_png; - extern char datatoc_pinch_png; - extern char datatoc_scrape_png; - extern char datatoc_smooth_png; - extern char datatoc_snake_hook_png; - extern char datatoc_thumb_png; - extern char datatoc_twist_png; - - /* Paint */ - extern char datatoc_add_png; - extern char datatoc_blur_png; - extern char datatoc_clone_png; - extern char datatoc_darken_png; - extern char datatoc_lighten_png; - extern char datatoc_mix_png; - extern char datatoc_multiply_png; - extern char datatoc_smear_png; - extern char datatoc_soften_png; - extern char datatoc_subtract_png; - extern char datatoc_texdraw_png; - extern char datatoc_vertexdraw_png; - - extern int datatoc_blob_png_size; - extern int datatoc_clay_png_size; - extern int datatoc_crease_png_size; - extern int datatoc_draw_png_size; - extern int datatoc_fill_png_size; - extern int datatoc_flatten_png_size; - extern int datatoc_grab_png_size; - extern int datatoc_inflate_png_size; - extern int datatoc_layer_png_size; - extern int datatoc_nudge_png_size; - extern int datatoc_pinch_png_size; - extern int datatoc_scrape_png_size; - extern int datatoc_smooth_png_size; - extern int datatoc_snake_hook_png_size; - extern int datatoc_thumb_png_size; - extern int datatoc_twist_png_size; - - extern int datatoc_add_png_size; - extern int datatoc_blur_png_size; - extern int datatoc_clone_png_size; - extern int datatoc_darken_png_size; - extern int datatoc_lighten_png_size; - extern int datatoc_mix_png_size; - extern int datatoc_multiply_png_size; - extern int datatoc_smear_png_size; - extern int datatoc_soften_png_size; - extern int datatoc_subtract_png_size; - extern int datatoc_texdraw_png_size; - extern int datatoc_vertexdraw_png_size; - void *icon_data[]= { 0, diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c index cd2a515d185..63c41024ec9 100644 --- a/source/blender/makesrna/intern/rna_brush.c +++ b/source/blender/makesrna/intern/rna_brush.c @@ -240,23 +240,22 @@ static void rna_def_brush(BlenderRNA *brna) {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem brush_sculpt_tool_items[] = { - {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""}, - {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""}, - {SCULPT_TOOL_CREASE, "CREASE", 0, "Crease", ""}, {SCULPT_TOOL_BLOB, "BLOB", 0, "Blob", ""}, - {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""}, - {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""}, - {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""}, - {SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""}, - {SCULPT_TOOL_ROTATE, "ROTATE", 0, "Rotate", ""}, - {SCULPT_TOOL_THUMB, "THUMB", 0, "Thumb", ""}, - {SCULPT_TOOL_NUDGE, "NUDGE", 0, "Nudge", ""}, - {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""}, - {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""}, {SCULPT_TOOL_CLAY, "CLAY", 0, "Clay", ""}, - //{SCULPT_TOOL_CLAY_TUBES, "CLAY_TUBES", 0, "Clay Tubes", ""}, XXX: remove clay tubes from UI + {SCULPT_TOOL_CREASE, "CREASE", 0, "Crease", ""}, + {SCULPT_TOOL_DRAW, "DRAW", 0, "Draw", ""}, {SCULPT_TOOL_FILL, "FILL", 0, "Fill", ""}, + {SCULPT_TOOL_FLATTEN, "FLATTEN", 0, "Flatten", ""}, + {SCULPT_TOOL_GRAB, "GRAB", 0, "Grab", ""}, + {SCULPT_TOOL_INFLATE, "INFLATE", 0, "Inflate", ""}, + {SCULPT_TOOL_LAYER, "LAYER", 0, "Layer", ""}, + {SCULPT_TOOL_NUDGE, "NUDGE", 0, "Nudge", ""}, + {SCULPT_TOOL_PINCH, "PINCH", 0, "Pinch", ""}, + {SCULPT_TOOL_ROTATE, "ROTATE", 0, "Rotate", ""}, {SCULPT_TOOL_SCRAPE, "SCRAPE", 0, "Scrape", ""}, + {SCULPT_TOOL_SMOOTH, "SMOOTH", 0, "Smooth", ""}, + {SCULPT_TOOL_SNAKE_HOOK, "SNAKE_HOOK", 0, "Snake Hook", ""}, + {SCULPT_TOOL_THUMB, "THUMB", 0, "Thumb", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem brush_stroke_method_items[] = { |