diff options
author | Janne Karhu <jhkarh@gmail.com> | 2010-03-09 06:42:20 +0300 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2010-03-09 06:42:20 +0300 |
commit | 63d96b8ca06440ee74bec7636ef7b88f6ec5b676 (patch) | |
tree | da3d1036bdf1d5af84d6e823dde2a8aa75be78b7 /source/blender/makesrna/intern/rna_sculpt_paint.c | |
parent | c1166642d041639508ad93735b8e5e24daf5f2e6 (diff) |
Fix for: [#20937] Add brush doesnt work when disconnected hair option is enabled.
Really not much to fix, since it's just not supposed to work. Removed the non-working
brushes (add and puff) from the brush list while hair is disconnected.
Diffstat (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 4aa1401ac84..c4830250aa8 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -56,6 +56,15 @@ static EnumPropertyItem particle_edit_hair_brush_items[] = { #include "ED_particle.h" +static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = { + {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"}, + {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb hairs"}, + {PE_BRUSH_SMOOTH, "SMOOTH", 0, "Smooth", "Smooth hairs"}, + {PE_BRUSH_LENGTH, "LENGTH", 0, "Length", "Make hairs longer or shorter"}, + {PE_BRUSH_CUT, "CUT", 0, "Cut", "Cut hairs"}, + {PE_BRUSH_WEIGHT, "WEIGHT", 0, "Weight", "Weight hair particles"}, + {0, NULL, 0, NULL, NULL}}; + static EnumPropertyItem particle_edit_cache_brush_items[] = { {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"}, {PE_BRUSH_COMB, "COMB", 0, "Comb", "Comb paths"}, @@ -126,8 +135,12 @@ static EnumPropertyItem *rna_ParticleEdit_tool_itemf(bContext *C, PointerRNA *pt Object *ob= (scene->basact)? scene->basact->object: NULL; PTCacheEdit *edit = PE_get_current(scene, ob); - if(edit && edit->psys) - return particle_edit_hair_brush_items; + if(edit && edit->psys) { + if(edit->psys->flag & PSYS_GLOBAL_HAIR) + return particle_edit_disconnected_hair_brush_items; + else + return particle_edit_hair_brush_items; + } return particle_edit_cache_brush_items; } |