diff options
author | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-17 08:40:59 +0400 |
---|---|---|
committer | Nicholas Bishop <nicholasbishop@gmail.com> | 2009-08-17 08:40:59 +0400 |
commit | a3b317daf7fbaa2359afbfdf0524b590d3622f2e (patch) | |
tree | af7876365655c372b4a7a3e16c41fde9b725d3ad /source/blender/makesrna | |
parent | 3425925a7702c0a5527c60b2da044dad378d7f2c (diff) |
2.5 Texture paint:
* Converted to use Paint struct. Now all the brush modes are done.
TODO:
* Make the UI better
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index f3b970c7659..c2c906e38f2 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -204,14 +204,10 @@ static void rna_def_image_paint(BlenderRNA *brna) {PAINT_TOOL_CLONE, "CLONE", 0, "Clone", ""}, {0, NULL, 0, NULL, NULL}}; - srna= RNA_def_struct(brna, "ImagePaint", NULL); + srna= RNA_def_struct(brna, "ImagePaint", "Paint"); RNA_def_struct_sdna(srna, "ImagePaintSettings"); RNA_def_struct_ui_text(srna, "Image Paint", "Properties of image and texture painting mode."); - prop= RNA_def_property(srna, "brush", PROP_POINTER, PROP_NONE); - RNA_def_property_struct_type(prop, "Brush"); - RNA_def_property_ui_text(prop, "Brush", ""); - prop= RNA_def_property(srna, "tool", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, tool_items); RNA_def_property_ui_text(prop, "Tool", ""); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index 24337c0fc70..6ecf533e39d 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -37,6 +37,8 @@ #include "DNA_space_types.h" #include "DNA_view3d_types.h" +#include "BKE_paint.h" + #include "WM_types.h" EnumPropertyItem space_type_items[] = { @@ -145,7 +147,7 @@ static void rna_SpaceImageEditor_paint_update(bContext *C, PointerRNA *ptr) Scene *scene= CTX_data_scene(C); if(scene) - brush_check_exists(&scene->toolsettings->imapaint.brush, "Brush"); + paint_init(&scene->toolsettings->imapaint.paint, "Brush"); } static int rna_SpaceImageEditor_show_render_get(PointerRNA *ptr) |