As per title. Minimal code example is:
import bpy
bpy.ops.object.modifier_add(type='FLUID')
bpy.ops.object.material_slot_add()
bpy.ops.object.quick_smoke()
bpy.context.scene.frame_end = 10
bpy.ops.render.render(animation=True)
Interestingly, if I do bpy.ops.screen.animation_play(), let it finish and then bpy.ops.render.render(animation=True), the smoke renders correctly!
Tested on both Mac and Windows.
animation_play()must have been doing something extra. Addingbpy.ops.fluid.bake_data()beforebpy.ops.render.render(animation=True)solved it! – bosmart Jun 09 '20 at 11:01