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/blenkernel/intern/particle.c | |
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/blenkernel/intern/particle.c')
-rw-r--r-- | source/blender/blenkernel/intern/particle.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c index e101bd64931..416d63cfefb 100644 --- a/source/blender/blenkernel/intern/particle.c +++ b/source/blender/blenkernel/intern/particle.c @@ -3410,6 +3410,9 @@ static int get_particle_uv(DerivedMesh *dm, ParticleData *pa, int index, const f if (from_vert) { mf = dm->getTessFaceDataArray(dm, CD_MFACE); + /* 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 j = 0; j < dm->getNumTessFaces(dm); j++, mf++) { if (ELEM(i, mf->v1, mf->v2, mf->v3, mf->v4)) { i = j; |