forked from bartvdbraak/blender
Bugfix: Editing baked cache in particle mode for Softbody and Cloth now shows changes in 3dview without having to exit + enter editmode.
This commit is contained in:
parent
b1a3041f82
commit
2cde9bb99c
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user