[Bf-codereview] Limit brushes to a single paint tool (issue 5671088)

NicholasBishop at gmail.com NicholasBishop at gmail.com
Fri Feb 17 22:50:49 CET 2012


Reviewers: bf-codereview_blender.org,

Description:
This patch limits each brush to a single paint tool. It converts
Brush.ob_mode to Brush.paint_mode, where paint mode can be:
BRUSH_MODE_NONE, BRUSH_MODE_SCULPT, BRUSH_MODE_VERTEX_WEIGHT_PAINT,
BRUSH_MODE_TEXTURE_PAINT, or BRUSH_MODE_UV_SCULPT.

During file read, brushes with more than one ob_mode are split in to
multiple brushes.

The purpose of this is to simplify brush code. You can now tell which
brush tool is in use with just the brush pointer, rather than having to
check the current object mode. This would be nice for RNA in particular.

This is a bit rough, wanted to see if there's interest in doing this
first (see mail to bf-committers.)


Please review this at http://codereview.appspot.com/5671088/

Affected files:
   release/scripts/startup/bl_ui/space_view3d_toolbar.py
   source/blender/blenkernel/BKE_brush.h
   source/blender/blenkernel/BKE_paint.h
   source/blender/blenkernel/intern/brush.c
   source/blender/blenkernel/intern/paint.c
   source/blender/blenloader/intern/readfile.c
   source/blender/editors/sculpt_paint/paint_image.c
   source/blender/editors/sculpt_paint/paint_ops.c
   source/blender/editors/sculpt_paint/paint_vertex.c
   source/blender/editors/sculpt_paint/sculpt.c
   source/blender/makesdna/DNA_brush_types.h
   source/blender/makesdna/DNA_scene_types.h
   source/blender/makesrna/RNA_enum_types.h
   source/blender/makesrna/intern/rna_brush.c
   source/blender/makesrna/intern/rna_main_api.c
   source/blender/makesrna/intern/rna_sculpt_paint.c
   source/blender/makesrna/intern/rna_space.c




More information about the Bf-codereview mailing list