Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Rood <dev@lucarood.com>2017-07-05 17:16:57 +0300
committerLuca Rood <dev@lucarood.com>2017-07-05 17:19:41 +0300
commit5e9ad8065a19219f63ff9af86b920f181cf3bac2 (patch)
tree6de6e8b43d58648c1ea5e1300d750ed5db6082bf /source/blender/blenkernel/intern/particle_distribute.c
parentfed853ea782211298c902759ec8cd8e455d8b41d (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_distribute.c')
-rw-r--r--source/blender/blenkernel/intern/particle_distribute.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/particle_distribute.c b/source/blender/blenkernel/intern/particle_distribute.c
index 09da5fe7245..4f758bde7f9 100644
--- a/source/blender/blenkernel/intern/particle_distribute.c
+++ b/source/blender/blenkernel/intern/particle_distribute.c
@@ -440,6 +440,10 @@ static void distribute_from_verts_exec(ParticleTask *thread, ParticleData *pa, i
zero_v4(pa->fuv);
if (pa->num != DMCACHE_NOTFOUND && pa->num < ctx->dm->getNumVerts(ctx->dm)) {
+
+ /* 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 < ctx->dm->getNumTessFaces(ctx->dm); i++, mface++) {
if (ELEM(pa->num, mface->v1, mface->v2, mface->v3, mface->v4)) {
unsigned int *vert = &mface->v1;