diff options
author | Stuart Broadfoot <gbroadfoot@hotmail.com> | 2013-01-23 21:15:45 +0400 |
---|---|---|
committer | Stuart Broadfoot <gbroadfoot@hotmail.com> | 2013-01-23 21:15:45 +0400 |
commit | 976c6b7b6e9113f7c80e2ee5ac41dfc72a66db4a (patch) | |
tree | 36238a1f11856f135680c178f042fd4d208d7f34 /source/blender | |
parent | ed652aa8d1664c3dd217c91d857b6cb8df15ca68 (diff) |
Cycles Hair: Multiple vertex colours and UV coordinates
Added export of multiple UV coordinates and vertex colour attributes.
A debugging option to export the strands without using the cache has also been removed.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index d8884654435..bd3e4e6862d 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -359,7 +359,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o } -static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, +static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, ParticleSystemModifierData *modifier, ParticleData *particle, int particle_no, int uv_no, float n_uv[2]) { ParticleSettings *part = 0; @@ -398,7 +398,7 @@ static void rna_ParticleSystem_uv_on_emitter(ParticleSystem *particlesystem, Par if (n_uv && ELEM(part->from, PART_FROM_FACE, PART_FROM_VOLUME)) { if (num != DMCACHE_NOTFOUND) { MFace *mface = modifier->dm->getTessFaceData(modifier->dm, num, CD_MFACE); - MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, 0); + MTFace *mtface = (MTFace *)CustomData_get_layer_n(&modifier->dm->faceData, CD_MTFACE, uv_no); mtface += num; psys_interpolate_uvs(mtface, mface->v4, particle->fuv, n_uv); @@ -3365,6 +3365,7 @@ static void rna_def_particle_system(BlenderRNA *brna) prop = RNA_def_pointer(func, "modifier", "ParticleSystemModifier", "", "Particle modifier"); prop = RNA_def_pointer(func, "particle", "Particle", "", "Particle"); prop = RNA_def_int(func, "particle_no", 0, INT_MIN, INT_MAX, "Particle no", "", INT_MIN, INT_MAX); + prop = RNA_def_int(func, "uv_no", 0, INT_MIN, INT_MAX, "UV no", "", INT_MIN, INT_MAX); prop = RNA_def_property(func, "uv", PROP_FLOAT, PROP_COORDS); RNA_def_property_array(prop, 2); RNA_def_property_flag(prop, PROP_THICK_WRAP); |