diff options
author | Luca Rood <dev@lucarood.com> | 2017-07-05 17:16:57 +0300 |
---|---|---|
committer | Luca Rood <dev@lucarood.com> | 2017-07-05 17:19:41 +0300 |
commit | 5e9ad8065a19219f63ff9af86b920f181cf3bac2 (patch) | |
tree | 6de6e8b43d58648c1ea5e1300d750ed5db6082bf /source/blender/makesrna | |
parent | fed853ea782211298c902759ec8cd8e455d8b41d (diff) |
Code comments regarding last commit (forgotten to add before)
Using an arbitrary face as the source of the UV data is mostly fine, as
vertices on seams will generally map to different parts of the texture
that have the same color.
This is regarding fed853ea782211298c902759ec8cd8e455d8b41d
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 0dac797824d..00104b8667d 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -492,6 +492,9 @@ static int rna_ParticleSystem_tessfaceidx_on_emitter(ParticleSystem *particlesys *r_fuv = &particle->fuv; + /* This finds the first face to contain the emitting vertex, + * this is not ideal, but is mostly fine as UV seams generally + * map to equal-colored parts of a texture */ for (int i = 0; i < totface; i++, mface++) { if (ELEM(num, mface->v1, mface->v2, mface->v3, mface->v4)) { return i; @@ -531,6 +534,9 @@ static int rna_ParticleSystem_tessfaceidx_on_emitter(ParticleSystem *particlesys *r_fuv = &parent->fuv; + /* This finds the first face to contain the emitting vertex, + * this is not ideal, but is mostly fine as UV seams generally + * map to equal-colored parts of a texture */ for (int i = 0; i < totface; i++, mface++) { if (ELEM(num, mface->v1, mface->v2, mface->v3, mface->v4)) { return i; |