In case anyone’s interested, this hacky way seems to do the trick:
cmds.modelEditor(panel, e=True, dtx=False)
cmds.refresh(f=True)
cmds.modelEditor(panel, e=True, dtx=True)
for i in range(0, 10):
log.debug("Refresh", i)
cmds.refresh()
Turns texture display off then on, and refreshes the viewport a few times. I tried just once - did not work. 10 might be too much, seems like 2-5 times is enough.
Instead of playblasting you can render your scene(s) with the “Hardware 2.0” renderer (which is just the viewport renderer). So you can make all your desired Render settings and kick of a “Batch render”. This might fix your texture issues.
Hope that helps a little bit.
Yes, I thought about it, but it’s just much easier to run a playblast, which can also include viewport HUD information which may sometimes be needed, as well as whichever Background is set in viewport.
Adding those manually would take more script development time and render time in the end, which is crucial when you need to playblast 100+ files now and then.