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:
authorRobert Guetzkow <rjg>2021-01-12 14:12:33 +0300
committerRobert Guetzkow <gitcommit@outlook.de>2021-01-12 14:14:34 +0300
commitf5c0ef52cf2f4ae333269eec33e5bd7a89a00a23 (patch)
treed51ebda929f426eec5bb9d081c4178f0ff12cdd9 /source/blender/makesdna/DNA_particle_types.h
parentc56da67716d9e222baefe78b45412b7652b141a5 (diff)
Fix T84588: Cache access in rna_Particle_uv_on_emitter
The function `rna_Particle_uv_on_emitter` did not handle the case where `particle->num_dmcache` was `DMCACHE_ISCHILD`. This resulted in an incorrect offset for the `mtface` pointer. The commit checks for the case and sets the offset accordingly, similar to existing code in e.g. `particle_calculate_parent_uvs`. Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D10072
Diffstat (limited to 'source/blender/makesdna/DNA_particle_types.h')
-rw-r--r--source/blender/makesdna/DNA_particle_types.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index d48144f90e8..5310ec56b26 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -132,7 +132,10 @@ typedef struct ParticleData {
*/
/** Index to vert/edge/face. */
int num;
- /** Index to derived mesh data (face) to avoid slow lookups. */
+ /**
+ * Index to derived mesh data (face) to avoid slow lookups. It can also have negative
+ * values DMCACHE_NOTFOUND and DMCACHE_ISCHILD.
+ */
int num_dmcache;
/** Coordinates on face/edge number "num" and depth along. */