static void ptcache_free_bake(PointCache *cache)
{
    if (cache->edit) {
        if (!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
            PE_free_ptcache_edit(cache->edit);
            cache->edit = NULL;
            cache->flag &= ~PTCACHE_BAKED;
        }
    }
    else {
        cache->flag &= ~PTCACHE_BAKED;
    }
}
static int ptcache_free_bake_exec(bContext *C, wmOperator *UNUSED(op))
{
	PointerRNA ptr= CTX_data_pointer_get_type(C, "point_cache", &RNA_PointCache);
	PointCache *cache= ptr.data;
	Object *ob= ptr.id.data;

	if(cache->edit) {
		if(!cache->edit->edited || 1) {// XXX okee("Lose changes done in particle mode?")) {
			PE_free_ptcache_edit(cache->edit);
			cache->edit = NULL;
			cache->flag &= ~PTCACHE_BAKED;
		}
	}
	else
		cache->flag &= ~PTCACHE_BAKED;
	
	WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob);

	return OPERATOR_FINISHED;
}