diff options
author | Daniel Genrich <daniel.genrich@gmx.net> | 2012-01-13 19:14:08 +0400 |
---|---|---|
committer | Daniel Genrich <daniel.genrich@gmx.net> | 2012-01-13 19:14:08 +0400 |
commit | 2cde9bb99c902d996fa8ab287719e16525a889fd (patch) | |
tree | 5e699f84ee6cb2964565fbcacf0617f205bf92ba /source/blender/editors | |
parent | b1a3041f828a3b76cf1b5dabcf44fd5266afeceb (diff) |
Bugfix: Editing baked cache in particle mode for Softbody and Cloth now shows changes in 3dview without having to exit + enter editmode.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/physics/particle_edit.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c index 52e6d4f6ab8..d1e24df64ea 100644 --- a/source/blender/editors/physics/particle_edit.c +++ b/source/blender/editors/physics/particle_edit.c @@ -254,13 +254,21 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create) } else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) { if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) + { + pset->flag |= PE_FADE_TIME; + // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB; PE_create_particle_edit(scene, ob, pid->cache, NULL); + } edit = pid->cache->edit; break; } else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) { if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit) + { + pset->flag |= PE_FADE_TIME; + // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB; PE_create_particle_edit(scene, ob, pid->cache, NULL); + } edit = pid->cache->edit; break; } @@ -3659,8 +3667,14 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr) PE_update_object(scene, ob, 1); } - WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); - + if(edit->psys) + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob); + else + { + DAG_id_tag_update(&ob->id, OB_RECALC_DATA); + WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob); + } + bedit->lastmouse[0]= mouse[0]; bedit->lastmouse[1]= mouse[1]; bedit->first= 0; |