How to get child particle data?

Is it possible to read child particle/hair data (for exporting to another rendering engine) with Python in 2.5x? The ChildParticle class is totally useless, but is there another way? This wasn’t a problem in 2.49, so I’m a little dismayed to see that it’s been “improved” since then.

Do not know, what a ‘ChildParticle’ is (never used I think).
Give me a .blend with an example … most (so not all) things are accessible in Bl 2.59 …
and with pointing to the object where you want data of … maybe??!

You don’t need an example .blend file; any scene with particles or hair will work.

Let’s say particleSystem is a pointer to a particle system. In 2.49, the function particleSystem.getLoc() would return a list of the locations of each particle, including rendered child particles. This made it possible for external renderers to draw the same particles/hair as Blender’s internal renderer.

In 2.5, it’s possible to get the locations of only the parent particles by iterating over particleSystem:

for prt in particleSystem.particles:
    # for particles
    loc = prt.location
    # or, for hair
    for hkey in prt.hair_keys
        loc = hkey.co

Without some way to read the locations of the child particles, this cripples the ability to render particles and (especially) hair with an external renderer. So, is there another way to get the locations of child particles, or has this functionality been totally lost?

You are using a somewhat old Blender version?!
Bl.259
See:
>>> o=C.active_object
>>> o.par
ent
ent_bone
ent_type
ent_vertices
ticle_systems
>>> o.particle_systems
bpy.data.objects[“Plane”].particle_systems

So particleSytems is NOT available

You may look at this to find out yourself :evilgrin:
>>> o=C.active_object
>>> o.par
ent
ent_bone
ent_type
ent_vertices
ticle_systems
>>> o.particle_systems
bpy.data.objects[“Plane”].particle_systems

>>> dir(po.values()[0])
[‘doc’, ‘module’, ‘slots’, ‘active_particle_target’, ‘active_particle_target_index’, ‘billboard_normal_uv’, ‘billboard_split_uv’, ‘billboard_time_index_uv’, ‘bl_rna’, ‘child_particles’, ‘child_seed’, ‘cloth’, ‘has_multiple_caches’, ‘invert_vertex_group_clump’, ‘invert_vertex_group_density’, ‘invert_vertex_group_field’, ‘invert_vertex_group_kink’, ‘invert_vertex_group_length’, ‘invert_vertex_group_rotation’, ‘invert_vertex_group_roughness_1’, ‘invert_vertex_group_roughness_2’, ‘invert_vertex_group_roughness_end’, ‘invert_vertex_group_size’, ‘invert_vertex_group_tangent’, ‘invert_vertex_group_velocity’, ‘is_editable’, ‘is_edited’, ‘is_global_hair’, ‘name’, ‘parent’, ‘particles’, ‘point_cache’, ‘reactor_target_object’, ‘reactor_target_particle_system’, ‘rna_type’, ‘seed’, ‘settings’, ‘targets’, ‘use_hair_dynamics’, ‘use_keyed_timing’, ‘vertex_group_clump’, ‘vertex_group_density’, ‘vertex_group_field’, ‘vertex_group_kink’, ‘vertex_group_length’, ‘vertex_group_rotation’, ‘vertex_group_roughness_1’, ‘vertex_group_roughness_2’, ‘vertex_group_roughness_end’, ‘vertex_group_size’, ‘vertex_group_tangent’, ‘vertex_group_velocity’]

I assume you have to look at ‘particles’ ??!! now

No, you misunderstand. In my example, “particleSystem” is a variable name, a pointer to a particle system, like this:

particleSystem = bpy.scene.objects[0].particle_systems[0]

I assumed that would be obvious from context, but I guess I was mistaken.

BTW. anyone has information about accessing hair children from python?