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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-05 17:33:54 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2013-02-05 17:33:54 +0400
commit1ca0d66bd20739132fb43fb07f80edac347ce745 (patch)
treee2561d451756754fd062d05ea6601db5696dc70b /source/blender/blenkernel/intern/particle.c
parent7ecc9cfdf4a74c7264da7e812736c0f520d02d50 (diff)
Fix particle child render resolution access not working outside of the render thread,
and rename ToggleRender to set_resolution to follow RNA conventions.
Diffstat (limited to 'source/blender/blenkernel/intern/particle.c')
-rw-r--r--source/blender/blenkernel/intern/particle.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 71854a93f4d..c01ea4e518d 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -684,8 +684,6 @@ void psys_render_set(Object *ob, ParticleSystem *psys, float viewmat[4][4], floa
ParticleRenderData *data;
ParticleSystemModifierData *psmd = psys_get_modifier(ob, psys);
- if (G.is_rendering == FALSE)
- return;
if (psys->renderdata)
return;
@@ -2384,7 +2382,7 @@ void psys_find_parents(ParticleSimulationData *sim)
int from = PART_FROM_FACE;
totparent = (int)(totchild * part->parents * 0.3f);
- if (G.is_rendering && part->child_nbr && part->ren_child_nbr)
+ if ((sim->psys->renderdata || G.is_rendering) && part->child_nbr && part->ren_child_nbr)
totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
tree = BLI_kdtree_new(totparent);
@@ -2461,7 +2459,7 @@ static int psys_threads_init_path(ParticleThread *threads, Scene *scene, float c
if (totchild && part->childtype == PART_CHILD_FACES) {
totparent = (int)(totchild * part->parents * 0.3f);
- if (G.is_rendering && part->child_nbr && part->ren_child_nbr)
+ if ((psys->renderdata || G.is_rendering) && part->child_nbr && part->ren_child_nbr)
totparent *= (float)part->child_nbr / (float)part->ren_child_nbr;
/* part->parents could still be 0 so we can't test with totparent */