Cycles fix: don't skip particle device update when there are no particle systems...
[blender.git] / intern / cycles / render / particles.cpp
index c3e4b9510ded4ea146bd11b8c0727c5156c1a819..9f951d9673f9d24fbe7c165377c01d8cefdbabf4 100644 (file)
@@ -67,6 +67,10 @@ void ParticleSystemManager::device_update_particles(Device *device, DeviceScene
        
        /* dummy particle */
        particles[0] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+       particles[1] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+       particles[2] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+       particles[3] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
+       particles[4] = make_float4(0.0f, 0.0f, 0.0f, 0.0f);
        
        int i = 1;
        foreach(ParticleSystem *psys, scene->particle_systems) {
@@ -96,9 +100,6 @@ void ParticleSystemManager::device_update(Device *device, DeviceScene *dscene, S
        
        device_free(device, dscene);
 
-       if(scene->particle_systems.size() == 0)
-               return;
-
        progress.set_status("Updating Particle Systems", "Copying Particles to device");
        device_update_particles(device, dscene, scene, progress);