We have an animation where particles are emitted from a plane, using a PNG image texture as a density influence.

When rendering through the Blender GUI, if the PNG texture is changed and the animation replayed, the new texture is used as a density influence and the simulation renders correctly.

However, when rendering a single frame from the command line and using a Python script to change the PNG logo, the density influence does not get updated. As a consequence, the new PNG image will display, but the particles will emit as if the old PNG texture was still in place.

Looks as if we need to explicitly tell Blender to empty its cache(s) - from Python. Does anyone know how to do that?


  • $\begingroup$ Does blender.org/api/blender_python_api_2_76_2/… help? You might do bpy.context.scene.update() for instance. $\endgroup$
    – Qutorial
    Commented Nov 3, 2015 at 19:05
  • $\begingroup$ Thanks Qutorial. I solved it, it had nothing to do with caching, as I assumed initially - see below. $\endgroup$
    – sebastian
    Commented Nov 5, 2015 at 16:52

1 Answer 1


Found a solution, which has nothing to do with caching:

The animation displays a PNG image (texture) which will be replaced by particles that then disappear. The image seems to be dissolving.

To change the image dynamically, a Python script assigns a new PNG to the texture, with bpy.data.textures['Logo'].image = IMAGE.

What was missing was to also update the texture for the particle emitter. This can be done as follows in Python: bpy.data.particles['ParticleSettings'].active_texture.image = IMAGE

Without updating the particle emitter, the visible image would change, but the particles would still emit from where the old image was.


You must log in to answer this question.

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