1
$\begingroup$

I need to write a script that allows me to bend a hair to exact coordinates. I've been using -

bpy.context.object.particle_systems[0].particles[0].hair_keys[0].co = (x,y,z)

but particles[0] seems to only allow 0-5 hair_keys.

Is there anyway to script an increase in the number of hair_keys? Any sample code would be greatly appreciated.

Thanks!

$\endgroup$

1 Answer 1

1
$\begingroup$

You can change the "segment" to get a higher number of "hair_keys".

Hair Segment Input Field

In script, you can use bpy.data.particles["ParticleSettings"].hair_step = n, where n is the segment number, which is len(hair_keys) - 1

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .