Exemplo n.º 1
0
void cloth_clear_cache(Object *ob, ClothModifierData *clmd, float framenr)
{
	PTCacheID pid;
	
	BKE_ptcache_id_from_cloth(&pid, ob, clmd);

	// don't do anything as long as we're in editmode!
	if(pid.cache->edit && ob->mode & OB_MODE_PARTICLE_EDIT)
		return;
	
	BKE_ptcache_id_clear(&pid, PTCACHE_CLEAR_AFTER, framenr);
}
Exemplo n.º 2
0
static void rna_Smoke_cachetype_set(struct PointerRNA *ptr, int value)
{
	SmokeDomainSettings *settings = (SmokeDomainSettings *)ptr->data;
	Object *ob = (Object *)ptr->id.data;

	if (value != settings->cache_file_format) {
		/* Clear old caches. */
		PTCacheID id;
		BKE_ptcache_id_from_smoke(&id, ob, settings->smd);
		BKE_ptcache_id_clear(&id, PTCACHE_CLEAR_ALL, 0);

		settings->cache_file_format = value;
	}
}