In Blender 2.7 it was possible to set particle locations dynamically as demonstrated in this answer.
In 2.8 particle data isn't up to date unless evaluating the emitter via the depsgraph as shown in this bug report.
This does provide up to date data about the number of particles and makes the individual particle location accessible, however trying to set this value does not update the view and seems to have no visible effect, although accessing the same particle location shows a change has been made.
In 2.7 we were able to force a scene redraw to fix this, any way to update the depsgraph or anything similar to manifest these changes?
Here's the code snippet I'm trying to get to work (requires adding a cube object named 'Cube' with a particle system that has a particle count of 50):
import bpy import numpy as np from mathutils import Vector p = bpy.context.depsgraph.objects.get('Cube', None).particle_systems.particles locations = np.random.randint(-10,10,size = (50,3)) locations = [ Vector(co) for co in locations ] for pp, loc in zip( p, locations ): pp.location = loc # None of this works bpy.context.depsgraph.objects.update() bpy.context.depsgraph.scene_eval.update() bpy.context.depsgraph.scene.update() bpy.ops.wm.redraw_timer(type='DRAW')