18bool BlenderSync::sync_dupli_particle(BL::Object &b_ob,
19 BL::DepsgraphObjectInstance &b_instance,
23 BL::ParticleSystem b_psys = b_instance.particle_system();
28 object->set_hide_on_missing_motion(
true);
36 BL::Array<int, OBJECT_PERSISTENT_ID_SIZE> persistent_id = b_instance.persistent_id();
38 if (persistent_id[0] >= b_psys.particles.length()) {
46 bool first_use = !particle_system_map.
is_used(key);
47 bool need_update = particle_system_map.
add_or_update(&psys, b_ob, b_instance.object(), key);
50 if (!need_update && !object->get_geometry()->is_modified() &&
51 !scene->object_manager->need_update())
63 BL::Particle b_pa = b_psys.particles[persistent_id[0]];
66 pa.
index = persistent_id[0];
67 pa.
age = b_scene.frame_current_final() - b_pa.birth_time();
71 pa.
size = b_pa.size();
77 object->set_particle_system(psys);
80 if (object->particle_index_is_modified()) {
bool add_or_update(T **r_data, const BL::ID &id)
bool is_used(const K &key)
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)