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/editors/physics | |
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/editors/physics')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index d72357a38b1..0a2c8a5b4a7 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -526,6 +526,7 @@ void PARTICLE_OT_dupliob_move_down(wmOperatorType *ot) static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) { ParticleSystemModifierData *psmd = psys_get_modifier(ob,psys); + ParticleEditSettings *pset= PE_settings(scene); ParticleData *pa; PTCacheEdit *edit; PTCacheEditPoint *point; @@ -565,6 +566,9 @@ static void disconnect_hair(Scene *scene, Object *ob, ParticleSystem *psys) psys->flag |= PSYS_GLOBAL_HAIR; + if(ELEM(pset->brushtype, PE_BRUSH_ADD, PE_BRUSH_PUFF)) + pset->brushtype = PE_BRUSH_NONE; + PE_update_object(scene, ob, 0); } |