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:
authorLukas Tönne <lukas.toenne@gmail.com>2014-10-29 20:47:11 +0300
committerLukas Tönne <lukas.toenne@gmail.com>2014-10-29 20:48:44 +0300
commit5802d4531d46c99b1d7fb69f8b9ccb700505b414 (patch)
tree6a86c3efcfb05b72d59678e595f2299ea2f47eaf
parent26b5fb8f58cc87262e0854552a584e596c552b6a (diff)
Fix T42395: Stored "render data" in particles mismatches the particle
amount and crashes after Cycles render. This is a hack to fix this, but at this point the system is hopelessly broken anyway and no good fix other than total rewriting is possible.
-rw-r--r--source/blender/makesdna/DNA_particle_types.h2
-rw-r--r--source/blender/makesrna/intern/rna_particle.c8
2 files changed, 8 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index a2a724b6a32..dd25a49c476 100644
--- a/source/blender/makesdna/DNA_particle_types.h
+++ b/source/blender/makesdna/DNA_particle_types.h
@@ -293,7 +293,7 @@ typedef struct ParticleSystem {
short vgroup[12], vg_neg, rt3; /* vertex groups, 0==disable, 1==starting index */
/* temporary storage during render */
- void *renderdata;
+ struct ParticleRenderData *renderdata;
/* point cache */
struct PointCache *pointcache;
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 113311383f4..47d8263d71f 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -589,8 +589,14 @@ static void rna_ParticleSystem_set_resolution(ParticleSystem *particlesystem, Sc
particle_system_update(scene, object, particlesystem);
}
else {
- if (particlesystem->renderdata)
+ ParticleSystemModifierData *psmd = psys_get_modifier(object, particlesystem);
+
+ if (particlesystem->renderdata) {
psys_render_restore(object, particlesystem);
+ }
+
+ psmd->flag &= ~eParticleSystemFlag_psys_updated;
+ particle_system_update(scene, object, particlesystem);
}
}