Python modified vertex colors display in viewport but not in rendered image


I’m assuming this issue to be a bug, but I’m not completely sure.
There is a fully detailed report available here.

The problem is that vertex colors changed using addons or python code do not update in the rendered images although they show correctly in the viewport. I have tried this as well with the tension map addon updated for 2.8.

This only happens for objects that have modifiers on! Maybe something wrong with to_mesh function?

This is what I see in the viewport:

And this is the rendered image:

Here is another rendered image:

What is actually happening is that the vertex color does not change at all from its last state prior to executing the Render Animation operator. As such if the vertex color is already populated with some values, those values remain unchanged during the entire length of the render.

I have tried some different workarounds, none of which seem to work:

None of the above methods seem to resolve the issue. Any help would be much appreciated!
I’m no sure if I should report this as a bug or if this has to do with the new python API and mesh data needs to be updated in a specific way to force a redraw or cache update.

Thanks in advance.

I’m new here and I’ll be glad to help.

I know that this post is old and my solutions is not the best stuff.
I’m not a programmer, not even close, so I can’t find a
sophisticated whey to solve.

However I was working in blender 2.82 and tension maps, what put me in the same problem.
So I guessed that the render error could be cause because that viewport force the keyframe changes, and maybe the commom render mode, just do things based in cache, not looking for every changed that could be did in next frame.
Because of that I tried to work with some render addons, what is out of the commom way to render internal. And I haved some good things from Loom, the addon rendered the stress map identical to the viewport,

The render mode is very simple and intuitive, so It’s don’t changed to much the workflow.

My english is rough, but I hope to helped.