16bool BlenderSync::sync_dupli_particle(BL::Object &b_ob,
17 BL::DepsgraphObjectInstance &b_instance,
21 BL::ParticleSystem b_psys = b_instance.particle_system();
26 object->set_hide_on_missing_motion(
true);
34 BL::Array<int, OBJECT_PERSISTENT_ID_SIZE> persistent_id = b_instance.persistent_id();
36 if (persistent_id[0] >= b_psys.particles.length()) {
41 const ParticleSystemKey key(b_ob, persistent_id);
44 const bool first_use = !particle_system_map.is_used(key);
45 const bool need_update = particle_system_map.add_or_update(
46 &psys, b_ob, b_instance.object(), key);
49 if (!need_update && !object->get_geometry()->
is_modified() &&
50 !scene->object_manager->need_update())
62 BL::Particle b_pa = b_psys.
particles[persistent_id[0]];
65 pa.
index = persistent_id[0];
66 pa.
age = b_scene.frame_current_final() - b_pa.birth_time();
70 pa.
size = b_pa.size();
76 object->set_particle_system(psys);
79 if (object->particle_index_is_modified()) {
struct ParticleSystem ParticleSystem
static float4 get_float4(const BL::Array< float, 4 > &array)
static float3 get_float3(const BL::Array< float, 2 > &array)
#define CCL_NAMESPACE_END
void tag_update(Scene *scene)