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:
authorAntony Riakiotakis <kalast@gmail.com>2015-02-13 14:48:36 +0300
committerAntony Riakiotakis <kalast@gmail.com>2015-02-13 14:48:36 +0300
commit84ea48d58b90218f97025f94e0b924d7aea665cb (patch)
tree4e42026203e4307348cb77c058dd8f2fc1d4d5db /source/blender/blenkernel/intern/particle_system.c
parent80ce3516cc8d9ce8f83e04542b20f70f96091570 (diff)
parent90a9415c9a15fafadad7dc97440034303884a272 (diff)
Painstakingly merge branch 'master' into gooseberry
Conflicts: release/scripts/startup/bl_ui/space_view3d.py source/blender/blenkernel/BKE_camera.h source/blender/blenkernel/BKE_screen.h source/blender/blenkernel/intern/camera.c source/blender/blenkernel/intern/screen.c source/blender/blenloader/intern/readfile.c source/blender/blenloader/intern/versioning_270.c source/blender/blenloader/intern/writefile.c source/blender/editors/include/ED_view3d.h source/blender/editors/render/render_opengl.c source/blender/editors/space_view3d/space_view3d.c source/blender/editors/space_view3d/view3d_draw.c source/blender/gpu/CMakeLists.txt source/blender/gpu/GPU_compositing.h source/blender/gpu/GPU_extensions.h source/blender/gpu/intern/gpu_compositing.c source/blender/gpu/intern/gpu_extensions.c source/blender/gpu/shaders/gpu_shader_fx_dof_frag.glsl source/blender/gpu/shaders/gpu_shader_fx_dof_vert.glsl source/blender/gpu/shaders/gpu_shader_fx_lib.glsl source/blender/gpu/shaders/gpu_shader_fx_ssao_frag.glsl source/blender/gpu/shaders/gpu_shader_fx_vert.glsl source/blender/makesdna/DNA_camera_types.h source/blender/makesdna/DNA_gpu_types.h source/blender/makesdna/DNA_view3d_types.h source/blender/makesdna/intern/makesdna.c source/blender/makesrna/intern/rna_camera.c source/blender/makesrna/intern/rna_scene.c source/blender/makesrna/intern/rna_space.c
Diffstat (limited to 'source/blender/blenkernel/intern/particle_system.c')
-rw-r--r--source/blender/blenkernel/intern/particle_system.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/source/blender/blenkernel/intern/particle_system.c b/source/blender/blenkernel/intern/particle_system.c
index 4a17e20dbb9..b22ac6aa042 100644
--- a/source/blender/blenkernel/intern/particle_system.c
+++ b/source/blender/blenkernel/intern/particle_system.c
@@ -522,22 +522,25 @@ static void initialize_particle_texture(ParticleSimulationData *sim, ParticleDat
ParticleSystem *psys = sim->psys;
ParticleSettings *part = psys->part;
ParticleTexture ptex;
+ bool has_texture = false;
- psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f);
+ has_texture = psys_get_texture(sim, pa, &ptex, PAMAP_INIT, 0.f);
- switch (part->type) {
- case PART_EMITTER:
- if (ptex.exist < psys_frand(psys, p+125))
- pa->flag |= PARS_UNEXIST;
- pa->time = part->sta + (part->end - part->sta)*ptex.time;
- break;
- case PART_HAIR:
- if (ptex.exist < psys_frand(psys, p+125))
- pa->flag |= PARS_UNEXIST;
- pa->time = 0.f;
- break;
- case PART_FLUID:
- break;
+ if (has_texture) {
+ switch (part->type) {
+ case PART_EMITTER:
+ if (ptex.exist < psys_frand(psys, p+125))
+ pa->flag |= PARS_UNEXIST;
+ pa->time = part->sta + (part->end - part->sta)*ptex.time;
+ break;
+ case PART_HAIR:
+ if (ptex.exist < psys_frand(psys, p+125))
+ pa->flag |= PARS_UNEXIST;
+ pa->time = 0.f;
+ break;
+ case PART_FLUID:
+ break;
+ }
}
}
@@ -970,6 +973,7 @@ void reset_particle(ParticleSimulationData *sim, ParticleData *pa, float dtime,
ParticleSettings *part;
ParticleTexture ptex;
int p = pa - psys->particles;
+
part=psys->part;
/* get precise emitter matrix if particle is born */