diff options
Diffstat (limited to 'intern/cycles/blender/blender_particles.cpp')
-rw-r--r-- | intern/cycles/blender/blender_particles.cpp | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/intern/cycles/blender/blender_particles.cpp b/intern/cycles/blender/blender_particles.cpp index 6f9a0da9d67..ee14217988b 100644 --- a/intern/cycles/blender/blender_particles.cpp +++ b/intern/cycles/blender/blender_particles.cpp @@ -36,10 +36,10 @@ bool BlenderSync::sync_dupli_particle(BL::Object &b_ob, if (!b_psys) return false; - object->set_hide_on_missing_motion(true); + object->hide_on_missing_motion = true; /* test if we need particle data */ - if (!object->get_geometry()->need_attribute(scene, ATTR_STD_PARTICLE)) + if (!object->geometry->need_attribute(scene, ATTR_STD_PARTICLE)) return false; /* don't handle child particles yet */ @@ -57,8 +57,7 @@ bool BlenderSync::sync_dupli_particle(BL::Object &b_ob, scene, &psys, b_ob, b_instance.object(), key); /* no update needed? */ - if (!need_update && !object->get_geometry()->is_modified() && - !scene->object_manager->need_update) + if (!need_update && !object->geometry->need_update && !scene->object_manager->need_update) return true; /* first time used in this sync loop? clear and tag update */ @@ -82,11 +81,10 @@ bool BlenderSync::sync_dupli_particle(BL::Object &b_ob, psys->particles.push_back_slow(pa); - object->set_particle_system(psys); - object->set_particle_index(psys->particles.size() - 1); - - if (object->particle_index_is_modified()) + if (object->particle_index != psys->particles.size() - 1) scene->object_manager->tag_update(scene); + object->particle_system = psys; + object->particle_index = psys->particles.size() - 1; /* return that this object has particle data */ return true; |