[Bf-blender-cvs] [5802d45] master: Fix T42395: Stored "render data" in particles mismatches the particle amount and crashes after Cycles render.
Lukas Tönne
noreply at git.blender.org
Wed Oct 29 18:48:50 CET 2014
Commit: 5802d4531d46c99b1d7fb69f8b9ccb700505b414
Author: Lukas Tönne
Date: Wed Oct 29 18:47:11 2014 +0100
Branches: master
https://developer.blender.org/rB5802d4531d46c99b1d7fb69f8b9ccb700505b414
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.
===================================================================
M source/blender/makesdna/DNA_particle_types.h
M source/blender/makesrna/intern/rna_particle.c
===================================================================
diff --git a/source/blender/makesdna/DNA_particle_types.h b/source/blender/makesdna/DNA_particle_types.h
index a2a724b..dd25a49 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 1133113..47d8263 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);
}
}
More information about the Bf-blender-cvs
mailing list