In 2.79 this would get me an array with location of particles on selected objects:
import bpy for psys in bpy.context.active_object.particle_systems: par_loc = [0,0,0]*len(psys.particles) #create array to store postions psys.particles.foreach_get("location", par_loc) #fill the par_loc array with particle positions print(par_loc)
In 2.80 this no longer works, it just returns an empty array. I’ve checked the 2.80 api and found no reason why this should’t work. (
Would anyone know what could I be doing wrong? is there any other way to access particle attributes in 2.80 which works for you?
Thanks a lot!