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:
authorCampbell Barton <ideasman42@gmail.com>2016-06-23 00:53:49 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-06-23 00:54:35 +0300
commit29448bd99bb05ae61e4d540981026bab87702f90 (patch)
treece5797a238562438cfb28832be7197af2f3ee654 /source/blender/makesrna/intern/rna_particle.c
parent7547c6a250cd6f36c9894605b822380a1261febf (diff)
Fix T48658: Cycles render & render preview corrupts particles
Replaces `G.is_rendering` with `use_render_params` argument. This is needed for Cycles, which attempts to restore render-preview settings from particles, after it gets its own particle data, but fails to restore because `G.is_rendering` was being checked in psys_cache_paths (and other places).
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 3f401a29945..1f9418f8353 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -341,7 +341,7 @@ static void rna_ParticleSystem_co_hair(ParticleSystem *particlesystem, Object *o
totchild = (int)((float)particlesystem->totchild * (float)(part->disp) / 100.0f);
}
- if (part == NULL || pars == NULL || !psys_check_enabled(object, particlesystem))
+ if (part == NULL || pars == NULL || !psys_check_enabled(object, particlesystem, particlesystem->renderdata != NULL))
return;
if (part->ren_as == PART_DRAW_OB || part->ren_as == PART_DRAW_GR || part->ren_as == PART_DRAW_NOT)
@@ -586,7 +586,7 @@ static void rna_ParticleSystem_set_resolution(ParticleSystem *particlesystem, Sc
psys_render_set(object, particlesystem, mat, mat, 1, 1, 0.f);
psmd->flag &= ~eParticleSystemFlag_psys_updated;
- particle_system_update(scene, object, particlesystem);
+ particle_system_update(scene, object, particlesystem, true);
}
else {
ParticleSystemModifierData *psmd = psys_get_modifier(object, particlesystem);
@@ -596,7 +596,7 @@ static void rna_ParticleSystem_set_resolution(ParticleSystem *particlesystem, Sc
}
psmd->flag &= ~eParticleSystemFlag_psys_updated;
- particle_system_update(scene, object, particlesystem);
+ particle_system_update(scene, object, particlesystem, false);
}
}