A few people have asked me if there is a way to use my uv layout script, djPFXUVs, on a paint FX mesh that is animating. The answer is "yes". Keep reading if you are interested in knowing how...
When you convert paintFX to polygons the resulting poly mesh retains the paint FX stroke as part of its history. This means that any animation on the paint FX propagates to the poly mesh. You need this if you want your trees or grass to bend and sway in the wind.
Now if you use djPFXUVs to layout the uv's on the leaves of an animating tree, blades of animating grass, that new uv layout will be lost as soon as you change frames on the timeline. This happens because the paint FX stroke is still in the history of the poly mesh. When the paint FX stroke changes shape the poly mesh is recomputed and that includes resetting the uv's.
So instead of doing a one time uv layout we need a way to add the uv layout to the poly mesh history, and we need it to come after the paint FX conversion.
The solution is to make a copy of the poly mesh. This should be just a simple duplicate, without duplicating the input connections. To put it another way, we make a static copy of the poly mesh - static because that copy has no history. Then we do the uv layout on the static mesh. Now we have a static mesh with good uv layout and an animating mesh with the not so good, original paint FX uv layout.
Finally we can use "Transfer Attributes" from the mesh menu to copy the good uv layout from the static mesh to the animating mesh. Simply select the static mesh first and shift-select the animating mesh, then do "Transfer Attributes" with the following options:
This will create a transferAttributes node in the animated mesh's history that links it to the static mesh. Since the transferAttributes comes after the paintFX conversion every time the mesh is recomputed, the transfer of the uv layout will follow.
Thats it. We now have a useful uv layout on an animating mesh.
There is unfortunately one more thing I should mention. Having the transferAttributes node in the animating mesh's history has a significant impact on playback speed. The slowdown will be more or less noticeable depending on how many polys you are working with. It is not ideal, but if you want animated trees and grass and the type of extra texturing advantages of a good uv layout, you may be prepared to live with it. A strategic work flow might be to have some kind of shelf button switch (or marking menu) so you can make the static mesh visible while you are working on the scene and testing renders, and make the animating mesh visible for final renders.