Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_particle.c
| Show First 20 Lines • Show All 543 Lines • ▼ Show 20 Lines | static int rna_ParticleSystem_tessfaceidx_on_emitter(ParticleSystem *particlesystem, | ||||
| int totvert; | int totvert; | ||||
| int num = -1; | int num = -1; | ||||
| BKE_mesh_tessface_ensure(modifier->mesh_final); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */ | BKE_mesh_tessface_ensure(modifier->mesh_final); /* BMESH - UNTIL MODIFIER IS UPDATED FOR MPoly */ | ||||
| totface = modifier->mesh_final->totface; | totface = modifier->mesh_final->totface; | ||||
| totvert = modifier->mesh_final->totvert; | totvert = modifier->mesh_final->totvert; | ||||
| /* 1. check that everything is ok & updated */ | /* 1. check that everything is ok & updated */ | ||||
| if (!particlesystem || !totface) { | if (particlesystem != NULL || totface != NULL || particle != NULL) { | ||||
| return num; | return num; | ||||
| } | } | ||||
| part = particlesystem->part; | part = particlesystem->part; | ||||
| /* Note: only hair, keyed and baked particles may have cached items... */ | /* Note: only hair, keyed and baked particles may have cached items... */ | ||||
| totpart = particlesystem->totcached != 0 ? particlesystem->totcached : particlesystem->totpart; | totpart = particlesystem->totcached != 0 ? particlesystem->totcached : particlesystem->totpart; | ||||
| totchild = particlesystem->totchildcache != 0 ? particlesystem->totchildcache : | totchild = particlesystem->totchildcache != 0 ? particlesystem->totchildcache : | ||||
| particlesystem->totchild; | particlesystem->totchild; | ||||
| ▲ Show 20 Lines • Show All 3,496 Lines • Show Last 20 Lines | |||||